6 subroutine wfmtsv_sp(tsh,is,ias,nst,idx,ngp,apwalm,evecfv,evecsv,ld,wfmt)
11 logical,
intent(in) :: tsh
12 integer,
intent(in) :: 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(4),
intent(out) :: wfmt(ld,nspinor,nst)
19 integer io,ilo,ispn,jspn
20 integer nrc,nrci,nrco,irco
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(4) cfmt(npcmtmax),c(2*lmaxo+1)
29 complex(8),
external :: zdotu
54 lma=l**2+1; lmb=lma+2*l
63 x(j,jspn)=zdotu(n,evecfv(:,j,jspn),1,apwalm(:,io,lm,ias,jspn),1)
71 k=merge(j,idx(j),tasv)
72 y(p,1,j)=zdotu(nstfv,evecsv(1,k),1,x,1)
75 y(p,2,j)=zdotu(nstfv,evecsv(nstfv+1,k),1,x(1,jspn),1)
82 k=merge(j,idx(j),tasv)
83 y(p,1,j)=zdotu(ngp(1),evecfv(:,k,1),1,apwalm(:,io,lm,ias,1),1)
92 wfmt(1:npc,1:nspinor,j)=0.e0
103 if (
ssdph) c(1:nm)=c(1:nm)*zq(ispn)
105 call cfcrf(nm,nrci,
apwfr_sp(1,io,l,ias),c,
lmmaxi,wfmt(lma,ispn,j))
107 wfmt(npci+lma,ispn,j))
119 do lm=l**2+1,(l+1)**2
125 x(1:nstfv,jspn)=evecfv(n+i,1:nstfv,jspn)
129 k=merge(j,idx(j),tasv)
130 y(p,1,j)=zdotu(nstfv,evecsv(1,k),1,x,1)
133 y(p,2,j)=zdotu(nstfv,evecsv(nstfv+1,k),1,x(1,jspn),1)
139 k=merge(j,idx(j),tasv)
140 y(p,1,j)=evecfv(ngp(1)+i,k,1)
157 if (
ssdph) c(1:nm)=c(1:nm)*zq(ispn)
164 cfmt(1:npc)=wfmt(1:npc,ispn,j)
165 call cgemm(
'N',
'N',
lmmaxi,nrci,
lmmaxi,
cone,
cbshti,
lmmaxi,cfmt,
lmmaxi, &
178 pure subroutine cfcrf(m,n,rf,c,ld,cf)
181 integer,
intent(in) :: m,n
182 real(4),
intent(in) :: rf(n)
183 complex(4),
intent(in) :: c(m)
184 integer,
intent(in) :: ld
185 complex(4),
intent(inout) :: cf(ld,n)
189 cf(i,1:n)=cf(i,1:n)+c(i)*rf(1:n)
integer, dimension(maxspecies) npcmt
integer, dimension(maxspecies) nlorb
integer, dimension(:,:,:), allocatable idxlo
complex(4), parameter czero
real(4), dimension(:,:,:), allocatable lofr_sp
complex(4), parameter cone
complex(8), dimension(:), allocatable zqss
integer, dimension(0:maxlapw, maxspecies) apword
integer, dimension(maxspecies) npcmti
real(4), dimension(:,:,:,:), allocatable apwfr_sp
subroutine wfmtsv_sp(tsh, is, ias, nst, idx, ngp, apwalm, evecfv, evecsv, ld, wfmt)
complex(4), dimension(:,:), allocatable cbshti
subroutine holdthd(nloop, nthd)
complex(4), dimension(:,:), allocatable cbshto
integer, dimension(maxspecies) nrcmt
integer, dimension(maxspecies) nrcmti
integer, dimension(maxlorb, maxspecies) lorbl
pure subroutine cfcrf(m, n, rf, c, ld, cf)
integer, dimension(2) jspnfv