12 integer,
intent(in) :: ik0
13 complex(8),
intent(out) :: h(nstulr,nstulr)
15 integer ik,ist,jst,ispn,idm,nthd
16 integer ikpa,jkpa,iq,ifq,ngk0,igk
17 integer i1,i2,i3,j1,j2,j3,i,j
19 complex(8) zvir(ngtc),zbir(ngtc,ndmag),vmat(nstsv,nstsv)
21 complex(8),
allocatable :: apwalm(:,:,:,:),evecfv(:,:),evecsv(:,:)
22 complex(4),
allocatable :: wfmt(:,:,:,:),wfir(:,:,:),wfgk(:,:,:)
23 complex(8),
allocatable :: hdb(:,:,:)
34 call match(ngk0,
vgkc(:,:,1,ik),
gkc(:,1,ik),
sfacgk(:,:,1,ik),apwalm)
37 call genwfsv_sp(.false.,.true.,nstsv,[0],
ngridg,
igfft,ngk0,
igkig(:,1,ik), &
38 apwalm,evecfv,evecsv,wfmt,ngk0,wfgk)
39 deallocate(apwalm,evecfv,evecsv)
41 allocate(wfir(ngtc,
nspinor,nstsv))
49 wfir(1:ngtc,ispn,ist)=0.e0
51 wfir(
igfc(
igkig(igk,1,ik)),ispn,ist)=wfgk(igk,ispn,ist)
77 call genzvbmatk(
vsqmt(:,:,ifq),zvir,
bsqmt(:,:,:,ifq),zbir,ngk0, &
78 igkig(:,1,ik),wfmt,wfir,wfgk,vmat)
80 call genzvmatk(
vsqmt(:,:,ifq),zvir,ngk0,
igkig(:,1,ik),wfmt,wfir,wfgk,vmat)
83 j1=
ivq(1,jkpa); j2=
ivq(2,jkpa); j3=
ivq(3,jkpa)
88 i1=
ivq(1,ikpa)-j1; i2=
ivq(2,ikpa)-j2; i3=
ivq(3,ikpa)-j3
89 if (
ivqiq(i1,i2,i3) == iq)
then 91 h(i:i+nstsv-1,j)=vmat(1:nstsv,jst)
92 else if (
ivqiq(-i1,-i2,-i3) == iq)
then 94 h(i:i+nstsv-1,j)=conjg(vmat(jst,1:nstsv))
100 h(i:i+jst-1,j)=vmat(1:jst,jst)
107 deallocate(wfmt,wfir,wfgk)
111 h(ist,ist)=h(ist,ist)+
evalsv(ist,ik)
113 allocate(hdb(nstsv,nstsv,2:
nkpa))
119 h(i:i+jst-1,j)=h(i:i+jst-1,j)+hdb(1:jst,jst,ikpa)
complex(8), dimension(:,:,:), pointer, contiguous vsqmt
subroutine getevecsv(fext, ikp, vpl, evecsv)
integer, dimension(3) ngridg
subroutine zfirftoc(zfir, zfirc)
real(8), dimension(:,:), allocatable evalsv
complex(8), dimension(:,:), pointer, contiguous vsqir
integer, dimension(:,:), allocatable ivq
subroutine getevecfv(fext, ikp, vpl, vgpl, evecfv)
subroutine match(ngp, vgpc, gpc, sfacgp, apwalm)
integer, dimension(:), allocatable iqrzf
complex(8), dimension(:,:,:), pointer, contiguous bsqir
subroutine genzvbmatk(zvmt, zvir, zbmt, zbir, ngp, igpig, wfmt, wfir, wfgp, vbmat)
complex(8), dimension(:,:,:,:), allocatable sfacgk
subroutine cfftifc(nd, n, sgn, c)
subroutine genzvmatk(zvmt, zvir, ngp, igpig, wfmt, wfir, wfgp, vmat)
integer, dimension(:,:), allocatable ngk
subroutine hdbulrk(ik0, hdb)
integer, dimension(:), allocatable igfft
subroutine genwfsv_sp(tsh, tgp, nst, idx, ngridg_, igfft_, ngp, igpig, apwalm, evecfv, evecsv, wfmt, ld, wfir)
real(8), dimension(:,:,:,:), allocatable vgkl
integer, dimension(:), allocatable igfc
integer, dimension(:,:,:), allocatable ivqiq
real(8), dimension(:,:,:,:), allocatable vgkc
real(8), dimension(:,:), allocatable vkl
complex(8), dimension(:,:,:,:), pointer, contiguous bsqmt
real(8), dimension(:,:,:), allocatable gkc
integer, dimension(3) ngdgc
subroutine holdthd(nloop, nthd)
integer, dimension(:,:,:), allocatable igkig
subroutine genhmlu(ik0, h)