Commit 88c58337 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents 399946d8 400fdf1a
......@@ -46,6 +46,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
! local scalars
INTEGER :: ok,nk,nrec1,i,j,ll,l1,l2,ng,itype,n,l,n1,n2,nn
INTEGER :: nbasfcn
! local arrays
......@@ -85,14 +86,17 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
#endif
nrec1 = kpts%nkpt*(jsp-1) + nk
CALL zMat(nk)%init(l_real,dimension%nbasfcn,dimension%neigd2)
CALL lapw%init(input,noco,kpts,atoms,sym,nk,cell,sym%zrfs)
nbasfcn = MERGE(lapw%nv(1)+lapw%nv(2)+2*atoms%nlotot,lapw%nv(1)+atoms%nlotot,noco%l_noco)
CALL zMat(nk)%init(l_real,nbasfcn,dimension%neigd2)
CALL read_eig(eig_id_hf,nk,jsp,zmat=zMat(nk))
eig_irr(:,nk) = results%eig(:,nk,jsp)
hybrid%ne_eig(nk) = results%neig(nk,jsp)
END DO
!Allocate further space
DO nk = kpts%nkpt+1, kpts%nkptf
CALL zMat(nk)%init(l_real,dimension%nbasfcn,dimension%neigd2)
nbasfcn = zMat(kpts%bkp(nk))%matsize1
CALL zMat(nk)%init(l_real,nbasfcn,dimension%neigd2)
END DO
!determine degenerate states at each k-point
......
......@@ -49,142 +49,6 @@ CONTAINS
IF (mpi%irank.EQ.0) WRITE (6,*) 'Your parameters: '
OPEN (1,file='fl7para',form='formatted',status='old',err=200) ! La
READ (1,*,ERR=200,END=200)
READ (1,901,ERR=200,END=200) sym%nop,stars%mx1,stars%mx2,stars%mx3,stars%ng3,stars%ng2
IF (mpi%irank.EQ.0) WRITE (6,1001) sym%nop,stars%mx1,stars%mx2,stars%mx3,stars%ng3,stars%ng2
901 FORMAT (22x,i2,5x,i3,5x,i3,5x,i3,5x,i6,5x,i4)
1001 FORMAT (6x,'parameter (sym%nop= ',i2,',stars%mx1=',i3,',stars%mx2=',i3,',stars%mx3=',&
& i3,',stars%ng3=',i6,',stars%ng2=',i4,')')
READ (1,*,ERR=200,END=200)
READ (1,910,ERR=200,END=200) stars%kq1_fft,stars%kq2_fft,stars%kq3_fft
IF (mpi%irank.EQ.0) WRITE (6,1010) stars%kq1_fft,stars%kq2_fft,stars%kq3_fft
910 FORMAT (22x,i3,6x,i3,6x,i3)
1010 FORMAT (6x,'parameter (stars%kq1_fft=',i3,',stars%kq2_fft=',i3,',stars%kq3_fft=',i3,')')
READ (1,*,ERR=200,END=200)
READ (1,914,ERR=200,END=200) stars%kxc1_fft,stars%kxc2_fft,stars%kxc3_fft
IF (mpi%irank.EQ.0) WRITE (6,1014) stars%kxc1_fft,stars%kxc2_fft,stars%kxc3_fft
914 FORMAT (23x,i3,7x,i3,7x,i3)
1014 FORMAT (6x,'parameter (stars%kxc1_fft=',i3,',stars%kxc2_fft=',i3,',stars%kxc3_fft=',i3,')')
READ (1,*,ERR=200,END=200)
READ (1,902,ERR=200,END=200) atoms%ntype,atoms%nat,atoms%jmtd
IF (mpi%irank.EQ.0) WRITE (6,1002) atoms%ntype,atoms%nat,atoms%jmtd
902 FORMAT (23x,i3,6x,i3,6x,i4)
1002 FORMAT (6x,'parameter (atoms%ntype=',i3,',atoms%nat=',i3,',atoms%jmtd=',i4,')')
READ (1,*,ERR=200,END=200)
READ (1,903,ERR=200,END=200) sphhar%ntypsd,sphhar%nlhd,sphhar%memd
IF (mpi%irank.EQ.0) WRITE (6,1003) sphhar%ntypsd,sphhar%nlhd,sphhar%memd
903 FORMAT (24x,i3,6x,i3,6x,i2)
1003 FORMAT (6x,'parameter (sphhar%ntypsd=',i3,',sphhar%nlhd=',i3,',sphhar%memd=',i2,')')
READ (1,*,ERR=200,END=200)
READ (1,904,ERR=200,END=200) atoms%lmaxd
IF (mpi%irank.EQ.0) WRITE (6,1004) atoms%lmaxd
904 FORMAT (23x,i2)
1004 FORMAT (6x,'parameter (atoms%lmaxd=',i2,')')
READ (1,*,ERR=200,END=200)
READ (1,905,ERR=200,END=200) dimension%jspd,vacuum%nvacd
IF (mpi%irank.EQ.0) WRITE (6,1005) dimension%jspd,vacuum%nvacd
905 FORMAT (22x,i1,7x,i1)
1005 FORMAT (6x,'parameter (dimension%jspd=',i1,',vacuum%nvacd=',i1,')')
READ (1,*,ERR=200,END=200)
READ (1,906,ERR=200,END=200) vacuum%nmzd,vacuum%nmzxyd
IF (mpi%irank.EQ.0) WRITE (6,1006) vacuum%nmzd,vacuum%nmzxyd
906 FORMAT (22x,i3,8x,i3)
1006 FORMAT(6x,'parameter (vacuum%nmzd=',i3,',vacuum%nmzxyd=',i3,')')
READ (1,*,ERR=200,END=200)
READ (1,909,ERR=200,END=200) dimension%nvd,dimension%nv2d,kpts%nkpt
IF (mpi%irank.EQ.0) WRITE (6,1009) dimension%nvd,dimension%nv2d,1,kpts%nkpt
909 FORMAT (21x,i5,6x,i4,6x,i1,7x,i5,6x,i4)
1009 FORMAT(6x,'parameter (nvd=',i5,',nv2d=',i4,',nwdd=1',',nkptd=',i5,')')
READ (1,*,ERR=200,END=200)
READ (1,911,ERR=200,END=200) dimension%neigd,dimension%neigd
IF (mpi%irank.EQ.0) WRITE (6,1011) dimension%neigd,dimension%neigd
911 FORMAT (22x,i4,7x,i4)
1011 FORMAT(6x,'parameter (nobd=',i4,',dimension%neigd=',i4,')')
READ (1,*,ERR=200,END=200)
READ (1,912,ERR=200,END=200) dimension%msh,dimension%nstd
IF (mpi%irank.EQ.0) WRITE (6,1012) dimension%msh,dimension%nstd
912 FORMAT (21x,i4,6x,i2)
1012 FORMAT(6x,'parameter (dimension%msh=',i4,',dimension%nstd=',i2,')')
READ (1,*,ERR=200,END=200)
READ (1,913,ERR=200,END=200) dimension%ncvd
IF (mpi%irank.EQ.0) WRITE (6,1013) dimension%ncvd
913 FORMAT (22x,i3)
1013 FORMAT(6x,'parameter (dimension%ncvd=',i3,')')
READ (1,*,ERR=200,END=200)
READ (1,915,ERR=200,END=200) vacuum%layerd
IF (mpi%irank.EQ.0) WRITE (6,'(6x,''parameter(vacuum%layerd='',i3,'')'')') &
& vacuum%layerd
915 FORMAT (23x,i3)
READ (1,*,ERR=200,END=200)
READ (1,916,ERR=200,END=200) atoms%nlod,atoms%llod
IF (mpi%irank.EQ.0) WRITE (6,1016) atoms%nlod,atoms%llod
916 FORMAT (22x,i3,6x,i3)
1016 FORMAT(6x,'parameter (atoms%nlod=',i3,',atoms%llod=',i3,')')
!-odim
IF (oneD%odd%d1) THEN
READ (1,*,ERR=200,END=200)
READ (1,917,ERR=200,END=200) oneD%odd%mb,oneD%odd%M,oneD%odd%m_cyl,oneD%odd%chi,&
& oneD%odd%rot,oneD%odd%nop,oneD%odd%n2d,oneD%odd%d1
IF (mpi%irank.EQ.0) WRITE (6,1017) oneD%odd%mb,oneD%odd%M,oneD%odd%m_cyl,oneD%odd%chi,&
& oneD%odd%rot,oneD%odd%nop,oneD%odd%n2d,oneD%odd%d1
917 FORMAT (20x,i3,4x,i3,7x,i3,5x,i3,5x,i3,5x,i3,5x,i6,4x,l1)
1017 FORMAT (6x,'parameter (vM=',i3,',MM=',i3,',m_cyl=',i3,&
& ',chi=',i3,&
& ',rot=',i3,',sym%nop=',i3,',stars%ng2=',i6,',d1=',l1,')')
!+odim
END IF
dimension%nspd=(atoms%lmaxd+1+mod(atoms%lmaxd+1,2))*(2*atoms%lmaxd+1)
CLOSE (1)
IF (mpi%irank.EQ.0) THEN
INQUIRE (file='inp',exist=l_inpexist)
IF (.not.l_inpexist) THEN
INQUIRE (file='input',exist=l_inpexist)
IF (.not.l_inpexist) THEN
CALL juDFT_error("no inp- or input-file found!",calledby&
& ="dimens")
ENDIF
! CALL inp_gen()
ENDIF
WRITE (6,*)
CALL first_glance(&
& n1,n2,n3,n5,n6,input%itmax,&
& L_kpts,l_qpts,ldum,n7,n8,N10)
!
IF (n1>atoms%ntype) CALL juDFT_error("atoms%ntype too small in fl7para" ,calledby ="dimens")
IF (n2.LT.24) THEN
IF (n2>sym%nop ) CALL juDFT_error("sym%nop too small in fl7para" ,calledby ="dimens")
ENDIF
IF (n3>atoms%nat ) CALL juDFT_error("atoms%nat too small in fl7para" ,calledby ="dimens")
IF (n5>atoms%nlod ) CALL juDFT_error("atoms%nlod too small in fl7para" ,calledby ="dimens")
IF (n6>vacuum%layerd) CALL juDFT_error("vacuum%layerd too small in fl7para" ,calledby ="dimens")
IF ((.not.l_kpts).OR.(.not.l_qpts)) GOTO 201
ENDIF
RETURN
200 CONTINUE
CLOSE (1)
#ifdef CPP_MPI
CALL MPI_BARRIER(mpi%Mpi_comm,ierr)
#endif
......
......@@ -30,6 +30,11 @@ if (${FLEUR_USE_WANN})
set(ParTestdirs ${ParTestdirs} Cwann CwannXML)
endif()
#Tests for LibXC
if (${FLEUR_USE_LIBXC})
set(Testdirs ${Testdirs} CuBulkLibXC)
set(ParTestdirs ${ParTestdirs} CuBulkLibXC)
endif()
#The serial tests
if (${FLEUR_USE_SERIAL})
foreach(test ${Testdirs})
......
energy parameters for window 1 spin 1 mix= 1.000000
atom s p d f
--> 1 0.22652 0.22652 0.21267 0.22652 change: TTTT skiplo: 0
--> 2 0.22652 0.22652 0.21267 0.22652 change: TTTT skiplo: 0
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<fleurInput fleurInputVersion="0.27">
<comment>
Cu bulk
</comment>
<calculationSetup>
<cutoffs Kmax="3.50000000" Gmax="15.00000000" GmaxXC="10.00000000" numbands="0"/>
<scfLoop itmax="1" maxIterBroyd="99" imix="Anderson" alpha=".05000000" spinf="2.00000000"/>
<coreElectrons ctail="T" frcor="F" kcrel="0"/>
<magnetism jspins="1" 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"/>
<geometryOptimization l_f="F" xa="2.00000000" thetad="330.00000000" epsdisp=".00001000" epsforce=".00001000"/>
<bzIntegration valenceElectrons="22.00000000" mode="hist" fermiSmearingEnergy=".00100000">
<kPointCount count="4" gamma="F"/>
</bzIntegration>
<energyParameterLimits ellow="-0.80000000" elup="0.50000000"/>
</calculationSetup>
<cell>
<symmetry spgrp="p4m" invs="T" zrfs="T"/>
<bulkLattice scale="0.970000000000" latnam="squ">
<a1>4.815397</a1>
<c>6.81</c>
</bulkLattice>
</cell>
<xcFunctional name="libxc" relativisticCorrections="F">
<libXC exchange="1" correlation="9" />
</xcFunctional>
<atomSpecies>
<species name="Cu-1" element="Cu" atomicNumber="29" coreStates="7" magMom=".00000000" flipSpin="T">
<mtSphere radius="2.20000000" gridPoints="935" logIncrement=".01300000"/>
<atomicCutoffs lmax="12" lnonsphr="8"/>
<energyParameters s="4" p="4" d="3" f="4"/>
</species>
</atomSpecies>
<atomGroups>
<atomGroup species="Cu-1">
<relPos>0.0 0.0 1.0/2.0</relPos>
<force calculate="T" relaxXYZ="TTT"/>
</atomGroup>
<atomGroup species="Cu-1">
<relPos>1.0/2.0 1.0/2.0 0.0</relPos>
<force calculate="T" relaxXYZ="TTT"/>
</atomGroup>
</atomGroups>
<output dos="F" band="F" vacdos="F" slice="F">
<checks vchk="F" cdinf="F" disp="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"/>
<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"/>
</output>
</fleurInput>
$test_name="Fleur Cu Bulk - XML";
$test_code="Fleur";
%test_requirements=("SOC",0);
$test_stages=1;
$test_desc=<<EOF
Simple test of Fleur with XML input with one step:
1.Generate a starting density and run 1 iteration and compare fermi-energy & total energy
EOF
;
#juDFT Testscript
jt::copyfile("files/inp.xml",$workdir);
jt::copyfile("files/enpara",$workdir);
jt::testrun("$executable -xmlInput",$workdir);
#now test output
$result=jt::test_grepexists("$workdir/out","it= 1 is completed");
$result+=jt::test_grepnumber("$workdir/out","new fermi energy",": *([^ ]*)",0.4250,0.0001);
$result+=jt::test_grepnumber("$workdir/out","total energy=","= *([^ ]*)",-3305.007,0.001);
$result+=jt::test_grepnumber("$workdir/out","distance of charge densitie","1: *([^ ]*)",48.993,0.001);
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