conv_write_spn_fmt Subroutine

public subroutine conv_write_spn_fmt()

Uses

  • proc~~conv_write_spn_fmt~~UsesGraph proc~conv_write_spn_fmt conv_write_spn_fmt module~w90_parameters w90_parameters proc~conv_write_spn_fmt->module~w90_parameters module~w90_io w90_io proc~conv_write_spn_fmt->module~w90_io module~w90_parameters->module~w90_io module~w90_constants w90_constants module~w90_parameters->module~w90_constants module~w90_io->module~w90_constants

Write formatted spn file

Arguments

None

Calls

proc~~conv_write_spn_fmt~~CallsGraph proc~conv_write_spn_fmt conv_write_spn_fmt proc~io_file_unit io_file_unit proc~conv_write_spn_fmt->proc~io_file_unit

Called by

proc~~conv_write_spn_fmt~~CalledByGraph proc~conv_write_spn_fmt conv_write_spn_fmt program~w90spn2spn w90spn2spn program~w90spn2spn->proc~conv_write_spn_fmt

Contents

Source Code


Source Code

  subroutine conv_write_spn_fmt()
    !=======================================!
    !! Write formatted spn file
    !=======================================!

    use w90_io, only: io_file_unit, io_date, seedname
    use w90_parameters, only: num_bands, num_kpts

    implicit none

    integer :: spn_unit, m, n, ik, s

    write (stdout, '(3a)') 'Writing information to formatted file ', trim(seedname), '.spn.fmt :'

    spn_unit = io_file_unit()
    open (unit=spn_unit, file=trim(seedname)//'.spn.fmt', form='formatted', status='replace', position='rewind')

    write (spn_unit, *) header
    write (spn_unit, *) num_bands, num_kpts

    do ik = 1, num_kpts
      do m = 1, num_bands
        do n = 1, m
          do s = 1, 3
            write (spn_unit, '(2es26.16)') spn_o(n, m, ik, s)
          enddo
        enddo
      enddo
    end do

    close (spn_unit)

    write (stdout, '(1x, a)') 'write done.'

  end subroutine conv_write_spn_fmt