6subroutine gencrho(tsh,tspc,ngt,wfmt1,wfir1,wfmt2,wfir2,crhomt,crhoir)
10logical,
intent(in) :: tsh,tspc
11integer,
intent(in) :: ngt
12complex(4),
intent(in) :: wfmt1(npcmtmax,natmtot,*),wfir1(ngt,*)
13complex(4),
intent(in) :: wfmt2(npcmtmax,natmtot,*),wfir2(ngt,*)
14complex(4),
intent(out) :: crhomt(npcmtmax,natmtot),crhoir(ngt)
23 call crho2(
npcmt(is),wfmt1(:,ias,1),wfmt1(:,ias,2),wfmt2(:,ias,1), &
24 wfmt2(:,ias,2),crhomt(:,ias))
27 call crho1(
npcmt(is),wfmt1(:,ias,1),wfmt2(:,ias,1),crhomt(:,ias))
33 call crho2(
npcmt(is),wfmt1(:,ias,1),wfmt1(:,ias,2),wfmt2(:,ias,1), &
34 wfmt2(:,ias,2),crhomt(:,ias))
36 call crho1(
npcmt(is),wfmt1(:,ias,1),wfmt2(:,ias,1),crhomt(:,ias))
42 call crho2(ngt,wfir1,wfir1(:,2),wfir2,wfir2(:,2),crhoir)
44 call crho1(ngt,wfir1,wfir2,crhoir)
50pure subroutine crho1(n,wf1,wf2,crho)
52integer,
intent(in) :: n
53complex(4),
intent(in) :: wf1(n),wf2(n)
54complex(4),
intent(out) :: crho(n)
55crho(1:n)=conjg(wf1(1:n))*wf2(1:n)
58pure subroutine crho2(n,wf11,wf12,wf21,wf22,crho)
60integer,
intent(in) :: n
61complex(4),
intent(in) :: wf11(n),wf12(n),wf21(n),wf22(n)
62complex(4),
intent(out) :: crho(n)
63crho(1:n)=conjg(wf11(1:n))*wf21(1:n)+conjg(wf12(1:n))*wf22(1:n)
subroutine gencrho(tsh, tspc, ngt, wfmt1, wfir1, wfmt2, wfir2, crhomt, crhoir)
integer, dimension(maxspecies) nrcmt
integer, dimension(maxatoms *maxspecies) idxis
integer, dimension(maxspecies) npcmt
integer, dimension(maxspecies) nrcmti