Commit 57529ad9 authored by Jens Bröder's avatar Jens Bröder

added some first basic tests for inpgen, further tests and improvements needed

parent f14e85e4
......@@ -5,9 +5,11 @@ Fe_bct Fe_bctXML PTO PTOXML Fe_1l_SOC Fe_1l_SOCXML PTO-SOC PTO-SOCXML Fe_bct_SOC
GaAsMultiUForceXML SiFilmSlicePlotXML)
set(SerialOnlyTests Fe_bct_LO Fe_bct_LOXML Fe_fcc Fe_fccXML TiO2eels TiO2eelsXML)
set(InpgenTests Si_plain Si_plain_explicit Si_full_para)# Si_kpt Si_kden Si_round_trip)
set(Testdirs ${SerialParallelTests} ${SerialOnlyTests})
set(ParTestdirs ${SerialParallelTests})
set(InpTestdirs ${InpgenTests})
#Check if all tests (including those running for a long time) should be executed
if (all_tests)
......@@ -15,6 +17,13 @@ if (all_tests)
set(ParTestdirs ${Testdirs} Bi2Te3 Bi2Te3XML NiO_ldauXML)
endif()
#The inpgen tests
#if (${INPGEN})
foreach(test ${InpTestdirs})
add_test("INPGEN:${test}" ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.pl "inpgen/${test}" "${CMAKE_BINARY_DIR}/inpgen")
endforeach(test)
#endif()
#Add Wannier tests if fleur is compiled with Wannier support
if (${FLEUR_USE_WANN})
set(Testdirs ${Testdirs} Cwann CwannXML)
......
Si, alpha silicon, bulk, delta project
&input cartesian=F /
0.0000000000 5.1673552752 5.1673552752
5.1673552752 0.0000000000 5.1673552752
5.1673552752 5.1673552752 0.0000000000
1.0000000000
1.0000000000 1.0000000000 1.0000000000
2
14 0.1250000000 0.1250000000 0.1250000000
14 -0.1250000000 -0.1250000000 -0.1250000000
&atom
element="Si" jri=981 lmax=12 lnonsph=6 rmt=2.1 /
&comp
gmax=15.0 gmaxxc=12.5 kmax=5.0 /
&kpt
div1=17 div2=17 div3=17 tkb=0.0005 /
$test_name="Inpgen Si Bulk full given para";
$test_code="Inpgen";
%test_requirements=("SOC",0);
$test_stages=1;
$test_desc=<<EOF
Simple test of Inpgen with one steps:
1.Generate input files where most namelists are given & compare with expected files
EOF
;
#juDFT Testscript
jt::copyfile("files/inp_Si_para",$workdir);
jt::testrun("$executable < inp_Si_para",$workdir);
#now test output
$result=jt::test_fileexists("$workdir/inp.xml");
jt::stageresult($workdir,$result,"1");
Si, alpha silicon, bulk, delta project
&input cartesian=F /
0.0000000000 5.1673552752 5.1673552752
5.1673552752 0.0000000000 5.1673552752
5.1673552752 5.1673552752 0.0000000000
1.0000000000
1.0000000000 1.0000000000 1.0000000000
2
14 0.1250000000 0.1250000000 0.1250000000
14 -0.1250000000 -0.1250000000 -0.1250000000
$test_name="Inpgen Si Bulk";
$test_code="Inpgen";
%test_requirements=("SOC",0);
$test_stages=1;
$test_desc=<<EOF
Simple test of Inpgen with one steps:
1.Generate input files & check if interface right, that all files are produced that we expect. Also compare with expected files.
EOF
;
#juDFT Testscript
jt::copyfile("files/inp_Si_plain",$workdir);
jt::testrun("$executable < inp_Si_plain",$workdir);
#now test if inp.xml file was produced and if it contains certain features.
$result=jt::test_fileexists("$workdir/inp.xml");
$result+=jt::test_grepexists("$workdir/inp.xml",'filename="sym.out"');
$result+=jt::test_grepexists("$workdir/inp.xml","relpos label=");
#test interface, that all files are there. This lst should be complete
# notice there is per default no inp file also no kpts file and no enpara file
# also developers should be made aware if the interface is changed.
$result=jt::test_fileexists("$workdir/out");
$result=jt::test_fileexists("$workdir/FleurInputSchema.xsd");
$result=jt::test_fileexists("$workdir/struct.xcf");
$result=jt::test_fileexists("$workdir/sym.out");
jt::stageresult($workdir,$result,"1");
Si, alpha silicon, bulk, delta project
&input cartesian=F /
0.0000000000 5.1673552752 5.1673552752
5.1673552752 0.0000000000 5.1673552752
5.1673552752 5.1673552752 0.0000000000
1.0000000000
1.0000000000 1.0000000000 1.0000000000
2
14 0.1250000000 0.1250000000 0.1250000000
14 -0.1250000000 -0.1250000000 -0.1250000000
$test_name="Inpgen Si Bulk run with explicit";
$test_code="Inpgen";
%test_requirements=("SOC",0);
$test_stages=1;
$test_desc=<<EOF
Simple test of Inpgen with one steps:
1.Generate input files with explicit option & compare with expected files
EOF
;
#juDFT Testscript
jt::copyfile("files/inp_Si_plain",$workdir);
jt::testrun("$executable -explicit < inp_Si_plain",$workdir);
#now test output
$result=jt::test_fileexists("$workdir/inp.xml");
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