6subroutine putkmat(tfv,tvclcr,ik,vmt,vir,bmt,bir)
12logical,
intent(in) :: tfv,tvclcr
13integer,
intent(in) :: ik
14real(8),
intent(in) :: vmt(npcmtmax,natmtot),vir(ngtc)
15real(8),
intent(in) :: bmt(npcmtmax,natmtot,ndmag),bir(ngtc,ndmag)
19complex(8) kmat(nstsv,nstsv),a(nstsv,nstsv)
21complex(8),
allocatable :: apwalm(:,:,:,:,:),evecfv(:,:,:),evecsv(:,:)
22complex(4),
allocatable :: wfmt(:,:,:,:),wfgk(:,:,:)
32 sfacgk(:,:,ispn,ik),apwalm(:,:,:,:,ispn))
36call genwfsv_sp(.false.,.true.,nstsv,[0],
ngridg,
igfft,
ngk(:,ik),
igkig(:,:,ik), &
37 apwalm,evecfv,evecsv,wfmt,
ngkmax,wfgk)
38deallocate(apwalm,evecfv)
41 call genvbmatk(vmt,vir,bmt,bir,
ngk(:,ik),
igkig(:,:,ik),wfmt,
ngkmax,wfgk,kmat)
43 call genvmatk(vmt,vir,
ngk(:,ik),
igkig(:,:,ik),wfmt,
ngkmax,wfgk,kmat)
49 kmat(1:nstsv,jst)=-kmat(1:nstsv,jst)
50 kmat(jst,jst)=kmat(jst,jst)+
evalsv(jst,ik)
53if (tvclcr)
call vclcore(wfmt,kmat)
56 call zgemm(
'N',
'C',nstsv,nstsv,nstsv,
zone,kmat,nstsv,evecsv,nstsv,
zzero,a, &
58 call zgemm(
'N',
'N',nstsv,nstsv,nstsv,
zone,evecsv,nstsv,a,nstsv,
zzero,kmat, &
61deallocate(evecsv,wfmt)
65 call putrd(
'KMAT.OUT',ik,v1=
vkl(1:3,ik),n1=nstsv,nzv=nstsv*nstsv,zva=kmat)
70 inquire(iolength=recl)
vkl(1:3,1),nstsv,kmat
71 open(220,
file=
'KMAT.OUT',form=
'UNFORMATTED',access=
'DIRECT',recl=recl)
72 write(220,rec=ik)
vkl(1:3,ik),nstsv,kmat
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 getevalsv(fext, ikp, vpl, evalsv_)
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
complex(8), parameter zzero
integer, dimension(3) ngridg
real(8), dimension(:,:,:), allocatable gkc
integer, dimension(:,:), allocatable ngk
integer, dimension(:,:,:), allocatable igkig
complex(8), parameter zone
real(8), dimension(:,:,:,:), allocatable vgkl
integer, dimension(:), allocatable igfft
real(8), dimension(:,:), allocatable vkl
complex(8), dimension(:,:,:,:), allocatable sfacgk
real(8), dimension(:,:), allocatable evalsv
type(file_t), dimension(:), allocatable, private file
subroutine putrd(fname, irec, n1, n2, n3, v1, v2, nrv, rva, nzv, zva)
subroutine putkmat(tfv, tvclcr, ik, vmt, vir, bmt, bir)
subroutine vclcore(wfmt, vmat)