11 integer,
intent(in) :: ik2
13 integer ik1,ist1,ist2,jst1,jst2
14 integer i1,i2,j1,j2,a1,a2,b1,b2
15 integer iv(3),iq,ig,jg,nthd
16 real(8) vl(3),vc(3),t0,t1,t2
21 integer,
allocatable :: igpig(:,:)
22 real(8),
allocatable :: vgqc(:,:),gqc(:),gclgq(:),jlgqr(:,:,:)
23 complex(8),
allocatable :: ylmgq(:,:),sfacgq(:,:)
24 complex(4),
allocatable :: wfmt1(:,:,:,:),wfir1(:,:,:)
25 complex(4),
allocatable :: wfmt2(:,:,:,:),wfir2(:,:,:)
26 complex(4),
allocatable :: crhomt(:,:),crhoir(:)
27 complex(8),
allocatable :: zvv(:,:,:),zcc(:,:,:)
28 complex(8),
allocatable :: zvc(:,:,:),zcv(:,:,:)
29 complex(8),
allocatable :: epsi(:,:,:)
30 allocate(igpig(
ngkmax,nspnfv))
43 call genwfsvp_sp(.false.,.false.,
nstsv,[0],
ngdgc,
igfc,
vkl(:,ik2),ngp,igpig, &
48 call genwfsvp_sp(.false.,.false.,
nstsv,[0],
ngdgc,
igfc,
vkl(:,ik1),ngp,igpig, &
51 iv(:)=
ivk(:,ik1)-
ivk(:,ik2)
52 iv(:)=modulo(iv(:),
ngridk(:))
53 iq=
ivqiq(iv(1),iv(2),iv(3))
55 vl(:)=
vkl(:,ik1)-
vkl(:,ik2)
56 vc(:)=
vkc(:,ik1)-
vkc(:,ik2)
58 call gengqf(
ngrf,vc,vgqc,gqc,jlgqr,ylmgq,sfacgq)
62 gclgq(:)=sqrt(gclgq(:))
74 call gencrho(.true.,.true.,
ngtc,wfmt2(:,:,:,ist2),wfir2(:,:,ist2), &
75 wfmt1(:,:,:,ist1),wfir1(:,:,ist1),crhomt,crhoir)
76 call zftcf(
ngrf,jlgqr,ylmgq,
ngrf,sfacgq,crhomt,crhoir,zvv(:,i1,i2))
80 deallocate(crhomt,crhoir)
94 call gencrho(.true.,.true.,
ngtc,wfmt2(:,:,:,jst2),wfir2(:,:,jst2), &
95 wfmt1(:,:,:,jst1),wfir1(:,:,jst1),crhomt,crhoir)
96 call zftcf(
ngrf,jlgqr,ylmgq,
ngrf,sfacgq,crhomt,crhoir,zcc(:,j1,j2))
100 deallocate(crhomt,crhoir)
116 call gencrho(.true.,.true.,
ngtc,wfmt2(:,:,:,jst2),wfir2(:,:,jst2), &
117 wfmt1(:,:,:,ist1),wfir1(:,:,ist1),crhomt,crhoir)
118 call zftcf(
ngrf,jlgqr,ylmgq,
ngrf,sfacgq,crhomt,crhoir,zvc(:,i1,j2))
122 deallocate(crhomt,crhoir)
136 call gencrho(.true.,.true.,
ngtc,wfmt2(:,:,:,ist2),wfir2(:,:,ist2), &
137 wfmt1(:,:,:,jst1),wfir1(:,:,jst1),crhomt,crhoir)
138 call zftcf(
ngrf,jlgqr,ylmgq,
ngrf,sfacgq,crhomt,crhoir,zcv(:,j1,i2))
142 deallocate(crhomt,crhoir)
161 z1=z1+t2*epsi(ig,jg,1)*conjg(zcc(ig,j1,j2))*zvv(jg,i1,i2)
175 z1=z1+t2*epsi(ig,jg,1)*conjg(zcv(ig,j1,i2))*zvc(jg,i1,j2)
189 deallocate(igpig,vgqc,gqc,gclgq,jlgqr)
190 deallocate(ylmgq,sfacgq)
191 deallocate(wfmt1,wfmt2,wfir1,wfir2)
192 deallocate(zvv,zcc,epsi)
193 if (
bsefull)
deallocate(zvc,zcv)
subroutine genwfsvp_sp(tsh, tgp, nst, idx, ngridg_, igfft_, vpl, ngp, igpig, wfmt, ld, wfir)
subroutine gengqf(ng, vqpc, vgqc, gqc, jlgqr, ylmgq, sfacgq)
subroutine gencrho(tsh, tspc, ngt, wfmt1, wfir1, wfmt2, wfir2, crhomt, crhoir)
integer, dimension(:,:,:), allocatable ijkbse
subroutine getcfgq(fname, vpl, ng, m, cf)
integer, dimension(:,:), allocatable jstbse
real(8), dimension(:,:), allocatable vkc
pure subroutine gengclgq(treg, iq, ngq, gqc, gclgq)
subroutine zftcf(ngp, jlgpr, ylmgp, ld, sfacgp, cfmt, cfir, zfgp)
integer, dimension(:), allocatable igfc
integer, dimension(3) ngridk
integer, dimension(:,:,:), allocatable ivqiq
real(8), dimension(:,:), allocatable vkl
integer, dimension(3) ngdgc
subroutine holdthd(nloop, nthd)
complex(8), dimension(:,:), allocatable hmlbse
integer, dimension(:,:), allocatable ivk
integer, dimension(:,:), allocatable istbse