10 real(8),
intent(in) :: vpl(3)
11 complex(8),
intent(in) :: expmt(npcmtmax,natmtot)
12 complex(8),
intent(out) :: emat(nstsv,nstsv)
14 integer ist,jst,ispn,i,j,k,l
15 integer is,ia,ias,nrc,nrci
16 integer npc,ngp,ngpq,igp,ifg
17 real(8) vpc(3),vpql(3),vpqc(3),t1
20 integer,
allocatable :: igpig(:),igpqig(:)
21 real(8),
allocatable :: vgpl(:,:),vgpc(:,:),gpc(:)
22 real(8),
allocatable :: vgpql(:,:),vgpqc(:,:),gpqc(:)
23 complex(8),
allocatable :: sfacgp(:,:),sfacgpq(:,:)
24 complex(8),
allocatable :: apwalm1(:,:,:,:),apwalm2(:,:,:,:)
25 complex(8),
allocatable :: evecfv1(:,:),evecfv2(:,:)
26 complex(8),
allocatable :: evecsv1(:,:),evecsv2(:,:)
27 complex(8),
allocatable :: wfmt1(:),wfmt2(:,:)
28 complex(8),
allocatable :: zfir(:),z(:),em(:,:)
30 complex(8),
external :: zfmtinp,zdotc
49 allocate(evecsv1(nstsv,nstsv),evecsv2(nstsv,nstsv))
51 allocate(wfmt1(npcmtmax),wfmt2(npcmtmax,
nstfv))
56 call gengkvec(
ngvc,
ivg,
vgc,vpl,vpc,
gkmax,
ngkmax,ngp,igpig,vgpl,vgpc,gpc)
60 call match(ngp,vgpc,gpc,sfacgp,apwalm1)
64 vpql(:)=vpl(:)+
vecql(:)
68 call gengkvec(
ngvc,
ivg,
vgc,vpql,vpqc,
gkmax,
ngkmax,ngpq,igpqig,vgpql,vgpqc,gpqc)
72 call match(ngpq,vgpqc,gpqc,sfacgpq,apwalm2)
88 call wfmtfv(ias,ngpq,apwalm2(:,:,:,ias),evecfv2(:,ist),wfmt1)
90 call zbsht(nrc,nrci,wfmt1,wfmt2(:,ist))
92 wfmt1(1:npc)=conjg(expmt(1:npc,ias))*wfmt2(1:npc,ist)
94 call zfsht(nrc,nrci,wfmt1,wfmt2(:,ist))
98 call wfmtfv(ias,ngp,apwalm1(:,:,:,ias),evecfv1(:,jst),wfmt1)
100 em(ist,jst)=em(ist,jst)+zfmtinp(nrc,nrci,
wr2cmt(:,is),wfmt2(:,ist), &
114 ifg=
igfft(igpig(igp))
115 zfir(ifg)=evecfv1(igp,jst)
125 ifg=
igfft(igpqig(igp))
130 em(ist,jst)=em(ist,jst)+zdotc(ngpq,evecfv2(:,ist),1,z,1)
150 z1=z1+em(ist,jst)*conjg(evecsv2(k,i))*evecsv1(l,j)
160 deallocate(igpig,igpqig,vgpl,vgpc,gpc)
161 deallocate(vgpql,vgpqc,gpqc,sfacgp,sfacgpq)
162 deallocate(apwalm1,apwalm2,evecfv1,evecfv2)
163 if (
tevecsv)
deallocate(evecsv1,evecsv2)
164 deallocate(wfmt1,wfmt2,zfir,z,em)
integer, dimension(maxspecies) npcmt
subroutine getevecsv(fext, ikp, vpl, evecsv)
subroutine genexpmat(vpl, expmt, emat)
integer, dimension(3) ngridg
pure subroutine gensfacgp(ngp, vgpc, ld, sfacgp)
integer, dimension(maxatoms, maxspecies) idxas
subroutine getevecfv(fext, ikp, vpl, vgpl, evecfv)
subroutine match(ngp, vgpc, gpc, sfacgp, apwalm)
subroutine zfsht(nr, nri, zfmt1, zfmt2)
real(8), dimension(3) vecql
real(8), dimension(:,:), allocatable vgc
subroutine zfftifc(nd, n, sgn, z)
integer, dimension(:), allocatable igfft
real(8), dimension(:), allocatable cfunir
real(8), dimension(3, 3) bvec
integer, dimension(:,:), allocatable ivg
subroutine wfmtfv(ias, ngp, apwalm, evecfv, wfmt)
pure subroutine gengkvec(ngv, ivg, vgc, vkl, vkc, gkmax, ngkmax, ngk, igkig, vgkl, vgkc, gkc)
integer, dimension(maxspecies) natoms
real(8), dimension(:,:), allocatable wr2cmt
subroutine zbsht(nr, nri, zfmt1, zfmt2)
integer, dimension(maxspecies) nrcmt
integer, dimension(maxspecies) nrcmti
pure subroutine r3mv(a, x, y)