Commit ba42f883 authored by Robin Hilgers's avatar Robin Hilgers

Introduced switch for removing magnetisation from interstitial after flipping magnetisation.

parent 1f7b4b81
......@@ -141,7 +141,7 @@
input%l_bmt= .false. ; input%eonly = .false.
input%gauss= .false. ; input%tria = .false.
sliceplot%slice= .false. ; input%swsp = .false.
input%lflip= .false. ; banddos%vacdos= .false. ; input%integ = .false.
input%lflip= .false. ; input%l_removeMagnetisationFromInterstitial=.FALSE. ;banddos%vacdos= .false. ; input%integ = .false.
sliceplot%iplot= 0
input%pallst = .false. ; obsolete%lwb = .false. ; vacuum%starcoeff = .false.
input%strho = .false. ; input%l_f = .false. ; atoms%l_geo(:) = .true.
......
......@@ -368,6 +368,7 @@ CONTAINS
noco%l_noco = evaluateFirstBoolOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/magnetism/@l_noco'))
input%swsp = evaluateFirstBoolOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/magnetism/@swsp'))
input%lflip = evaluateFirstBoolOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/magnetism/@lflip'))
input%l_removeMagnetisationFromInterstitial=evaluateFirstBoolOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/magnetism/@l_removeMagnetisationFromInterstitial'))
input%fixed_moment=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/magnetism/@fixed_moment'))
IF (ABS(input%fixed_moment)>1E-8.AND.(input%jspins==1.OR.noco%l_noco)) CALL judft_error("Fixed moment only in collinear calculations with two spins")
......
......@@ -188,9 +188,9 @@ SUBROUTINE w_inpXML(&
130 FORMAT(' <coreElectrons ctail="',l1,'" frcor="',l1,'" kcrel="',i0,'" coretail_lmax="',i0,'"/>')
WRITE (fileNum,130) input%ctail,input%frcor,input%kcrel,input%coretail_lmax
! <magnetism jspins="1" l_noco="F" l_J="F" swsp="F" lflip="F"/>
140 FORMAT(' <magnetism jspins="',i0,'" l_noco="',l1,'" swsp="',l1,'" lflip="',l1,'"/>')
WRITE (fileNum,140) input%jspins,noco%l_noco,input%swsp,input%lflip
! <magnetism jspins="1" l_noco="F" l_J="F" swsp="F" lflip="F" l_removeMagnetisationFromInterstitial="F"/>
140 FORMAT(' <magnetism jspins="',i0,'" l_noco="',l1,'" swsp="',l1,'" lflip="',l1,'" l_removeMagnetisationFromInterstitial="',l1,'"/>')
WRITE (fileNum,140) input%jspins,noco%l_noco,input%swsp,input%lflip, input%l_removeMagnetisationFromInterstitial
! <soc theta="0.00000" phi="0.00000" l_soc="F" spav="F" off="F" soc66="F"/>
150 FORMAT(' <soc theta="',f0.8,'" phi="',f0.8,'" l_soc="',l1,'" spav="',l1,'"/>')
......
......@@ -150,6 +150,7 @@
<xsd:attribute default="F" name="l_J" type="FleurBool" use="optional"/>
<xsd:attribute default="F" name="swsp" type="FleurBool" use="optional"/>
<xsd:attribute default="F" name="lflip" type="FleurBool" use="optional"/>
<xsd:attribute default="F" name="l_removeMagnetisationFromInterstitial" type="FleurBool" use="optional"/>
<xsd:attribute default="0.0" name="fixed_moment" type="xsd:string" use="optional"/>
</xsd:complexType>
......
......@@ -43,6 +43,9 @@ CONTAINS
!
! sm1+/_ = (sm+/_) + alpha* F(sm)
! +/-0.5alpha(spinf-1)( F(sm+) + F(sm-) )
! The F(sm+) and F(sm-) terms do not only include diagonal elements of the density matrices (as one could think)
! but also contain off-diag. elements (jspins=3,4) of the density matrices in the fully noncolinear case.
! Choosing a spinf>1 therefore might be helpful when it comes to converging noncolinear systems.
END IF
END SUBROUTINE stmix
......
......@@ -40,7 +40,7 @@ CONTAINS
! .. Local Arrays ..
INTEGER i(43),ierr(3)
REAL r(34)
LOGICAL l(45)
LOGICAL l(46)
! ..
! .. External Subroutines..
#ifdef CPP_MPI
......@@ -80,6 +80,7 @@ CONTAINS
l(38)=field%efield%l_segmented
l(39)=sym%symor ; l(40)=input%frcor ; l(41)=input%tria ; l(42)=field%efield%dirichlet
l(43)=field%efield%l_dirichlet_coeff ; l(44)=input%l_coreSpec ; l(45)=input%ldauLinMix
l(46)=input%l_removeMagnetisationFromInterstitial
ENDIF
!
......@@ -122,6 +123,7 @@ CONTAINS
banddos%unfoldband=l(35)
noco%l_mtNocoPot=l(36)
noco%l_spav=l(15)
input%l_removeMagnetisationFromInterstitial=l(46)
!
! -> Broadcast the arrays:
IF (field%efield%l_segmented) THEN
......
......@@ -160,6 +160,11 @@ END DO
END DO
END IF
IF (input%l_removeMagnetisationFromInterstitial) THEN
!!This Segment takes care that no interstitial magnetization is written in the the density. Meaning: Off diagonal elements of density matrix set to 0 and diagonal elements of density matrix are equal to each other.
END IF
! write the spin-polarized density
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,-1.0,0.0,.FALSE.,den)
......
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