25 integer,
intent(in) :: ikp
26 real(8),
intent(out) :: vcl1221(nstsv,nstsv,nkpt)
33 real(8),
allocatable :: vgqc(:,:),gqc(:),gclgq(:),jlgqrmt(:,:,:)
34 complex(8),
allocatable :: apwalm(:,:,:,:),evecfv(:,:),evecsv(:,:)
35 complex(8),
allocatable :: ylmgq(:,:),sfacgq(:,:)
36 complex(4),
allocatable :: wfmt1(:,:,:,:),wfir1(:,:,:)
37 complex(4),
allocatable :: wfmt2(:,:,:,:),wfir2(:,:,:)
38 complex(4),
allocatable :: crhomt(:,:),crhoir(:)
39 complex(4),
allocatable :: cvclmt(:,:),cvclir(:)
41 complex(8),
external :: zcfinp
56 call match(
ngk(1,ikp),
vgkc(:,:,1,ikp),
gkc(:,1,ikp),
sfacgk(:,:,1,ikp),apwalm)
58 call genwfsv_sp(.false.,.false.,nstsv,[0],
ngdgc,
igfc,
ngk(1,ikp),
igkig(:,1,ikp),&
59 apwalm,evecfv,evecsv,wfmt2,
ngtc,wfir2)
63 iv(1:3)=
ivk(1:3,ik)-
ivk(1:3,ikp)
64 iv(1:3)=modulo(iv(1:3),
ngridk(1:3))
66 iv(1:3)=iv(1:3)*
ngridq(1:3)
67 if (any(mod(iv(1:3),
ngridk(1:3)) /= 0)) cycle
68 iv(1:3)=iv(1:3)/
ngridk(1:3)
69 iq=
ivqiq(iv(1),iv(2),iv(3))
70 vc(1:3)=
vkc(1:3,ik)-
vkc(1:3,ikp)
73 vgqc(1:3,ig)=
vgc(1:3,ig)+vc(1:3)
75 gqc(ig)=sqrt(vgqc(1,ig)**2+vgqc(2,ig)**2+vgqc(3,ig)**2)
86 call match(
ngk(1,ik),
vgkc(:,:,1,ik),
gkc(:,1,ik),
sfacgk(:,:,1,ik),apwalm)
91 call genwfsv_sp(.false.,.false.,nstsv,[0],
ngdgc,
igfc,
ngk(1,ik),
igkig(:,1,ik),&
92 apwalm,evecfv,evecsv,wfmt1,
ngtc,wfir1)
99 call gencrho(.true.,.true.,
ngtc,wfmt2(:,:,:,ist2),wfir2(:,:,ist2), &
100 wfmt1(:,:,:,ist1),wfir1(:,:,ist1),crhomt,crhoir)
104 gclgq,
ngvc,jlgqrmt,ylmgq,sfacgq,crhoir,
npcmtmax,cvclmt,cvclir)
106 z1=zcfinp(crhomt,crhoir,cvclmt,cvclir)
107 vcl1221(ist1,ist2,ik)=
wqptnr*z1%re
114 deallocate(vgqc,gqc,gclgq,jlgqrmt)
115 deallocate(apwalm,evecfv,evecsv,ylmgq,sfacgq)
116 deallocate(wfmt1,wfmt2,wfir1,wfir2)
117 deallocate(crhomt,crhoir,cvclmt,cvclir)
subroutine gencvclmt(nrmt_, nrmti_, ld1, rl, wpr, ld2, crhomt, cvclmt)
integer, dimension(maxspecies) npcmt
subroutine getevecsv(fext, ikp, vpl, evecsv)
pure subroutine gensfacgp(ngp, vgpc, ld, sfacgp)
subroutine getevecfv(fext, ikp, vpl, vgpl, evecfv)
subroutine gencrho(tsh, tspc, ngt, wfmt1, wfir1, wfmt2, wfir2, crhomt, crhoir)
subroutine match(ngp, vgpc, gpc, sfacgp, apwalm)
pure subroutine genylmv(t4pil, lmax, v, ylm)
complex(8), dimension(:,:,:,:), allocatable sfacgk
real(8), dimension(:,:), allocatable vkc
real(8), dimension(:,:), allocatable vgc
pure subroutine gengclgq(treg, iq, ngq, gqc, gclgq)
integer, dimension(:,:), allocatable ngk
subroutine genwfsv_sp(tsh, tgp, nst, idx, ngridg_, igfft_, ngp, igpig, apwalm, evecfv, evecsv, wfmt, ld, wfir)
real(8), dimension(:,:,:,:), allocatable vgkl
integer, dimension(:), allocatable igfc
real(8), dimension(:,:,:), allocatable rlcmt
integer, dimension(3) ngridk
real(8), dimension(:,:,:), allocatable wprcmt
subroutine genvcl1221(ikp, vcl1221)
integer, dimension(:,:,:), allocatable ivqiq
real(8), dimension(:,:,:,:), allocatable vgkc
integer, dimension(3) ngridq
real(8), dimension(:,:), allocatable vkl
subroutine cpotcoul(nrmt_, nrmti_, npmt_, ld1, rl, ngridg_, igfft_, ngp, gpc, gclgp, ld2, jlgprmt, ylmgp, sfacgp, crhoir, ld3, cvclmt, cvclir)
real(8), dimension(:,:,:), allocatable gkc
integer, dimension(3) ngdgc
subroutine genjlgprmt(lmax, ngp, gpc, ld, jlgprmt)
real(8), dimension(:), allocatable cfrc
integer, dimension(maxspecies) nrcmt
integer, dimension(maxspecies) nrcmti
integer, dimension(:,:,:), allocatable igkig
integer, dimension(:,:), allocatable ivk