diff --git a/wannier/wann_mmk0_sph.f b/wannier/wann_mmk0_sph.f index 1884a2a1fe4732c12616f0da1087d18e32d526be..c8132372a2e094cbe240fedea9ef8696ec8eff25 100644 --- a/wannier/wann_mmk0_sph.f +++ b/wannier/wann_mmk0_sph.f @@ -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) diff --git a/wannier/wannier.F b/wannier/wannier.F index e9a3d8026e33d1ff15ec9b07b9ce3e3166371afa..428b38162bbe042ff260f1d829175b738ab91851 100644 --- a/wannier/wannier.F +++ b/wannier/wannier.F @@ -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,