Commit 78ada2fa authored by Gregor Michalicek's avatar Gregor Michalicek

Refine input for next Fleur version

...at the moment this is buggy. I will fix it in the next commits.
parent 70049a9a
...@@ -63,11 +63,13 @@ CONTAINS ...@@ -63,11 +63,13 @@ CONTAINS
! modify as needed ! modify as needed
!alpha = (250.0/(MAXVAL(atoms%zatom)*input%xa))*((330./input%thetad)**2) !alpha = (250.0/(MAXVAL(atoms%zatom)*input%xa))*((330./input%thetad)**2)
CALL simple_step(input%forcealpha,0.25,force,displace) CALL simple_step(input%forcealpha,0.25,force,displace)
ELSEIF (input%forcemix==1) THEN ELSE IF (input%forcemix==1) THEN
CALL simple_cg(pos,force,displace) CALL simple_cg(pos,force,displace)
ELSE ELSE IF (input%forcemix==2) THEN
CALL simple_bfgs(pos,force,displace) CALL simple_bfgs(pos,force,displace)
ENDIF ELSE
CALL juDFT_error('unkown mixing scheme for forces', calledby='relaxation')
END IF
!Check for convergence of forces/displacements !Check for convergence of forces/displacements
l_conv=.TRUE. l_conv=.TRUE.
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
banddos%ndir = 0 ; vacuum%layers = 0 ; atoms%nflip(:) = 1 ; vacuum%izlay(:,:) = 0 banddos%ndir = 0 ; vacuum%layers = 0 ; atoms%nflip(:) = 1 ; vacuum%izlay(:,:) = 0
banddos%e_mcd_lo = -10.0 ; banddos%e_mcd_up = 0.0 banddos%e_mcd_lo = -10.0 ; banddos%e_mcd_up = 0.0
atoms%lda_u%l = -1 ; atoms%relax(1:2,:) = 1 ; atoms%relax(:,:) = 1 atoms%lda_u%l = -1 ; atoms%relax(1:2,:) = 1 ; atoms%relax(:,:) = 1
input%epsdisp = 0.00001 ; input%epsforce = 0.00001 ; input%forcealpha = 1.0 ; input%forcemix=0 input%epsdisp = 0.00001 ; input%epsforce = 0.00001 ; input%forcealpha = 1.0 ; input%forcemix = 2 ! BFGS is default.
sliceplot%e1s = 0.0 ; sliceplot%e2s = 0.0 ; banddos%e1_dos = 0.5 ; banddos%e2_dos = -0.5 ; input%tkb = 0.001 sliceplot%e1s = 0.0 ; sliceplot%e2s = 0.0 ; banddos%e1_dos = 0.5 ; banddos%e2_dos = -0.5 ; input%tkb = 0.001
banddos%sig_dos = 0.015 ; vacuum%tworkf = 0.0 ; input%scaleCell = 1.0 ; scpos = 1.0 banddos%sig_dos = 0.015 ; vacuum%tworkf = 0.0 ; input%scaleCell = 1.0 ; scpos = 1.0
input%scaleA1 = 1.0 ; input%scaleA2 = 1.0 ; input%scaleC = 1.0 input%scaleA1 = 1.0 ; input%scaleA2 = 1.0 ; input%scaleC = 1.0
......
...@@ -192,7 +192,7 @@ CONTAINS ...@@ -192,7 +192,7 @@ CONTAINS
! Check version of inp.xml ! Check version of inp.xml
versionString = xmlGetAttributeValue('/fleurInput/@fleurInputVersion') versionString = xmlGetAttributeValue('/fleurInput/@fleurInputVersion')
IF((TRIM(ADJUSTL(versionString)).NE.'0.27').AND.(TRIM(ADJUSTL(versionString)).NE.'0.28').AND.& IF((TRIM(ADJUSTL(versionString)).NE.'0.27').AND.(TRIM(ADJUSTL(versionString)).NE.'0.28').AND.&
(TRIM(ADJUSTL(versionString)).NE.'0.29')) THEN (TRIM(ADJUSTL(versionString)).NE.'0.29').AND.(TRIM(ADJUSTL(versionString)).NE.'0.30')) THEN
CALL juDFT_error('version number of inp.xml file is not compatible with this fleur version') CALL juDFT_error('version number of inp.xml file is not compatible with this fleur version')
END IF END IF
...@@ -672,13 +672,26 @@ input%preconditioning_param = evaluateFirstOnly(xmlGetAttributeValue('/fleurInpu ...@@ -672,13 +672,26 @@ input%preconditioning_param = evaluateFirstOnly(xmlGetAttributeValue('/fleurInpu
input%l_f = .FALSE. input%l_f = .FALSE.
input%qfix = 0 input%qfix = 0
input%forcemix = 2 ! BFGS is default.
IF (numberNodes.EQ.1) THEN IF (numberNodes.EQ.1) THEN
input%l_f = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_f')) input%l_f = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_f'))
input%forcealpha = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@forcealpha')) input%forcealpha = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@forcealpha'))
input%epsdisp = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@epsdisp')) input%epsdisp = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@epsdisp'))
input%epsforce = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@epsforce')) input%epsforce = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@epsforce'))
input%forcemix = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@forcemix'))
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@forcemix')))
SELECT CASE (valueString)
CASE ('straight')
input%forcemix = 0
CASE ('CG')
input%forcemix = 1
CASE ('BFGS')
input%forcemix = 2
CASE DEFAULT
CALL juDFT_error('Error: unknown force mixing scheme selected!', calledby='r_inpXML')
END SELECT
input%force_converged = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@force_converged')) input%force_converged = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@force_converged'))
input%qfix = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@qfix')) input%qfix = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@qfix'))
END IF END IF
......
...@@ -153,7 +153,7 @@ SUBROUTINE w_inpXML(& ...@@ -153,7 +153,7 @@ SUBROUTINE w_inpXML(&
REWIND (fileNum) REWIND (fileNum)
WRITE (fileNum,'(a)') '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' WRITE (fileNum,'(a)') '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
WRITE (fileNum,'(a)') '<fleurInput fleurInputVersion="0.29">' WRITE (fileNum,'(a)') '<fleurInput fleurInputVersion="0.30">'
END IF END IF
IF(PRESENT(name_opt)) THEN IF(PRESENT(name_opt)) THEN
...@@ -171,15 +171,15 @@ SUBROUTINE w_inpXML(& ...@@ -171,15 +171,15 @@ SUBROUTINE w_inpXML(&
! <scfLoop itmax="9" maxIterBroyd="99" imix="Anderson" alpha="0.05" preconditioning_param="0.0" spinf="2.00"/> ! <scfLoop itmax="9" maxIterBroyd="99" imix="Anderson" alpha="0.05" preconditioning_param="0.0" spinf="2.00"/>
120 FORMAT(' <scfLoop itmax="',i0,'" minDistance="',f0.8,'" maxIterBroyd="',i0,'" imix="',a,'" alpha="',f0.8,'" preconditioning_param="',f3.1,'" spinf="',f0.8,'"/>') 120 FORMAT(' <scfLoop itmax="',i0,'" minDistance="',f0.8,'" maxIterBroyd="',i0,'" imix="',a,'" alpha="',f0.8,'" preconditioning_param="',f3.1,'" spinf="',f0.8,'"/>')
SELECT CASE (input%imix) SELECT CASE (input%imix)
CASE (1) CASE (1)
mixingScheme='straight' mixingScheme='straight'
CASE (3) CASE (3)
mixingScheme='Broyden1' mixingScheme='Broyden1'
CASE (5) CASE (5)
mixingScheme='Broyden2' mixingScheme='Broyden2'
CASE (7) CASE (7)
mixingScheme='Anderson' mixingScheme='Anderson'
CASE DEFAULT CASE DEFAULT
mixingScheme='errorUnknownMixing' mixingScheme='errorUnknownMixing'
END SELECT END SELECT
WRITE (fileNum,120) input%itmax,input%minDistance,input%maxiter,TRIM(mixingScheme),input%alpha,input%preconditioning_param,input%spinf WRITE (fileNum,120) input%itmax,input%minDistance,input%maxiter,TRIM(mixingScheme),input%alpha,input%preconditioning_param,input%spinf
...@@ -220,8 +220,18 @@ SUBROUTINE w_inpXML(& ...@@ -220,8 +220,18 @@ SUBROUTINE w_inpXML(&
WRITE (fileNum,180) input%gw,input%secvar WRITE (fileNum,180) input%gw,input%secvar
! <geometryOptimization l_f="F" xa="2.00000" thetad="330.00000" epsdisp="0.00001" epsforce="0.00001"/> ! <geometryOptimization l_f="F" xa="2.00000" thetad="330.00000" epsdisp="0.00001" epsforce="0.00001"/>
190 FORMAT(' <geometryOptimization l_f="',l1,'" forcealpha="',f0.8,'" forcemix="',i0,'" epsdisp="',f0.8,'" epsforce="',f0.8,'"/>') 190 FORMAT(' <geometryOptimization l_f="',l1,'" forcealpha="',f0.8,'" forcemix="',a,'" epsdisp="',f0.8,'" epsforce="',f0.8,'"/>')
WRITE (fileNum,190) input%l_f,input%forcealpha,input%forcemix,input%epsdisp,input%epsforce SELECT CASE (input%forcemix)
CASE (1)
mixingScheme='straight'
CASE (2)
mixingScheme='CG'
CASE (3)
mixingScheme='BFGS'
CASE DEFAULT
mixingScheme='errorUnknownMixing'
END SELECT
WRITE (fileNum,190) input%l_f,input%forcealpha,TRIM(mixingScheme),input%epsdisp,input%epsforce
IF(input%gauss.AND.input%tria) THEN IF(input%gauss.AND.input%tria) THEN
STOP 'Error: bz integration modes gauss AND tria selected!' STOP 'Error: bz integration modes gauss AND tria selected!'
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<xsd:enumeration value="0.27"/> <xsd:enumeration value="0.27"/>
<xsd:enumeration value="0.28"/> <xsd:enumeration value="0.28"/>
<xsd:enumeration value="0.29"/> <xsd:enumeration value="0.29"/>
<xsd:enumeration value="0.30"/>
</xsd:restriction> </xsd:restriction>
</xsd:simpleType> </xsd:simpleType>
...@@ -559,7 +560,7 @@ ...@@ -559,7 +560,7 @@
<xsd:attribute default="99" name="maxIterBroyd" type="xsd:nonNegativeInteger" use="optional"/> <xsd:attribute default="99" name="maxIterBroyd" type="xsd:nonNegativeInteger" use="optional"/>
<xsd:attribute name="imix" type="MixingEnum" use="required"/> <xsd:attribute name="imix" type="MixingEnum" use="required"/>
<xsd:attribute name="alpha" type="xsd:string" use="required"/> <xsd:attribute name="alpha" type="xsd:string" use="required"/>
<xsd:attribute default="0.0" name="preconditioning_param" type="xsd:string" use="optional"/> <xsd:attribute default="0.0" name="precondParam" type="xsd:string" use="optional"/>
<xsd:attribute default="2.0" name="spinf" type="xsd:string" use="optional"/> <xsd:attribute default="2.0" name="spinf" type="xsd:string" use="optional"/>
<xsd:attribute default="0.0" name="minDistance" type="xsd:string" use="optional"/> <xsd:attribute default="0.0" name="minDistance" type="xsd:string" use="optional"/>
<xsd:attribute name="maxTimeToStartIter" type="xsd:string" use="optional"/> <xsd:attribute name="maxTimeToStartIter" type="xsd:string" use="optional"/>
...@@ -597,7 +598,7 @@ ...@@ -597,7 +598,7 @@
<xsd:attribute name="forcealpha" type="xsd:string" use="optional" default="0" /> <xsd:attribute name="forcealpha" type="xsd:string" use="optional" default="0" />
<xsd:attribute name="epsdisp" type="xsd:string" use="optional" default="0.001"/> <xsd:attribute name="epsdisp" type="xsd:string" use="optional" default="0.001"/>
<xsd:attribute name="epsforce" type="xsd:string" use="optional" default="0.001"/> <xsd:attribute name="epsforce" type="xsd:string" use="optional" default="0.001"/>
<xsd:attribute name="forcemix" type="xsd:integer" use="optional" default="3" /> <xsd:attribute name="forcemix" type="ForceMixEnum" use="optional" default="BFGS" />
<xsd:attribute name="qfix" type="xsd:integer" use="optional" default="0" /> <xsd:attribute name="qfix" type="xsd:integer" use="optional" default="0" />
<xsd:attribute name="force_converged" type="xsd:string" use="optional" default="0.00001" /> <xsd:attribute name="force_converged" type="xsd:string" use="optional" default="0.00001" />
</xsd:complexType> </xsd:complexType>
...@@ -828,7 +829,7 @@ ...@@ -828,7 +829,7 @@
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="UnfoldingBandType"> <xsd:complexType name="UnfoldingBandType">
<xsd:attribute name="unfoldband" type="FleurBool" use="required"/> <xsd:attribute name="unfoldBand" type="FleurBool" use="required"/>
<xsd:attribute name="supercellX" type="xsd:positiveInteger" use="required"/> <xsd:attribute name="supercellX" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="supercellY" type="xsd:positiveInteger" use="required"/> <xsd:attribute name="supercellY" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="supercellZ" type="xsd:positiveInteger" use="required"/> <xsd:attribute name="supercellZ" type="xsd:positiveInteger" use="required"/>
...@@ -937,10 +938,18 @@ ...@@ -937,10 +938,18 @@
<xsd:enumeration value="Broyden1"/> <xsd:enumeration value="Broyden1"/>
<xsd:enumeration value="Broyden2"/> <xsd:enumeration value="Broyden2"/>
<xsd:enumeration value="Anderson"/> <xsd:enumeration value="Anderson"/>
<xsd:enumeration value="Pulay"/> <xsd:enumeration value="Pulay"/>
<xsd:enumeration value="rPulay"/> <xsd:enumeration value="rPulay"/>
<xsd:enumeration value="pPulay"/> <xsd:enumeration value="pPulay"/>
<xsd:enumeration value="aPulay"/> <xsd:enumeration value="aPulay"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ForceMixEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="straight"/>
<xsd:enumeration value="CG"/>
<xsd:enumeration value="BFGS"/>
</xsd:restriction> </xsd:restriction>
</xsd:simpleType> </xsd:simpleType>
......
This diff is collapsed.
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
input%scaleA2 = 1.0 input%scaleA2 = 1.0
input%scaleC = 1.0 input%scaleC = 1.0
input%forcealpha = 1.0 input%forcealpha = 1.0
input%forcemix = 0 input%forcemix = 2 ! BFGS is default.
input%epsdisp = 0.00001 input%epsdisp = 0.00001
input%epsforce = 0.00001 input%epsforce = 0.00001
input%numBandsKPoints = -1 input%numBandsKPoints = -1
......
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