6 subroutine wfmtsv(tsh,lrstp,is,ias,nst,idx,ngp,apwalm,evecfv,evecsv,ld,wfmt)
11 logical,
intent(in) :: tsh
12 integer,
intent(in) :: lrstp,is,ias,nst,idx(*),ngp(nspnfv)
13 complex(8),
intent(in) :: apwalm(ngkmax,apwordmax,lmmaxapw,natmtot,nspnfv)
14 complex(8),
intent(in) :: evecfv(nmatmax,nstfv,nspnfv),evecsv(nstsv,nstsv)
15 integer,
intent(in) :: ld
16 complex(8),
intent(out) :: wfmt(ld,nspinor,nst)
19 integer io,ilo,ispn,jspn
20 integer nr,nri,nro,iro
22 integer l,lm,lma,lmb,nm
23 integer n,p,i,j,k,nthd
26 complex(8) x(nstfv,nspnfv),y(nlmwf(is),nspinor,nst)
27 complex(8) zfmt(npmtmax),z(2*lmaxo+1)
29 complex(8),
external :: zdotu
61 lma=l**2+1; lmb=lma+2*l
70 x(j,jspn)=zdotu(n,evecfv(:,j,jspn),1,apwalm(:,io,lm,ias,jspn),1)
78 k=merge(j,idx(j),tasv)
79 y(p,1,j)=zdotu(nstfv,evecsv(1,k),1,x,1)
82 y(p,2,j)=zdotu(nstfv,evecsv(nstfv+1,k),1,x(1,jspn),1)
89 k=merge(j,idx(j),tasv)
90 y(p,1,j)=zdotu(ngp(1),evecfv(:,k,1),1,apwalm(:,io,lm,ias,1),1)
99 wfmt(1:np,1:nspinor,j)=0.d0
110 if (
ssdph) z(1:nm)=z(1:nm)*zq(ispn)
112 call zfzrf(nm,nri,
apwfr(1,1,io,l,ias),z,
lmmaxi,wfmt(lma,ispn,j))
113 call zfzrf(nm,nro,
apwfr(iro,1,io,l,ias),z,
lmmaxo,wfmt(npi+lma,ispn,j))
125 do lm=l**2+1,(l+1)**2
131 x(1:nstfv,jspn)=evecfv(n+i,1:nstfv,jspn)
135 k=merge(j,idx(j),tasv)
136 y(p,1,j)=zdotu(nstfv,evecsv(1,k),1,x,1)
139 y(p,2,j)=zdotu(nstfv,evecsv(nstfv+1,k),1,x(1,jspn),1)
145 k=merge(j,idx(j),tasv)
146 y(p,1,j)=evecfv(ngp(1)+i,k,1)
163 if (
ssdph) z(1:nm)=z(1:nm)*zq(ispn)
165 call zfzrf(nm,nri,
lofr(1,1,ilo,ias),z,
lmmaxi,wfmt(lma,ispn,j))
166 call zfzrf(nm,nro,
lofr(iro,1,ilo,ias),z,
lmmaxo,wfmt(npi+lma,ispn,j))
170 zfmt(1:np)=wfmt(1:np,ispn,j)
171 call zgemm(
'N',
'N',
lmmaxi,nri,
lmmaxi,
zone,
zbshti,
lmmaxi,zfmt,
lmmaxi, &
173 call zgemm(
'N',
'N',
lmmaxo,nro,
lmmaxo,
zone,
zbshto,
lmmaxo,zfmt(ipo),
lmmaxo,&
184 pure subroutine zfzrf(m,n,rf,z,ld,zf)
187 integer,
intent(in) :: m,n
188 real(8),
intent(in) :: rf(lrstp,n)
189 complex(8),
intent(in) :: z(m)
190 integer,
intent(in) :: ld
191 complex(8),
intent(inout) :: zf(ld,n)
195 zf(i,1:n)=zf(i,1:n)+z(i)*rf(1,1:n)
pure subroutine zfzrf(n, ld1, rf, ld2, zf)
integer, dimension(maxspecies) npcmt
integer, dimension(maxspecies) nlorb
integer, dimension(:,:,:), allocatable idxlo
real(8), dimension(:,:,:,:), allocatable lofr
integer, dimension(maxspecies) npmt
complex(8), parameter zone
complex(8), dimension(:), allocatable zqss
integer, dimension(0:maxlapw, maxspecies) apword
complex(8), parameter zzero
integer, dimension(maxspecies) npcmti
subroutine holdthd(nloop, nthd)
complex(8), dimension(:,:), allocatable zbshto
real(8), dimension(:,:,:,:,:), allocatable apwfr
integer, dimension(maxspecies) nrcmt
integer, dimension(maxspecies) nrcmti
integer, dimension(maxspecies) npmti
integer, dimension(maxlorb, maxspecies) lorbl
subroutine wfmtsv(tsh, lrstp, is, ias, nst, idx, ngp, apwalm, evecfv, evecsv, ld, wfmt)
integer, dimension(maxspecies) nrmti
complex(8), dimension(:,:), allocatable zbshti
integer, dimension(2) jspnfv
integer, dimension(maxspecies) nrmt