Write formatted spn file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | stdout | |||
| character(len=50), | intent(in) | :: | seedname |
subroutine conv_write_spn_fmt(stdout, seedname) !================================================! ! !! Write formatted spn file ! !================================================! use w90_io, only: io_date use w90spn_parameters, only: num_bands, num_kpts implicit none integer, intent(in) :: stdout character(len=50), intent(in) :: seedname integer :: spn_unit, m, n, ik, s write (stdout, '(3a)') 'Writing information to formatted file ', trim(seedname), '.spn.fmt :' open (newunit=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) end do end do end do end do close (spn_unit) write (stdout, '(1x, a)') 'write done.' end subroutine conv_write_spn_fmt