29integer ik,ist,ispn,is,ia,ias
30integer lmax,lmmax,l,m,lm,iv,nthd
31real(8) emin,emax,sm,t1
34real(8),
allocatable :: evalfv(:,:)
36real(4),
allocatable :: bc(:,:,:,:)
37complex(8),
allocatable :: dmat(:,:,:,:,:),apwalm(:,:,:,:,:)
38complex(8),
allocatable :: evecfv(:,:,:),evecsv(:,:)
47else if (
task == 22)
then
49else if (
task == 23)
then
78 write(*,
'("Info(bandstr): ",I6," of ",I6," k-points")') ik,
nkpt
81 call eveqn(ik,evalfv,evecfv,evecsv)
87 sfacgk(:,:,ispn,ik),apwalm(:,:,:,:,ispn))
92 call gendmatk(.true.,.true.,0,lmax,ias,
nstsv,[0],
ngk(:,ik),apwalm,evecfv,&
103 sm=sm+dble(dmat(lm,ispn,lm,ispn,ist))
106 bc(l,ias,ist,ik)=real(sm)
108 else if (
task == 22)
then
116 sm=sm+dble(dmat(lm,ispn,lm,ispn,ist))
118 bc(lm,ias,ist,ik)=real(sm)
129 sm=sm+dble(dmat(lm,ispn,lm,ispn,ist))
132 bc(ispn,ias,ist,ik)=real(sm)
141deallocate(evalfv,evecfv,evecsv)
142if (
task >= 21)
deallocate(dmat,apwalm)
155 open(50,file=
'BAND.OUT',form=
'FORMATTED',action=
'WRITE')
164 write(*,
'("Info(bandstr):")')
165 write(*,
'(" Band structure plot written to BAND.OUT")')
170 write(fname,
'("BAND_S",I2.2,"_A",I4.4,".OUT")') is,ia
171 open(50,file=trim(fname),form=
'FORMATTED',action=
'WRITE')
178 sm=sm+bc(l,ias,ist,ik)
180 write(50,
'(2G18.10,5F12.6)')
dpp1d(ik),
evalsv(ist,ik),sm, &
181 (bc(l,ias,ist,ik),l=0,lmax)
182 else if (
task == 22)
then
183 write(50,
'(2G18.10,16F12.6)')
dpp1d(ik),
evalsv(ist,ik), &
184 (bc(lm,ias,ist,ik),lm=1,lmmax)
186 write(50,
'(2G18.10,2F12.6)')
dpp1d(ik),
evalsv(ist,ik), &
187 (bc(ispn,ias,ist,ik),ispn=1,
nspinor)
196 write(*,
'("Info(bandstr):")')
197 write(*,
'(" Band structure plot written to BAND_Sss_Aaaaa.OUT")')
198 write(*,
'(" for all species and atoms")')
200 write(*,
'(" Columns in the file are :")')
202 write(*,
'(" distance, eigenvalue, total atomic character, l character &
203 &(l = 0...",I1,")")') lmax
204 else if (
task == 22)
then
205 write(*,
'(" distance, eigenvalue, (l,m) character &
206 &(l = 0...",I1,", m = -l...l)")') lmax
208 write(*,
'(" distance, eigenvalue, spin-up and spin-down characters")')
212write(*,
'(" Fermi energy is at zero in plot")')
214open(50,file=
'BANDLINES.OUT',form=
'FORMATTED',action=
'WRITE')
216 write(50,
'(2G18.10)')
dvp1d(iv),emin
217 write(50,
'(2G18.10)')
dvp1d(iv),emax
222write(*,
'(" Vertex location lines written to BANDLINES.OUT")')
223if (
task >= 21)
deallocate(bc)
subroutine gendmatk(tspndg, tlmdg, lmin, lmax, ias, nst, idx, ngp, apwalm, evecfv, evecsv, ld, dmat)
real(8), dimension(:,:,:,:), allocatable vgkc
real(8), dimension(:,:,:), allocatable gkc
integer, dimension(maxspecies) natoms
integer, dimension(maxatoms, maxspecies) idxas
integer, dimension(:,:), allocatable ngk
real(8), dimension(:), allocatable dvp1d
real(8), dimension(:), allocatable dpp1d
complex(8), dimension(:,:,:,:), allocatable sfacgk
real(8), dimension(:,:), allocatable evalsv