Commit e2aa49af authored by Gregor Michalicek's avatar Gregor Michalicek

Write out orbital magnetic moments to out.xml

Note: This is not yet tested.
parent 07fcfc3e
......@@ -231,7 +231,7 @@ CONTAINS
attributes = ''
WRITE(attributes(1),'(f20.10)') results%ef
WRITE(attributes(2),'(a)') 'htr'
WRITE(attributes(2),'(a)') 'Htr'
IF (mpi%irank.EQ.0) CALL writeXMLElement('FermiEnergy',(/'value','units'/),attributes(1:2))
RETURN
......
......@@ -414,6 +414,7 @@ enddo
phii = noco%phi
WRITE (6,FMT=9020)
WRITE (16,FMT=9020)
CALL openXMLElement('orbitalMagneticMomentsInMTSpheres',(/'units'/),(/'muBohr'/))
DO n = 1,atoms%ntype
IF (noco%l_noco) THEN
thetai = noco%beta(n)
......@@ -435,9 +436,18 @@ enddo
(cos(phii)*clmom(1,n,2) + sin(phii)*clmom(2,n,2))
WRITE (6,FMT=8030) n,slmom,(clmom(3,n,j),j=1,2)
WRITE (16,FMT=8030) n,slmom,(clmom(3,n,j),j=1,2)
attributes = ''
WRITE(attributes(1),'(i0)') n
WRITE(attributes(2),'(f15.10)') slmom
WRITE(attributes(3),'(f15.10)') clmom(3,n,1)
WRITE(attributes(4),'(f15.10)') clmom(3,n,2)
CALL writeXMLElementFormPoly('orbMagMoment',(/'atomType ','moment ','spinUpCharge ',&
'spinDownCharge'/),&
attributes,reshape((/8,6,12,14,6,15,15,15/),(/4,2/)))
! WRITE (16,FMT=8030) n,slxmom,(clmom(1,n,j),j=1,2)
! WRITE (16,FMT=8030) n,slymom,(clmom(2,n,j),j=1,2)
END DO
CALL closeXMLElement('orbitalMagneticMomentsInMTSpheres')
END IF
END IF
! block 2 unnecessary for slicing: end
......
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