Commit 46600ea1 authored by Gregor Michalicek's avatar Gregor Michalicek

Fill orbcomp arrays correctly

parent 0b6e8931
......@@ -238,7 +238,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
IF (banddos%l_orb.AND.ANY((/banddos%alpha,banddos%beta,banddos%gamma/).NE.0.0)) THEN
CALL abcrot2(atoms,banddos,noccbd,eigVecCoeffs,ispin) ! rotate ab-coeffs
IF (PRESENT(orbcomp)) CALL orb_comp(ispin,ikpt,noccbd,atoms,noccbd,usdus,eigVecCoeffs,orbcomp)
IF (PRESENT(orbcomp)) CALL orb_comp(ispin,ikpt,noccbd,ev_list,atoms,noccbd,usdus,eigVecCoeffs,orbcomp)
END IF
ENDIF
CALL calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)
......
MODULE m_orbcomp
CONTAINS
SUBROUTINE orb_comp(jspin,ikpt,nobd,atoms,ne,usdus,eigVecCoeffs,orbcomp)
SUBROUTINE orb_comp(jspin,ikpt,nobd,ev_list,atoms,ne,usdus,eigVecCoeffs,orbcomp)
!***********************************************************************
! Calculates an orbital composition of eigen states
!
......@@ -41,6 +41,8 @@ CONTAINS
! ..Scalar Argument
INTEGER, INTENT (IN) :: nobd,ne,jspin,ikpt
INTEGER, INTENT (IN) :: ev_list(nobd)
! ..Local Scalars
INTEGER n,mt,ityp,imt,lm,lo
INTEGER l,lme,nate,lmaxe,jspe,nobc,nei
......@@ -321,8 +323,8 @@ CONTAINS
sum = sum + comp(lm)
ENDDO
cf = 100.0/sum
orbcomp%qmtp(n,mt,ikpt,jspin) = sum*100.0
orbcomp%comp(n,:,mt,ikpt,jspin) = comp(:)*cf
orbcomp%qmtp(ev_list(n),mt,ikpt,jspin) = sum*100.0
orbcomp%comp(ev_list(n),:,mt,ikpt,jspin) = comp(:)*cf
!----------------------------------------------------
ENDDO ! bands (n)
ENDDO ! atoms (imt) -> mt (=atoms%nat)
......
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