25integer,
intent(in) :: ikp
26real(8),
intent(out) :: vcl1221(nstsv,nstsv,nkpt)
33real(8),
allocatable :: vgqc(:,:),gqc(:),gclgq(:),jlgqrmt(:,:,:)
34complex(8),
allocatable :: apwalm(:,:,:,:),evecfv(:,:),evecsv(:,:)
35complex(8),
allocatable :: ylmgq(:,:),sfacgq(:,:)
36complex(4),
allocatable :: wfmt1(:,:,:,:),wfir1(:,:,:)
37complex(4),
allocatable :: wfmt2(:,:,:,:),wfir2(:,:,:)
38complex(4),
allocatable :: crhomt(:,:),crhoir(:)
39complex(4),
allocatable :: cvclmt(:,:),cvclir(:)
41complex(8),
external :: zcfinp
56call match(
ngk(1,ikp),
vgkc(:,:,1,ikp),
gkc(:,1,ikp),
sfacgk(:,:,1,ikp),apwalm)
58call 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
114deallocate(vgqc,gqc,gclgq,jlgqrmt)
115deallocate(apwalm,evecfv,evecsv,ylmgq,sfacgq)
116deallocate(wfmt1,wfmt2,wfir1,wfir2)
117deallocate(crhomt,crhoir,cvclmt,cvclir)
subroutine cpotcoul(nrmt_, nrmti_, npmt_, ld1, rl, ngridg_, igfft_, ngp, gpc, gclgp, ld2, jlgprmt, ylmgp, sfacgp, crhoir, ld3, cvclmt, cvclir)
subroutine gencrho(tsh, tspc, ngt, wfmt1, wfir1, wfmt2, wfir2, crhomt, crhoir)
subroutine gencvclmt(nrmt_, nrmti_, ld1, rl, wpr, ld2, crhomt, cvclmt)
pure subroutine gengclgq(treg, iq, ngq, gqc, gclgq)
subroutine genjlgprmt(lmax, ngp, gpc, ld, jlgprmt)
pure subroutine gensfacgp(ngp, vgpc, ld, sfacgp)
subroutine genvcl1221(ikp, vcl1221)
subroutine genwfsv_sp(tsh, tgp, nst, idx, ngridg_, igfft_, ngp, igpig, apwalm, evecfv, evecsv, wfmt, ld, wfir)
pure subroutine genylmv(t4pil, lmax, v, ylm)
subroutine getevecfv(fext, ikp, vpl, vgpl, evecfv)
subroutine getevecsv(fext, ikp, vpl, evecsv)
subroutine match(ngp, vgpc, gpc, sfacgp, apwalm)
real(8), dimension(:,:,:,:), allocatable vgkc
real(8), dimension(:,:,:), allocatable gkc
real(8), dimension(:), allocatable cfrc
integer, dimension(3) ngdgc
integer, dimension(:,:), allocatable ngk
integer, dimension(:,:,:), allocatable igkig
integer, dimension(maxspecies) nrcmt
integer, dimension(:,:), allocatable ivk
integer, dimension(:,:,:), allocatable ivqiq
integer, dimension(:), allocatable igfc
real(8), dimension(:,:,:), allocatable rlcmt
real(8), dimension(:,:,:,:), allocatable vgkl
integer, dimension(3) ngridk
real(8), dimension(:,:,:), allocatable wprcmt
integer, dimension(maxspecies) npcmt
real(8), dimension(:,:), allocatable vkl
real(8), dimension(:,:), allocatable vgc
real(8), dimension(:,:), allocatable vkc
complex(8), dimension(:,:,:,:), allocatable sfacgk
integer, dimension(maxspecies) nrcmti
integer, dimension(3) ngridq