10real(8),
intent(inout) :: gwf2mt(npmtmax,natmtot)
16complex(8),
allocatable :: wfmt(:),gwfmt(:,:),zfmt(:)
17allocate(wfmt(npmtmax),gwfmt(npmtmax,3),zfmt(npmtmax))
25 if (
spcore(ist,is).and.(
ksp(ist,is) ==
lsp(ist,is)+1))
then
31 wfmt(i)=
rwfcr(ir,1,ist,ias)/
rsp(ir,is)
35 wfmt(i)=
rwfcr(ir,1,ist,ias)/
rsp(ir,is)
38 call gradzfmt(nr,nri,
rlmt(:,-1,is),
wcrmt(:,:,is),wfmt,npmtmax,gwfmt)
40 call zbsht(nr,nri,gwfmt(:,i),zfmt)
42 gwf2mt(1:np,ias)=gwf2mt(1:np,ias) &
43 +2.d0*(dble(zfmt(1:np))**2+aimag(zfmt(1:np))**2)
50deallocate(wfmt,gwfmt,zfmt)
subroutine gradwfcr2(gwf2mt)
subroutine gradzfmt(nr, nri, ri, wcr, zfmt, ld, gzfmt)
integer, dimension(maxstsp, maxspecies) lsp
integer, dimension(maxspecies) nrmti
real(8), dimension(:,:,:), allocatable wcrmt
integer, dimension(maxspecies) nrmt
logical, dimension(maxstsp, maxspecies) spcore
real(8), dimension(:,:), allocatable rsp
integer, dimension(maxatoms *maxspecies) idxis
integer, dimension(maxspecies) nstsp
real(8), dimension(:,:,:,:), allocatable rwfcr
integer, dimension(maxstsp, maxspecies) ksp
integer, dimension(maxspecies) npmt
real(8), dimension(:,:,:), allocatable rlmt
subroutine zbsht(nr, nri, zfmt1, zfmt2)