Commit 2075abfc authored by P.Buhl's avatar P.Buhl

add old commit from frank treating problem: Included lmax into the argument...

add old commit from frank treating problem:  Included lmax into the argument lists of wann_mmk0_sph.f and wann_mmk0_updown_sph.f. Use lmax(n) instead of lmaxd to restrict angular momentum summations. Without this bugfix sometimes NAN pops up in the rspauli.1 file if there is more than one atom type in the unit cell and the lmax of the various atom types are different
parent 8586f3fe
......@@ -14,7 +14,7 @@ c Y.Mokrousov 15.6.06
c***********************************************************************
CONTAINS
SUBROUTINE wann_mmk0_sph(
> llod,noccbd,nlod,natd,ntypd,lmaxd,lmd,
> llod,noccbd,nlod,natd,ntypd,lmaxd,lmax,lmd,
> ntype,neq,nlo,llo,acof,bcof,ccof,
> ddn,uulon,dulon,uloulopn,
= mmn)
......@@ -23,6 +23,7 @@ c .. scalar arguments ..
integer, intent (in) :: llod,nlod,natd,ntypd,lmaxd,lmd
integer, intent (in) :: ntype,noccbd
c .. array arguments ..
integer, intent (in) :: lmax(:) !(ntypd)
integer, intent (in) :: neq(ntypd)
integer, intent (in) :: nlo(ntypd),llo(nlod,ntypd)
real, intent (in) :: ddn(0:lmaxd,ntypd)
......@@ -52,7 +53,7 @@ c---> performs summations of the overlaps of the wavefunctions
nt1 = 1
do 130 n = 1,ntype
nt2 = nt1 + neq(n) - 1
do 120 l = 0,lmaxd
do 120 l = 0,lmax(n)
suma = cmplx(0.,0.)
sumb = cmplx(0.,0.)
ll1 = l* (l+1)
......
......@@ -1611,8 +1611,8 @@ c---> spherical contribution to mmn0-matrix
call wann_mmk0_sph(
> atoms%llod,noccbd,atoms%nlod,atoms%nat,atoms%ntype,
> atoms%lmaxd,lmd,atoms%ntype,atoms%neq,atoms%nlo,
> atoms%llo,acof(1:noccbd,:,:),
> atoms%lmaxd,atoms%lmax,lmd,atoms%ntype,atoms%neq,
> atoms%nlo,atoms%llo,acof(1:noccbd,:,:),
> bcof(1:noccbd,:,:),ccof(:,1:noccbd,:,:),
> usdus%ddn(:,:,jspin),usdus%uulon(:,:,jspin),
> usdus%dulon(:,:,jspin),usdus%uloulopn,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment