6 subroutine rfpts(np,vpl,rfmt,rfir,fp)
11 integer,
intent(in) :: np
12 real(8),
intent(in) :: vpl(3,np),rfmt(npmtmax,natmtot),rfir(ngtot)
13 real(8),
intent(out) :: fp(np)
17 complex(8),
allocatable :: zfft(:)
20 zfft(1:ngtot)=rfir(1:ngtot)
39 integer,
intent(in) :: ip
42 integer ir,ir0,i0,ig,j
46 real(8) ya(4,lmmaxo),rlm(lmmaxo)
56 else if (ir > nr-2)
then 74 i0=
lmmaxi*nri+lmmaxo*(ir-nri-1)
76 ya(j,1:lmmax)=rfmt(i0+1:i0+lmmax,ias)
87 v(1:3)=vpl(1,ip)*
avec(1:3,1)+vpl(2,ip)*
avec(1:3,2)+vpl(3,ip)*
avec(1:3,3)
91 t1=
vgc(1,ig)*v(1)+
vgc(2,ig)*v(2)+
vgc(3,ig)*v(3)
92 sm=sm+dble(zfft(
igfft(ig))*cmplx(cos(t1),sin(t1),8))
98 pure real(8) function poly4(xa,ya,x)
101 real(8),
intent(in) :: xa(4),ya(4),x
103 real(8) x0,x1,x2,x3,y0,y1,y2,y3
104 real(8) c1,c2,c3,t0,t1,t2,t3,t4,t5,t6
107 x1=xa(2)-x0; x2=xa(3)-x0; x3=xa(4)-x0
109 y1=ya(2)-y0; y2=ya(3)-y0; y3=ya(4)-y0
110 t4=x1-x2; t5=x1-x3; t6=x2-x3
111 t1=x1*x2*y3; t2=x2*x3*y1; t3=x1*x3
112 t0=1.d0/(x2*t3*t4*t5*t6)
115 t4=x1**2; t5=x2**2; t6=x3**2
116 c2=t1*(t5-t4)+t2*(t6-t5)+t3*(t4-t6)
117 c1=t1*(x2*t4-x1*t5)+t2*(x3*t5-x2*t6)+t3*(x1*t6-x3*t4)
120 poly4=y0+t0*t1*(c1+t1*(c2+c3*t1))
subroutine genrlmv(lmax, v, rlm)
integer, dimension(3) ngridg
subroutine findmtpt(vrl, ias, ir, v, r)
subroutine rfpts(np, vpl, rfmt, rfir, fp)
real(8), dimension(:,:), allocatable vgc
subroutine zfftifc(nd, n, sgn, z)
integer, dimension(:), allocatable igfft
real(8), dimension(3, 3) avec
integer, dimension(maxatoms *maxspecies) idxis
subroutine holdthd(nloop, nthd)
real(8), dimension(:,:), allocatable rsp
integer, dimension(maxspecies) nrmti
pure real(8) function poly4(xa, ya, x)
integer, dimension(maxspecies) nrmt