The Elk Code
writechgqu.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2026 Wenhan Chen, J. K. Dewhurst and S. Sharma.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine writechgqu
7 use modmain
8 use modulr
9 implicit none
10 ! local variables
11 integer is,ia,ias,iq,ifq
12 open(50,file='CHARGEQU.OUT',form='FORMATTED')
13 do ifq=1,nfqrz
14  iq=iqrzf(ifq)
15  write(50,*)
16  write(50,'("Q-point number : ",I6)') iq
17  write(50,'("Q-point (lattice coordinates) :")')
18  write(50,'(3G18.10)') vql(:,iq)
19  write(50,'("Q-point (Cartesian coordinates) :")')
20  write(50,'(3G18.10)') vqc(:,iq)
21  write(50,'("Charges (complex):")')
22  write(50,'(" interstitial",T30,": ",2G18.10)') chgirqu(ifq)
23  write(50,'(" muffin-tins")')
24  do is=1,nspecies
25  write(50,'(" species : ",I0," (",A,")")') is,trim(spsymb(is))
26  do ia=1,natoms(is)
27  ias=idxas(ia,is)
28  write(50,'(" atom ",I0,T30,": ",2G18.10)') ia,chgmtqu(ias,ifq)
29  end do
30  end do
31  write(50,'(" total charge",T30,": ",2G18.10)') chgtotqu(ifq)
32 end do
33 close(50)
34 end subroutine
35 
integer, dimension(maxatoms, maxspecies) idxas
Definition: modmain.f90:42
complex(8), dimension(:), allocatable chgirqu
Definition: modulr.f90:62
integer, dimension(:), allocatable iqrzf
Definition: modmain.f90:546
complex(8), dimension(:,:), allocatable chgmtqu
Definition: modulr.f90:62
real(8), dimension(:,:), allocatable vqc
Definition: modmain.f90:550
real(8), dimension(:,:), allocatable vql
Definition: modmain.f90:548
integer, dimension(maxspecies) natoms
Definition: modmain.f90:36
integer nfqrz
Definition: modmain.f90:542
integer nspecies
Definition: modmain.f90:34
Definition: modulr.f90:6
subroutine writechgqu
Definition: writechgqu.f90:7
character(64), dimension(maxspecies) spsymb
Definition: modmain.f90:78
complex(8), dimension(:), allocatable chgtotqu
Definition: modulr.f90:62