Commit ff0cec65 authored by Daniel Wortmann's avatar Daniel Wortmann

Fixed bugs and updated more tests

parent be8a712f
......@@ -71,7 +71,7 @@ CONTAINS
cell%bmat=tpi_const*cell%bmat
IF (cell%z1>0) THEN
cell%vol = (cell%omtil/cell%amat(3,3))*cell%z1
cell%vol = (cell%omtil/cell%amat(3,3))*cell%z1*2
cell%area = cell%omtil/cell%amat(3,3)
ELSE
cell%vol = cell%omtil
......@@ -125,8 +125,9 @@ CONTAINS
if (xml%GetNumberOfNodes('/fleurInput/cell/filmLattice')==1) then
path= '/fleurInput/cell/filmLattice'
this%z1=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dvac'))/2
dtild=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dtilda'))
this%z1=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dVac'))/2
dvac=this%z1*2
dtild=evaluateFirstOnly(xml%GetAttributeValue(trim(path)//'/@dTilda'))
else
dvac=0.0
path = '/fleurInput/cell/bulkLattice'
......@@ -148,7 +149,7 @@ CONTAINS
this%amat(3,3) = evaluateFirst(valueString)
IF (dvac>0) THEN
this%amat(3,3)=2*this%z1
this%amat(3,3)=dtild
ENDIF
this%amat=this%amat*scale
......
......@@ -138,10 +138,30 @@ MODULE m_types_oneD
USE m_types_atoms
CLASS(t_oned),INTENT(inout)::oneD
TYPE(t_atoms),INTENT(in)::atoms
oneD%odd%nq2 = oneD%odd%n2d
oneD%odd%kimax2 = oneD%odd%nq2 - 1
oneD%odd%nat = atoms%nat
oneD%odi%d1 = oneD%odd%d1 ; oneD%odi%mb = oneD%odd%mb ; oneD%odi%M = oneD%odd%M
oneD%odi%k3 = oneD%odd%k3 ; oneD%odi%chi = oneD%odd%chi ; oneD%odi%rot = oneD%odd%rot
oneD%odi%invs = oneD%odd%invs ; oneD%odi%zrfs = oneD%odd%zrfs
oneD%odi%n2d = oneD%odd%n2d ; oneD%odi%nq2 = oneD%odd%nq2 ; oneD%odi%nn2d = oneD%odd%nn2d
oneD%odi%kimax2 = oneD%odd%kimax2 ; oneD%odi%m_cyl = oneD%odd%m_cyl
oneD%odi%ig => oneD%ig1 ; oneD%odi%kv => oneD%kv1 ; oneD%odi%nst2 => oneD%nstr1
oneD%ods%nop = oneD%odd%nop ; oneD%ods%nat = oneD%odd%nat
oneD%ods%mrot => oneD%mrot1 ; oneD%ods%tau => oneD%tau1 ; oneD%ods%ngopr => oneD%ngopr1
oneD%ods%invtab => oneD%invtab1 ; oneD%ods%multab => oneD%multab1
oneD%odl%nn2d = oneD%odd%nn2d
oneD%odl%igf => oneD%igfft1 ; oneD%odl%pgf => oneD%pgfft1
oneD%odg%nn2d = oneD%odd%nn2d
oneD%odg%pgfx => oneD%pgft1x ; oneD%odg%pgfy => oneD%pgft1y
oneD%odg%pgfxx => oneD%pgft1xx ; oneD%odg%pgfyy => oneD%pgft1yy ; oneD%odg%pgfxy => oneD%pgft1xy
oneD%odd%nq2 = oneD%odd%n2d
! Initialize missing 1D code arrays
if (associated(oneD%ig1)) return
ALLOCATE (oneD%ig1(-oneD%odd%k3:oneD%odd%k3,-oneD%odd%M:oneD%odd%M))
ALLOCATE (oneD%kv1(2,oneD%odd%n2d),oneD%nstr1(oneD%odd%n2d))
ALLOCATE (oneD%ngopr1(atoms%nat),oneD%mrot1(3,3,oneD%odd%nop),oneD%tau1(3,oneD%odd%nop))
......
......@@ -32,6 +32,7 @@ MODULE m_types_vacuum
CONTAINS
PROCEDURE :: read_xml
PROCEDURE :: mpi_bc => mpi_bc_vacuum
PROCEDURE :: init =>vacuum_init
END TYPE t_vacuum
CONTAINS
......@@ -95,4 +96,13 @@ MODULE m_types_vacuum
ALLOCATE(this%izlay(this%layerd,2))
ENDIF
END SUBROUTINE read_xml
subroutine vacuum_init(this,sym)
use m_types_sym
CLASS(t_vacuum),INTENT(INOUT)::this
TYPE(t_sym),INTENT(IN)::sym
if (sym%invs.or.sym%zrfs) this%nvac=1
end subroutine vacuum_init
END MODULE m_types_vacuum
......@@ -78,7 +78,7 @@ SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,kpts,&
call cell%init(DOT_PRODUCT(atoms%volmts(:),atoms%neq(:)))
call atoms%init(cell)
CALL sym%init(cell,input%film)
call vacuum%init(sym)
CALL enpara%init_enpara(atoms,input%jspins,input%film,enparaXML)
CALL make_sym(sym,cell,atoms,noco,oneD,input)
......@@ -113,7 +113,6 @@ SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,kpts,&
CALL ylmnorm_init(atoms%lmaxd)
call oneD%init(atoms)
! Initialize missing hybrid functionals arrays
ALLOCATE (hybrid%nindx(0:atoms%lmaxd,atoms%ntype))
......@@ -165,6 +164,7 @@ SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,kpts,&
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! End of input postprocessing (calculate missing parameters)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
call oneD%init(atoms)
END SUBROUTINE postprocessInput
......
......@@ -109,7 +109,7 @@ CONTAINS
INQUIRE(file='kpts',exist=l_exist)
IF (.NOT.l_exist) CALL judft_error("Could not read 'kpts' file")
OPEN(99,file='kpts')
READ(99,*,iostat=ios) kpts%nkpt,scale,wscale
READ(99,"(i5,2f20.10,3x,l1)",iostat=ios) kpts%nkpt,scale,wscale
ALLOCATE(kpts%bk(3,kpts%nkpt),kpts%wtkpt(kpts%nkpt))
DO n=1,kpts%nkpt
IF (.NOT.film) THEN
......@@ -119,7 +119,12 @@ CONTAINS
kpts%bk(3,n)=0.0
ENDIF
ENDDO
CLOSE(99)
!check for tetraeder
READ(99,*,err=100,end=100) kpts%ntet
ALLOCATE(kpts%ntetra(4,kpts%ntet),kpts%voltet(kpts%ntet))
read(99,*) kpts%ntetra
read(99,*) kpts%voltet
100 CLOSE(99)
IF (ios.NE.0) CALL judft_error("Error while reading 'kpts' file")
IF (scale>0.0) kpts%bk=kpts%bk/scale
IF (wscale>0.0) kpts%wtkpt=kpts%wtkpt/wscale
......
......@@ -247,6 +247,12 @@
<xsd:list itemType="xsd:integer"/>
</xsd:simpleType>
<xsd:simpleType name="Integer4DVecType">
<xsd:restriction base="IntegerVecType">
<xsd:length value="4"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="SymOpMatrixType">
<xsd:sequence>
<xsd:element name="row-1" type="Double4DVecType"/>
......@@ -513,13 +519,7 @@
<xsd:complexType name="BZIntegrationType">
<xsd:sequence>
<xsd:choice>
<xsd:element name="kPointMesh" type="KPointMeshType"/>
<xsd:element name="kPointCount" type="KPointCountType"/>
<xsd:element name="kPointList" type="KPointListType"/>
<xsd:element name="kPointDensity" type="KPointDensityType"/>
</xsd:choice>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="altKPointSet" type="AltKPointSetType"/>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="kPointList" type="KPointListType"/>
</xsd:sequence>
<xsd:attribute name="valenceElectrons" type="xsd:string" use="optional"/>
<xsd:attribute default="hist" name="mode" type="BZIntegrationModeEnum" use="optional"/>
......@@ -605,25 +605,6 @@
<xsd:attribute name="sigma" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="AltKPointSetType">
<xsd:sequence>
<xsd:choice>
<xsd:element name="kPointMesh" type="KPointMeshType"/>
<xsd:element name="kPointCount" type="KPointCountType"/>
<xsd:element name="kPointList" type="KPointListType"/>
<xsd:element name="kPointDensity" type="KPointDensityType"/>
<xsd:element name="kPointListFile" type="KPointListFileType"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="purpose" type="KPointSetPurposeEnum" use="required"/>
</xsd:complexType>
<xsd:complexType name="KPointMeshType">
<xsd:attribute name="nx" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="ny" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="nz" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="gamma" type="FleurBool" use="required"/>
</xsd:complexType>
<xsd:complexType name="KPointCountType">
<xsd:sequence>
......@@ -636,11 +617,27 @@
<xsd:complexType name="KPointListType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="kPoint" type="KPointType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="tetraeder" type="TetraederType"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="count" type="xsd:nonNegativeInteger" use="optional"/>
</xsd:complexType>
<xsd:complexType name="TetraederType">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="tet" type="TetType"/>
</xsd:sequence>
<xsd:attribute name="ntet" type="xsd:nonNegativeInteger" use="optional"/>
</xsd:complexType>
<xsd:complexType name="TetType">
<xsd:simpleContent>
<xsd:extension base="Integer4DVecType">
<xsd:attribute name="vol" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="KPointDensityType">
<xsd:attribute name="denX" type="xsd:double" use="required"/>
<xsd:attribute name="denY" type="xsd:double" use="required"/>
......
......@@ -54,7 +54,7 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
REAL, ALLOCATABLE :: vbar(:,:)
REAL, ALLOCATABLE :: rat(:,:),eig(:,:,:),sigm(:)
REAL, ALLOCATABLE :: rh(:,:,:),rh1(:,:,:),rhoss(:,:)
REAL, ALLOCATABLE :: vacpar(:)
REAL :: vacpar(2)
INTEGER lnum(29,atoms%ntype),nst(atoms%ntype)
INTEGER jrc(atoms%ntype)
LOGICAL l_found(0:3),llo_found(atoms%nlod),l_enpara,l_st
......@@ -321,7 +321,13 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
CALL enpara%WRITE(atoms,input%jspins,input%film)
END IF
END IF ! mpi%irank == 0
END SUBROUTINE stden
DEALLOCATE ( rat,eig )
DEALLOCATE ( rh,rh1)
DEALLOCATE ( vbar,sigm )
DEALLOCATE ( rhoss )
deallocate(den%vacz)
deallocate(den%vacxy)
END SUBROUTINE stden
END MODULE m_stden
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<fleurInput fleurInputVersion="0.27">
<fleurInput fleurInputVersion="0.30">
<comment>
Fe Monolayer Ag lattice constant
Fe Monol
</comment>
<calculationSetup>
<cutoffs Kmax="3.80000000" Gmax="11.60000000" GmaxXC="9.60000000" numbands="0"/>
<scfLoop itmax="1" maxIterBroyd="99" imix="Anderson" alpha=".05000000" spinf="2.00000000"/>
<coreElectrons ctail="T" frcor="F" kcrel="0"/>
<magnetism jspins="2" l_noco="F" l_J="F" swsp="F" lflip="F"/>
<soc theta=".00000000" phi=".00000000" l_soc="F" spav="F" off="F" soc66="T"/>
<expertModes gw="0" pot8="F" eig66="F" lpr="0" isec1="99" secvar="F"/>
<scfLoop itmax="1" minDistance=".00001000" maxIterBroyd="99" imix="Anderson" alpha=".05000000" precondParam="0.0" spinf="2.00000000"/>
<coreElectrons ctail="T" frcor="F" kcrel="0" />
<magnetism jspins="2" l_noco="F" swsp="F" lflip="F"/>
<soc theta=".10000000" phi=".00000000" l_soc="F" spav="F"/>
<expertModes gw="0" secvar="F"/>
<geometryOptimization l_f="F" forcealpha="1.00000000" forcemix="BFGS" epsdisp=".00001000" epsforce=".00001000"/>
<ldaU l_linMix="F" mixParam=".100000" spinf="2.000000"/>
<bzIntegration valenceElectrons="8.00000000" mode="hist" fermiSmearingEnergy=".00100000">
<kPointCount count="8" gamma="F"/>
<kPointList name="default" count="2">
<kPoint weight=" 2.000000"> 0.250000 0.250000 0.000000</kPoint>
<kPoint weight=" 2.000000"> 0.250000 -0.250000 0.000000</kPoint>
</kPointList>
</bzIntegration>
<energyParameterLimits ellow="-.80000000" elup=".50000000"/>
<symmetryOperations>
<symOp>
<row-1>1 0 0 .0000000000</row-1>
<row-2>0 1 0 .0000000000</row-2>
<row-3>0 0 1 .0000000000</row-3>
</symOp>
<symOp>
<row-1>-1 0 0 .0000000000</row-1>
<row-2>0 -1 0 .0000000000</row-2>
<row-3>0 0 -1 .0000000000</row-3>
</symOp>
</symmetryOperations>
</calculationSetup>
<cell>
<symmetryFile filename="sym.out"/>
<filmLattice scale="1.00000000" latnam="squ" dVac="5.79000000" dTilda="9.68000000">
<a1>5.458864500000</a1>
<vacuumEnergyParameters vacuum="1" spinUp="-.25000000" spinDown="-.25000000"/>
<filmLattice scale="1.00000000" dVac="5.79000000" dTilda="9.68000000">
<bravaisMatrix>
<row-1>5.4588645000 .0000000000 .0000000000</row-1>
<row-2>.0000000000 5.4588645000 .0000000000</row-2>
<row-3>.0000000000 .0000000000 9.6800000000</row-3>
</bravaisMatrix>
<vacuumEnergyParameters vacuum="1" spinUp="-.2500000" spinDown="-.2500000"/>
</filmLattice>
</cell>
<xcFunctional name="pbe" relativisticCorrections="F"/>
<atomSpecies>
<species name="Fe-1" element="Fe" atomicNumber="26" coreStates="7" magMom="2.20000000" flipSpin="T">
<species name="Fe-1" element="Fe" atomicNumber="26" flipSpin="T">
<mtSphere radius="2.59000000" gridPoints="623" logIncrement=".01900000"/>
<atomicCutoffs lmax="10" lnonsphr="8"/>
<electronConfig>
<coreConfig>(1s1/2) (2s1/2) (2p1/2) (2p3/2) (3s1/2) (3p1/2) (3p3/2)</coreConfig>
<valenceConfig>(4s1/2) (3d3/2) (3d5/2)</valenceConfig>
<stateOccupation state="(3d5/2)" spinUp="2.00000000" spinDown="0.00000000"/>
<stateOccupation state="(3d3/2)" spinUp="2.10000000" spinDown="1.90000000"/>
</electronConfig>
<energyParameters s="4" p="4" d="3" f="4"/>
</species>
</atomSpecies>
<atomGroups>
<atomGroup species="Fe-1">
<filmPos>.000000000000 .000000000000 .000000000000</filmPos>
<filmPos label=" ">.0000000000 .0000000000 .0000000000</filmPos>
<force calculate="T" relaxXYZ="TTT"/>
</atomGroup>
</atomGroups>
<output dos="F" band="F" vacdos="F" slice="F">
<checks vchk="F" cdinf="F" disp="F"/>
<output dos="F" band="F" vacdos="F" slice="F" mcd="F">
<checks vchk="F" cdinf="F"/>
<densityOfStates ndir="0" minEnergy="-.50000000" maxEnergy=".50000000" sigma=".01500000"/>
<vacuumDOS layers="0" integ="F" star="F" nstars="0" locx1=".00000000" locy1=".00000000" locx2=".00000000" locy2=".00000000" nstm="0" tworkf=".00000000"/>
<vacuumDOS layers="0" integ="F" star="F" nstars="0" locx1=".00000" locy1=".00000" locx2=".00000" locy2=".00000" nstm="0" tworkf=".00000"/>
<unfoldingBand unfoldBand="F" supercellX="1" supercellY="1" supercellZ="1"/>
<plotting iplot="F" score="F" plplot="F"/>
<chargeDensitySlicing numkpt="0" minEigenval=".00000000" maxEigenval=".00000000" nnne="0" pallst="F"/>
<specialOutput form66="F" eonly="F" bmt="F"/>
<specialOutput eonly="F" bmt="F"/>
<magneticCircularDichroism energyLo="-10.00000000" energyUp=".00000000"/>
</output>
<!-- We include the file relax.inp here to enable relaxations (see documentation) -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="relax.xml"> <xi:fallback/> </xi:include>
</fleurInput>
......@@ -11,6 +11,6 @@ jt::testrun("$executable ",$workdir);
$result=jt::test_grepexists("$workdir/out","it= *1 *is completed");
$result+=jt::test_grepnumber("$workdir/out","new fermi energy",".*: *([^ ]*)",-0.242,0.005);
$result+=jt::test_grepnumber("$workdir/out","total energy=",".*= *([^ ]*)",-1272.68,0.01);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densities for it= *1",": *([^ ]*)",18.1,0.5);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densities for it= *1",": *([^ ]*)",19.5,0.5);
jt::stageresult($workdir,$result,"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