diff --git a/eigen/hsmt_ab.F90 b/eigen/hsmt_ab.F90 index 86c7953debddcabd302755d2619ad08bbaa97a9f..b2bd65980c1071677bc174f45c4a8f474125b1ca 100644 --- a/eigen/hsmt_ab.F90 +++ b/eigen/hsmt_ab.F90 @@ -227,7 +227,7 @@ CONTAINS !\$OMP& SHARED(lapw,gkrot,lmax,c_ph,iintsp,ab,fj,gj,abclo,cell,atoms) & !\$OMP& SHARED(alo1,blo1,clo1,ab_size,na,n) & !\$OMP& PRIVATE(k,vmult,ylm,l,ll1,m,lm,term,invsfct,lo,nkvec) - DO k = 1,lapw%nv(1) + DO k = 1,lapw%nv(iintsp) !--> generate spherical harmonics vmult(:) = gkrot(:,k) CALL ylm4(lmax,vmult,ylm) diff --git a/eigen/tlmplm.F90 b/eigen/tlmplm.F90 index 47e49acdcc46301d86d0789be4b9a88aea66506a..10b0f885b782f452cea6117c4cea9b62ce0b0a41 100644 --- a/eigen/tlmplm.F90 +++ b/eigen/tlmplm.F90 @@ -69,7 +69,7 @@ CONTAINS !---> loop over non-spherical components of the potential: must !---> satisfy the triangular conditions and that l'+l+lamda even !---> (conditions from the gaunt coefficient) - DO lh = 1, nh + DO lh = MERGE(1,0,jspin<3), nh lamda = sphhar%llh(lh,nsym) lmin = lp - l lmx = lp + l @@ -117,7 +117,7 @@ CONTAINS lmp = lp* (lp+1) + mp lmpl = (lmp* (lmp+1))/2 !---> loop over lattice harmonics - DO lh = 1, nh + DO lh = MERGE(1,0,jspin<3), nh lamda = sphhar%llh(lh,nsym) lmin0 = abs(lp-lamda) IF (lmin0.GT.lp) CYCLE