2 ! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
9 subroutine vnlrhomt(tsh
,is
,wfmt1
,wfmt2
,zrhomt
)
12 ! !INPUT/OUTPUT PARAMETERS:
13 ! tsh : .true. if the density is to be in spherical harmonics (in,logical)
14 ! is : species number (in,integer)
15 ! wfmt1 : muffin-tin part of wavefunction 1 in spherical coordinates
16 ! (in,complex(lmmaxvr,nrcmtmax,natmtot,nspinor))
17 ! wfmt2 : muffin-tin part of wavefunction 2 in spherical coordinates
18 ! (in,complex(lmmaxvr,nrcmtmax,natmtot,nspinor))
19 ! zrhomt : muffin-tin charge density in spherical harmonics/coordinates
20 ! (out,complex(lmmaxvr,nrcmtmax))
22 ! Calculates the complex overlap density in a single muffin-tin from two input
23 ! wavefunctions expressed in spherical coordinates. If {\tt tsh} is
24 ! {\tt .true.} then the output density is converted to a spherical harmonic
25 ! expansion. See routine {\tt vnlrho}.
28 ! Created November 2004 (Sharma)
33 logical, intent(in
) :: tsh
34 integer, intent(in
) :: is
35 complex(8), intent(in
) :: wfmt1(lmmaxvr
,nrcmtmax
)
36 complex(8), intent(in
) :: wfmt2(lmmaxvr
,nrcmtmax
)
37 complex(8), intent(out
) :: zrhomt(lmmaxvr
,nrcmtmax
)
41 complex(8), allocatable
:: zfmt(:,:)
43 ! output density in spherical harmonics
44 allocate(zfmt(lmmaxvr
,nrcmtmax
))
46 zfmt(:,irc
)=conjg(wfmt1(:,irc
))*wfmt2(:,irc
)
48 call zgemm('N','N',lmmaxvr
,nrcmt(is
),lmmaxvr
,zone
,zfshtvr
,lmmaxvr
,zfmt
, &
49 lmmaxvr
,zzero
,zrhomt
,lmmaxvr
)
52 ! output density in spherical coordinates
54 zrhomt(:,irc
)=conjg(wfmt1(:,irc
))*wfmt2(:,irc
)