Commit 25238930 authored by Gregor Michalicek's avatar Gregor Michalicek

Some work on the input for the mixed broduct basis

parent fcd141ab
......@@ -85,9 +85,9 @@
! REAL, PARAMETER :: eps=0.00000001
! ..
!HF added for HF and hybrid functionals
REAL :: gcutm,tolerance
REAL :: gcutm
REAL :: taual_hyb(3,atoms%nat)
INTEGER :: selct(4,atoms%ntype),lcutm(atoms%ntype)
INTEGER :: lcutm(atoms%ntype)
INTEGER :: selct2(4,atoms%ntype)
INTEGER :: bands
LOGICAL :: l_gamma
......@@ -295,12 +295,8 @@
!HF added for HF and hybrid functionals
gcutm = input%rkmax - 0.5
tolerance = 1e-4
hybrid%tolerance1 = 1e-4
taual_hyb = atoms%taual
selct(1,:) = 4
selct(2,:) = 0
selct(3,:) = 4
selct(4,:) = 2
lcutm = 4
selct2(1,:) = 4
selct2(2,:) = 0
......@@ -337,6 +333,7 @@
input%rkmax = real(NINT( input%rkmax * 10 ) / 10.)
xcpot%gmaxxc = real(NINT( xcpot%gmaxxc * 10 ) / 10.)
gcutm = real(INT( gcutm * 10 ) / 10.)
hybrid%gcutm1 = gcutm
IF (input%film) THEN
vacuum%dvac = real(NINT(vacuum%dvac*100)/100.)
dtild = real(NINT(dtild*100)/100.)
......
......@@ -1134,7 +1134,7 @@ SUBROUTINE r_inpXML(&
END IF
hybrid%l_hybrid=xcpot%is_hybrid()
IF (hybrid%l_hybrid) ALLOCATE(hybrid%lcutm1(atoms%ntype),hybrid%lcutwf(atoms%ntype),hybrid%select1(4,atoms%ntype))
ALLOCATE(hybrid%lcutm1(atoms%ntype),hybrid%lcutwf(atoms%ntype),hybrid%select1(4,atoms%ntype))
obsolete%lwb=.FALSE.
IF (xcpot%is_gga()) THEN
......@@ -1147,17 +1147,16 @@ SUBROUTINE r_inpXML(&
END IF
!!! Hybrid stuff
numberNodes = xmlGetNumberOfNodes('/fleurInput/xcFunctional/hybridFunctional')
!!! Mixed product basis stuff
numberNodes = xmlGetNumberOfNodes('/fleurInput/calculationSetup/prodBasis')
IF (numberNodes==0) THEN
IF (hybrid%l_hybrid) CALL judft_error("Hybrid input missing in inp.xml")
IF (hybrid%l_hybrid) CALL judft_error("Mixed product basis input missing in inp.xml")
ELSE
IF (.NOT.hybrid%l_hybrid) CALL judft_error("Hybrid parameters specified but no hybrid functional used")
hybrid%gcutm1=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/hybridFunctional/@gcutm'))
hybrid%tolerance1=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/hybridFunctional/@tolerance'))
hybrid%ewaldlambda=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/hybridFunctional/@ewaldlambda'))
hybrid%lexp=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/hybridFunctional/@lexp'))
hybrid%bands1=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/xcFunctional/hybridFunctional/@bands'))
hybrid%gcutm1=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@gcutm'))
hybrid%tolerance1=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@tolerance'))
hybrid%ewaldlambda=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@ewaldlambda'))
hybrid%lexp=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@lexp'))
hybrid%bands1=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@bands'))
ENDIF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......
......@@ -196,6 +196,10 @@ SUBROUTINE w_inpXML(&
150 FORMAT(' <soc theta="',f0.8,'" phi="',f0.8,'" l_soc="',l1,'" spav="',l1,'"/>')
WRITE (fileNum,150) noco%theta,noco%phi,noco%l_soc,noco%l_spav
IF (l_explicit.OR.hybrid%l_hybrid) THEN
155 FORMAT(' <prodBasis gcutm="',f0.8,'" tolerance="',f0.8,'" ewaldlambda="',i0,'" lexp="',i0,'" bands="',i0,'"/>')
WRITE (fileNum,155) hybrid%gcutm1,hybrid%tolerance1,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
END IF
IF (l_nocoOpt.OR.l_explicit) THEN
160 FORMAT(' <nocoParams l_ss="',l1,'" l_mperp="',l1,'" l_constr="',l1,&
......@@ -451,6 +455,13 @@ SUBROUTINE w_inpXML(&
WRITE (fileNum,321) enpara%qn_el(0:3,iAtomType,1)
END IF
IF(l_explicit.OR.hybrid%l_hybrid) THEN
315 FORMAT(' <prodBasis lcutm="',i0,'" lcutwf="',i0,'" select="',a,'"/>')
line = ''
WRITE(line,'(i0,1x,i0,1x,i0,1x,i0)') hybrid%select1(1:4,iAtomType)
WRITE (fileNum,315) hybrid%lcutm1(iAtomType), hybrid%lcutwf(iAtomType), TRIM(ADJUSTL(line))
END IF
IF(ANY(xmlElectronStates(:,iAtomType).NE.noState_const)) THEN
endCoreStates = 1
startCoreStates = 1
......
......@@ -44,6 +44,7 @@
<xsd:element name="coreElectrons" type="CoreElectronsType"/>
<xsd:element name="magnetism" type="MagnetismType"/>
<xsd:element name="bzIntegration" type="BZIntegrationType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="prodBasis" type="ProdBasisIRType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="soc" type="SOCType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="nocoParams" type="NocoParamsType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="oneDParams" type="OneDParamType"/>
......@@ -268,22 +269,19 @@
<xsd:element maxOccurs="1" minOccurs="0" name="libXC" type="XCLibXCType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="xcParams" type="XCParamsType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="ggaPrinting" type="GGAPrintingType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="hybridFunctional" type="HybFunctionalType"/>
</xsd:sequence>
<xsd:attribute name="name" type="XCFunctionalEnum" use="required"/>
<xsd:attribute default="F" name="relativisticCorrections" type="FleurBool" use="optional"/>
</xsd:complexType>
<xsd:complexType name="HybFunctionalType">
<xsd:attribute name="gcutm" type="xsd:integer" use="required"/>
<xsd:complexType name="ProdBasisIRType">
<xsd:attribute name="gcutm" type="xsd:double" use="required"/>
<xsd:attribute name="bands" type="xsd:integer" use="required"/>
<xsd:attribute name="tolerance" type="xsd:double" use="optional" default="0.00001"/>
<xsd:attribute name="lexp" type="xsd:integer" use="optional" default="16"/>
<xsd:attribute name="ewaldlambda" type="xsd:integer" use="optional" default="3"/>
</xsd:complexType>
<xsd:simpleType name="XCFunctionalEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="x-a"/>
......@@ -335,7 +333,7 @@
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ProdBasisType">
<xsd:complexType name="ProdBasisMTType">
<xsd:attribute name="lcutm" type="xsd:integer" use="required"/>
<xsd:attribute name="lcutwf" type="xsd:integer" use="required"/>
<xsd:attribute name="select" type="xsd:string" use="optional" default="4 0 4 2"/>
......@@ -360,7 +358,7 @@
<xsd:element name="mtSphere" type="MTSphereType"/>
<xsd:element name="atomicCutoffs" type="AtomicCutoffsType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="energyParameters" type="EnergyParametersType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="prodBasis" type="ProdBasisType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="prodBasis" type="ProdBasisMTType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="special" type="SpecialType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="force" type="ForceType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="electronConfig" type="ElectronConfigType"/>
......
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