6subroutine genhmlt(ik,vmt,vir,bmt,bir,kmat,pmat,h)
12integer,
intent(in) :: ik
13real(8),
intent(in) :: vmt(npcmtmax,natmtot),vir(ngtc)
14real(8),
intent(in) :: bmt(npcmtmax,natmtot,ndmag),bir(ngtc,ndmag)
15complex(8),
intent(in) :: kmat(nstsv,nstsv),pmat(nstsv,nstsv,3)
16complex(8),
intent(out) :: h(nstsv,nstsv)
21complex(8),
allocatable :: apwalm(:,:,:,:),evecfv(:,:),evecsv(:,:)
22complex(4),
allocatable :: wfmt(:,:,:,:),wfgk(:,:,:)
29call match(
ngk(1,ik),
vgkc(:,:,1,ik),
gkc(:,1,ik),
sfacgk(:,:,1,ik),apwalm)
32call genwfsv_sp(.false.,.true.,nstsv,[0],
ngridg,
igfft,
ngk(:,ik),
igkig(:,:,ik), &
33 apwalm,evecfv,evecsv,wfmt,
ngkmax,wfgk)
34deallocate(apwalm,evecfv)
37 call genvbmatk(vmt,vir,bmt,bir,
ngk(:,ik),
igkig(:,:,ik),wfmt,
ngkmax,wfgk,h)
39 call genvmatk(vmt,vir,
ngk(:,ik),
igkig(:,:,ik),wfmt,
ngkmax,wfgk,h)
44 h(1:jst,jst)=h(1:jst,jst)+kmat(1:jst,jst)
51 if (abs(t1) > 1.d-10)
then
53 h(1:jst,jst)=h(1:jst,jst)+t1*pmat(1:jst,jst,i)
subroutine genhafspt(evecsv, pmat, h)
subroutine genhmlt(ik, vmt, vir, bmt, bir, kmat, pmat, h)
subroutine genvbmatk(vmt, vir, bmt, bir, ngp, igpig, wfmt, ld, wfgp, vbmat)
subroutine genvmatk(vmt, vir, ngp, igpig, wfmt, ld, wfgp, vmat)
subroutine genwfsv_sp(tsh, tgp, nst, idx, ngridg_, igfft_, ngp, igpig, apwalm, evecfv, evecsv, wfmt, ld, wfir)
subroutine getevecfv(fext, ikp, vpl, vgpl, evecfv)
subroutine getevecsv(fext, ikp, vpl, evecsv)
subroutine match(ngp, vgpc, gpc, sfacgp, apwalm)
real(8), dimension(:,:,:,:), allocatable vgkc
integer, dimension(3) ngridg
real(8), dimension(:,:,:), allocatable gkc
integer, dimension(:,:), allocatable ngk
integer, dimension(:,:,:), allocatable igkig
real(8), dimension(:,:,:,:), allocatable vgkl
integer, dimension(:), allocatable igfft
real(8), dimension(:,:), allocatable vkl
complex(8), dimension(:,:,:,:), allocatable sfacgk
real(8), dimension(:,:), allocatable afieldt