From e7833cafd82ae87320fa3a12cabca559dc07c8ab Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 1 Jan 2019 18:31:19 +0100 Subject: [PATCH] Tests for CIS OK --- src/cis/30.cis.bats | 30 ++++++++++++++++------------ src/cisd/30.cisd.bats | 36 ---------------------------------- src/ezfio_files/00.create.bats | 2 +- src/hartree_fock/20.hf.bats | 1 + 4 files changed, 20 insertions(+), 49 deletions(-) delete mode 100644 src/cisd/30.cisd.bats diff --git a/src/cis/30.cis.bats b/src/cis/30.cis.bats index d9b5a65d..58a031bd 100644 --- a/src/cis/30.cis.bats +++ b/src/cis/30.cis.bats @@ -3,13 +3,19 @@ source $QP_ROOT/tests/bats/common.bats.sh function run() { - thresh=5.e-7 + if [[ -z $5 ]] ; then + S2=1 + else + S2=0 + fi + thresh=1.e-6 test_exe cis || skip qp_edit -c $1 ezfio set_file $1 ezfio set determinants n_states 3 + ezfio set determinants s2_eig $S2 ezfio set davidson threshold_davidson 1.e-12 -# echo "Write" > $1/mo_two_e_integrals/disk_access_mo_integrals + echo "Write" > $1/mo_two_e_integrals/disk_access_mo_integrals qp_set_frozen_core $1 qp_run cis $1 energy1="$(ezfio get cis energy | tr '[]' ' ' | cut -d ',' -f 1)" @@ -23,11 +29,11 @@ function run() { @test "HBO" { - run hbo.ezfio -100.018582307658 -99.6982685747284 -99.6982685747283 + run hbo.ezfio -100.018582307658 -99.77695116779833 -99.74105601962573 x } @test "H2O" { - run h2o.ezfio -76.0270218681105 -75.6854407469221 -75.6196755733432 + run h2o.ezfio -76.02702187043107 -75.68543937698746 -75.61967438667698 } @test "[Cu(NH3)4]2+" { @@ -35,7 +41,7 @@ function run() { } @test "C2H2" { - run c2h2.ezfio -12.1214401949631 -11.86823108084437 -11.86823108084389 + run c2h2.ezfio -12.1214401949631 -11.95227840126497 -11.91537223579299 x } @test "ClO" { @@ -43,7 +49,7 @@ function run() { } @test "DHNO" { - run dhno.ezfio -130.447228845699 -130.357180876975 -130.219625729558 + run dhno.ezfio -130.4472288288198 -130.3571812907640 -130.2196267726907 } @test "H3COH" { @@ -51,11 +57,11 @@ function run() { } @test "HCN" { - run hcn.ezfio -92.8871750003801 -92.6089719727410 -92.6089719727409 + run hcn.ezfio -92.88717500038086 -92.69765690338815 -92.66095614790936 x } @test "N2" { - run n2.ezfio -108.9834897853049 -108.6496539410780 -108.6496539410771 + run n2.ezfio -108.9834897853052 -108.7538426008862 -108.7142633124650 x } @test "SiH2_3B1" { @@ -71,7 +77,7 @@ function run() { } @test "CO2" { - run co2.ezfio -187.650710886151 -187.291641391714 -187.291641391713 + run co2.ezfio -187.6507108861505 -187.3564970712329 -187.3277981565893 x } @test "F2" { @@ -79,11 +85,11 @@ function run() { } @test "HCO" { - run hco.ezfio -113.094024225042 -113.002362525915 -112.894730863318 + run hco.ezfio -113.0940242141341 -113.0023623703527 -112.8947302999338 } @test "NH3" { - run nh3.ezfio -56.2178342898186 -55.9199930723028 -55.8475617160862 + run nh3.ezfio -56.21783428981829 -55.91997684191139 -55.84753645754046 } @test "SiH3" { @@ -111,6 +117,6 @@ function run() { } @test "SO2" { - run so2.ezfio -41.5580019075504 -41.3823293845389 -41.3551232664878 + run so2.ezfio -41.55800190756020 -41.38232949315986 -41.35512395629023 } diff --git a/src/cisd/30.cisd.bats b/src/cisd/30.cisd.bats deleted file mode 100644 index cafb04fe..00000000 --- a/src/cisd/30.cisd.bats +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bats - -source $QP_ROOT/tests/bats/common.bats.sh - -function run_CISD() { - thresh=5.e-9 - test_exe cisd || skip - qp_edit -c $1 - ezfio set_file $1 - ezfio set determinants n_states 2 - ezfio set davidson threshold_davidson 1.e-10 - - qp_run cisd $1 - energy1="$(ezfio get cisd energy | tr '[]' ' ' | cut -d ',' -f 1)" - energy2="$(ezfio get cisd energy | tr '[]' ' ' | cut -d ',' -f 2)" - eq $energy1 $2 $thresh - eq $energy2 $3 $thresh -} - - - -#=== H2O - -@test "qp_set_mo_class H2O cc-pVDZ" { - qp_set_mo_class h2o.ezfio -core "[1]" -act "[2-12]" -del "[13-24]" -} - -@test "CISD H2O cc-pVDZ" { - run_CISD h2o.ezfio -76.1220030371248 -75.7704139046496 -} - -@test "CISD H2O VDZ pseudo" { - qp_set_frozen_core h2o_pseudo.ezfio - run_CISD h2o_pseudo.ezfio -17.1526088241466 -16.6975854682481 -} - diff --git a/src/ezfio_files/00.create.bats b/src/ezfio_files/00.create.bats index 11853f71..a9852fd7 100644 --- a/src/ezfio_files/00.create.bats +++ b/src/ezfio_files/00.create.bats @@ -17,7 +17,7 @@ function run { qp_create_ezfio_from_xyz \ $INPUT -b "$BASIS" -m $MULT -c $CHARGE $PSEUDO -o $EZ qp_edit -c $EZ -# echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals + echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals } diff --git a/src/hartree_fock/20.hf.bats b/src/hartree_fock/20.hf.bats index fe662503..fe760036 100644 --- a/src/hartree_fock/20.hf.bats +++ b/src/hartree_fock/20.hf.bats @@ -5,6 +5,7 @@ source $QP_ROOT/tests/bats/common.bats.sh function run() { thresh=1.e-8 + test_exe scf || skip qp_edit -c $1 ezfio set_file $1 ezfio set scf_utils thresh_scf 1.e-10