6subroutine gendmat(tspndg,tlmdg,lmin,lmax,ld,dmat)
12logical,
intent(in) :: tspndg,tlmdg
13integer,
intent(in) :: lmin,lmax,ld
14complex(8),
intent(out) :: dmat(ld,nspinor,ld,nspinor,natmtot)
23complex(8),
allocatable :: apwalm(:,:,:,:,:),evecfv(:,:,:),evecsv(:,:)
24complex(8),
allocatable :: dmatk(:,:,:,:,:)
35allocate(dmatk(ld,nspinor,ld,nspinor,nstsv))
43 sfacgk(:,:,ispn,ik),apwalm(:,:,:,:,ispn))
57 call gendmatk(tspndg,tlmdg,lmin,lmax,ias,nst,idx,
ngk(:,ik),apwalm,evecfv, &
63 dmat(:,:,:,:,ias)=dmat(:,:,:,:,ias)+wo*dmatk(:,:,:,:,ist)
69deallocate(apwalm,evecfv,evecsv,dmatk)
74 n=((ld*nspinor)**2)*natmtot
75 call mpi_allreduce(mpi_in_place,dmat,n,mpi_double_complex,mpi_sum,
mpicom, &
subroutine gendmatk(tspndg, tlmdg, lmin, lmax, ias, nst, idx, ngp, apwalm, evecfv, evecsv, ld, dmat)
real(8), dimension(:,:,:,:), allocatable vgkc
real(8), dimension(:), allocatable wkpt
real(8), dimension(:,:,:), allocatable gkc
integer, dimension(:,:), allocatable ngk
real(8), dimension(:,:,:,:), allocatable vgkl
real(8), dimension(:,:), allocatable vkl
complex(8), dimension(:,:,:,:), allocatable sfacgk
real(8), dimension(:,:), allocatable occsv