6subroutine wfmtsv_sp(tsh,is,ias,nst,idx,ngp,apwalm,evecfv,evecsv,ld,wfmt)
11logical,
intent(in) :: tsh
12integer,
intent(in) :: is,ias,nst,idx(*),ngp(nspnfv)
13complex(8),
intent(in) :: apwalm(ngkmax,apwordmax,lmmaxapw,natmtot,nspnfv)
14complex(8),
intent(in) :: evecfv(nmatmax,nstfv,nspnfv),evecsv(nstsv,nstsv)
15integer,
intent(in) :: ld
16complex(4),
intent(out) :: wfmt(ld,nspinor,nst)
19integer io,ilo,ispn,jspn
20integer nrc,nrci,nrco,irco
26complex(8) x(nstfv,nspnfv),y(nlmwf(is),nspinor,nst)
28complex(8),
external :: zdotu
60 x(j,jspn)=zdotu(n,evecfv(:,j,jspn),1,apwalm(:,io,lm,ias,jspn),1)
68 if (tasv) then; k=j; else; k=idx(j);
end if
69 y(p,1,j)=zdotu(nstfv,evecsv(1,k),1,x,1)
72 y(p,2,j)=zdotu(nstfv,evecsv(nstfv+1,k),1,x(1,jspn),1)
79 if (tasv) then; k=j; else; k=idx(j);
end if
80 y(p,1,j)=zdotu(ngp(1),evecfv(:,k,1),1,apwalm(:,io,lm,ias,1),1)
89 wfmt(1:npc,1:nspinor,j)=0.e0
98 if (abs(c1%re)+abs(c1%im) < 1.d-10) cycle
99 if (
ssdph) c1=c1*zq(ispn)
116 do lm=l**2+1,(l+1)**2
122 x(1:nstfv,jspn)=evecfv(n+i,1:nstfv,jspn)
126 if (tasv) then; k=j; else; k=idx(j);
end if
127 y(p,1,j)=zdotu(nstfv,evecsv(1,k),1,x,1)
130 y(p,2,j)=zdotu(nstfv,evecsv(nstfv+1,k),1,x(1,jspn),1)
136 if (tasv) then; k=j; else; k=idx(j);
end if
137 y(p,1,j)=evecfv(ngp(1)+i,k,1)
148 do lm=l**2+1,(l+1)**2
152 if (abs(c1%re)+abs(c1%im) < 1.d-10) cycle
153 if (
ssdph) c1=c1*zq(ispn)
161 if (.not.tsh)
call cbshtip(nrc,nrci,wfmt(:,ispn,j))
174integer,
intent(in) :: n
175complex(4),
intent(in) :: c
176real(4),
intent(in) :: rf(n)
177integer,
intent(in) :: ld
178complex(4),
intent(inout) :: cf(ld,n)
179cf(1,1:n)=cf(1,1:n)+c*rf(1:n)
complex(8), dimension(:), allocatable zqss
integer, dimension(:,:,:), allocatable idxlo
integer, dimension(maxspecies) npcmti
real(4), dimension(:,:,:,:), allocatable apwfr_sp
integer, dimension(maxspecies) nrcmt
integer, dimension(0:maxlapw, maxspecies) apword
real(4), dimension(:,:,:), allocatable lofr_sp
integer, dimension(maxspecies) npcmt
integer, dimension(2) jspnfv
integer, dimension(maxspecies) nlorb
integer, dimension(maxspecies) nrcmti
integer, dimension(maxlorb, maxspecies) lorbl
subroutine wfmtsv_sp(tsh, is, ias, nst, idx, ngp, apwalm, evecfv, evecsv, ld, wfmt)