Commit 8202ed19 authored by Daniel Wortmann's avatar Daniel Wortmann

Fixes for first variation SOC

parent 0991952b
......@@ -31,16 +31,21 @@ SUBROUTINE orbMagMoms(input,atoms,noco,clmom)
WRITE (6,FMT=9020)
CALL openXMLElement('orbitalMagneticMomentsInMTSpheres',(/'units'/),(/'muBohr'/))
DO iType = 1, atoms%ntype
IF (noco%l_noco) THEN
thetai = noco%beta(iType)
phii = noco%alph(iType)
END IF
! magn. moment(-)
slxmom = clmom(1,iType,1)+clmom(1,iType,2)
slymom = clmom(2,iType,1)+clmom(2,iType,2)
slmom = clmom(3,iType,1)+clmom(3,iType,2)
IF (noco%l_noco) THEN
thetai = noco%beta(iType)
phii = noco%alph(iType)
!Fix of sign of moment in first variation calculations. Perhaps it would be better to understand this :-(
slxmom=-1*slxmom
slymom=-1*slymom
slmom=-1*slmom
END IF
! rotation: orbital moment || spin moment (extended to incude phi - hopefully)
slmom = cos(thetai)*slmom + sin(thetai)*(cos(phii)*slxmom + sin(phii)*slymom)
clmom(3,iType,1) = cos(thetai)*clmom(3,iType,1) + &
......
......@@ -48,13 +48,13 @@ CONTAINS
ii=-1*ii
in = stars%ig(ii(1),ii(2),ii(3))
IF (in.EQ.0) CYCLE
th = stars%rgphs(ii(1),ii(2),ii(3))*CONJG(vpw(in,3))
th = stars%rgphs(ii(1),ii(2),ii(3))*vpw(in,3)
ts=0.0
ELSEIF(ispin==2.and.jspin==1) THEN
! ii = -1*ii
in = stars%ig(ii(1),ii(2),ii(3))
IF (in.EQ.0) CYCLE
th = stars%rgphs(ii(1),ii(2),ii(3))*vpw(in,3)
th = stars%rgphs(ii(1),ii(2),ii(3))*conjg(vpw(in,3))
ts=0.0
ELSE
!--> determine index and phase factor
......
......@@ -53,7 +53,7 @@ CONTAINS
REAL u(vacuum%nmzd,size(duz,1),input%jspins),ud(vacuum%nmzd,size(duz,1),input%jspins)
REAL v(3),x(vacuum%nmzd), qssbti(2,2)
! ..
fac=MERGE(1.0,-1.0,jspin1<=jspin2)
fac=MERGE(1.0,-1.0,jspin1>=jspin2)
ipot=MERGE(jspin1,3,jspin1==jspin2)
tuuv=0.0;tudv=0.0;tddv=0.0;tduv=0.0
......
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