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