The Elk Code
 
Loading...
Searching...
No Matches
writestulr.f90
Go to the documentation of this file.
1
2! Copyright (C) 2018 T. Mueller, J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine writestulr
7use modmain
8use modulr
9implicit none
10! local variables
11integer ifq,idm
12open(100,file='STATE_ULR.OUT',form='UNFORMATTED',action='WRITE')
13write(100) version
14write(100) natmtot
15write(100) npcmtmax
16write(100) ngtc
17write(100) ngtot
18write(100) ndmag
19write(100) fsmtype
20write(100) nqpt
21write(100) nfqrz
22write(100) ivq
23write(100) iqrzf
24write(100) efermi
25! write the ultra long-range density in Q-space
26do ifq=1,nfqrz
27 write(100) rhoqmt(:,:,ifq)
28 write(100) rhoqir(:,ifq)
29end do
30! write the Kohn-Sham effective potential in Q-space
31do ifq=1,nfqrz
32 write(100) vsqmt(:,:,ifq)
33 write(100) vsqir(:,ifq)
34end do
35! write the external Coulomb potential in Q-space
36do ifq=1,nfqrz
37 write(100) vclq(ifq)
38end do
39if (spinpol) then
40! write the magnetisation in Q-space
41 do ifq=1,nfqrz
42 do idm=1,ndmag
43 write(100) magqmt(:,:,idm,ifq)
44 write(100) magqir(:,idm,ifq)
45 end do
46 end do
47! write the Kohn-Sham effective magnetic field in Q-space
48 do ifq=1,nfqrz
49 do idm=1,ndmag
50 write(100) bsqmt(:,:,idm,ifq)
51 write(100) bsqir(:,idm,ifq)
52 end do
53 end do
54! write the external magnetic fields in Q-space
55 do ifq=1,nfqrz
56 do idm=1,ndmag
57 write(100) bfcq(idm,ifq)
58 write(100) bfcmtq(:,idm,ifq)
59 end do
60 end do
61! write fixed spin moment magnetic fields
62 if (fsmtype /= 0) then
63 write(100) bfsmc
64 write(100) bfsmcmt
65 end if
66end if
67close(100)
68end subroutine
69
integer ngtot
Definition modmain.f90:390
real(8) efermi
Definition modmain.f90:904
integer nfqrz
Definition modmain.f90:539
integer, dimension(:,:), allocatable ivq
Definition modmain.f90:529
logical spinpol
Definition modmain.f90:228
integer fsmtype
Definition modmain.f90:251
real(8), dimension(:,:), allocatable bfsmcmt
Definition modmain.f90:263
integer ngtc
Definition modmain.f90:392
real(8), dimension(3) bfsmc
Definition modmain.f90:257
integer nqpt
Definition modmain.f90:525
integer natmtot
Definition modmain.f90:40
integer npcmtmax
Definition modmain.f90:216
integer, dimension(3), parameter version
Definition modmain.f90:1288
integer, dimension(:), allocatable iqrzf
Definition modmain.f90:543
integer ndmag
Definition modmain.f90:238
complex(8), dimension(:), allocatable vclq
Definition modulr.f90:65
complex(8), dimension(:,:,:,:), pointer, contiguous bsqmt
Definition modulr.f90:84
complex(8), dimension(:,:), allocatable bfcq
Definition modulr.f90:70
complex(8), dimension(:,:,:), pointer, contiguous vsqmt
Definition modulr.f90:83
complex(8), dimension(:,:,:), allocatable magqir
Definition modulr.f90:60
complex(8), dimension(:,:,:), allocatable rhoqmt
Definition modulr.f90:59
complex(8), dimension(:,:,:), pointer, contiguous bsqir
Definition modulr.f90:84
complex(8), dimension(:,:), pointer, contiguous vsqir
Definition modulr.f90:83
complex(8), dimension(:,:,:,:), allocatable magqmt
Definition modulr.f90:60
complex(8), dimension(:,:), allocatable rhoqir
Definition modulr.f90:59
complex(8), dimension(:,:,:), allocatable bfcmtq
Definition modulr.f90:72
subroutine writestulr
Definition writestulr.f90:7