From 21275034057d8a964595010ffddd7ad3de3453a2 Mon Sep 17 00:00:00 2001 From: Emmanuel Giner Date: Tue, 16 Feb 2016 12:34:04 +0100 Subject: [PATCH] added tests for all_1h_1p --- data/basis/chipman-dzp | 168 ++++++++++++++++++++++++++++ plugins/All_singles/EZFIO.cfg | 5 + plugins/All_singles/all_1h_1p.irp.f | 1 + tests/bats/qp.bats | 28 +++++ tests/input/dhno.xyz | 7 ++ 5 files changed, 209 insertions(+) create mode 100644 data/basis/chipman-dzp create mode 100644 plugins/All_singles/EZFIO.cfg create mode 100644 tests/input/dhno.xyz diff --git a/data/basis/chipman-dzp b/data/basis/chipman-dzp new file mode 100644 index 00000000..b0178ef4 --- /dev/null +++ b/data/basis/chipman-dzp @@ -0,0 +1,168 @@ +HYDROGEN +S 3 + 1 127.9500000 0.0107360 + 2 19.2406000 0.1195440 + 3 2.8992000 0.9264160 +S 1 + 1 0.6534000 1.0000000 +S 1 + 1 0.1776000 1.0000000 +S 1 + 1 0.0483000 1.0000000 +P 1 + 1 1.0000000 1.0000000 + +BORON +S 5 + 1 2788.4100000 0.0021220 + 2 419.0390000 0.0161710 + 3 96.4683000 0.0783560 + 4 28.0694000 0.2632500 + 5 9.3760000 0.5967290 +S 1 + 1 1.3057000 1.0000000 +S 1 + 1 3.4062000 1.0000000 +S 1 + 1 0.3245000 1.0000000 +S 1 + 1 0.1022000 1.0000000 +S 1 + 1 0.0330000 1.0000000 +P 4 + 1 11.3413000 0.0179870 + 2 2.4360000 0.1103390 + 3 0.6836000 0.3831110 + 4 0.2134000 0.6478600 +P 1 + 1 0.0701000 1.0000000 +P 1 + 1 0.0226000 1.0000000 +D 1 + 1 0.1600000 1.0000000 +D 1 + 1 0.6400000 1.0000000 + +CARBON +S 5 + 1 5909.4400000 0.0020040 + 2 887.4510000 0.0153100 + 3 204.7490000 0.0742930 + 4 59.8376000 0.2533640 + 5 19.9981000 0.6005760 +S 1 + 1 2.6860000 1.0000000 +S 1 + 1 7.1927000 1.0000000 +S 1 + 1 0.7000000 1.0000000 +S 1 + 1 0.2133000 1.0000000 +S 1 + 1 0.0667000 1.0000000 +P 4 + 1 26.7860000 0.0182570 + 2 5.9564000 0.1164070 + 3 1.7074000 0.3901110 + 4 0.5314000 0.6372210 +P 1 + 1 0.1654000 1.0000000 +P 1 + 1 0.0517000 1.0000000 +D 1 + 1 0.3700000 1.0000000 +D 1 + 1 1.4800000 1.0000000 + +NITROGEN +S 5 + 1 5909.4400000 0.0020040 + 2 887.4510000 0.0153100 + 3 204.7490000 0.0742930 + 4 59.8376000 0.2533640 + 5 19.9981000 0.6005760 +S 1 + 1 2.6860000 1.0000000 +S 1 + 1 7.1927000 1.0000000 +S 1 + 1 0.7000000 1.0000000 +S 1 + 1 0.2133000 1.0000000 +S 1 + 1 0.0667000 1.0000000 +P 4 + 1 26.7860000 0.0182570 + 2 5.9564000 0.1164070 + 3 1.7074000 0.3901110 + 4 0.5314000 0.6372210 +P 1 + 1 0.1654000 1.0000000 +P 1 + 1 0.0517000 1.0000000 +D 1 + 1 0.3700000 1.0000000 +D 1 + 1 1.4800000 1.0000000 + +OXYGEN + S 5 + 1 7816.5400000 0.0020310 + 2 1175.8200000 0.0154360 + 3 273.1880000 0.0737710 + 4 81.1696000 0.2476060 + 5 27.1836000 0.6118320 +S 1 + 1 3.4136000 1.0000000 +S 1 + 1 9.5322000 1.0000000 +S 1 + 1 0.9398000 1.0000000 +S 1 + 1 0.2846000 1.0000000 +S 1 + 1 0.0862000 1.0000000 +P 4 + 1 35.1832000 0.0195800 + 2 7.9040000 0.1241890 + 3 2.3051000 0.3947270 + 4 0.7171000 0.6273750 +P 1 + 1 0.2137000 1.0000000 +P 1 + 1 0.0648000 1.0000000 +D 1 + 1 0.5500000 1.0000000 +D 1 + 1 2.2000000 1.0000000 + +FLUORINE +S 5 + 1 9994.7900000 0.0020170 + 2 1506.0300000 0.0152950 + 3 350.2690000 0.0731100 + 4 104.0530000 0.2464200 + 5 34.8432000 0.6125930 +S 1 + 1 4.3688000 1.0000000 +S 1 + 1 12.2164000 1.0000000 +S 1 + 1 1.2078000 1.0000000 +S 1 + 1 0.3634000 1.0000000 +S 1 + 1 0.1101000 1.0000000 +P 4 + 1 44.3555000 0.0208680 + 2 10.0820000 0.1300920 + 3 2.9959000 0.3962190 + 4 0.9383000 0.6203680 +P 1 + 1 0.2733000 1.0000000 +P 1 + 1 0.0828000 1.0000000 +D 1 + 1 0.6650000 1.0000000 +D 1 + 1 2.6600000 1.0000000 diff --git a/plugins/All_singles/EZFIO.cfg b/plugins/All_singles/EZFIO.cfg new file mode 100644 index 00000000..b2498c43 --- /dev/null +++ b/plugins/All_singles/EZFIO.cfg @@ -0,0 +1,5 @@ +[energy] +type: double precision +doc: Calculated Selected all_singles or all_1h_1p energy +interface: ezfio + diff --git a/plugins/All_singles/all_1h_1p.irp.f b/plugins/All_singles/all_1h_1p.irp.f index e6d48749..a2786248 100644 --- a/plugins/All_singles/all_1h_1p.irp.f +++ b/plugins/All_singles/all_1h_1p.irp.f @@ -69,6 +69,7 @@ subroutine routine print*,'Delta E = ',CI_energy(i)+ pt2(i) - (CI_energy(1) + pt2(1)) enddo endif + call ezfio_set_all_singles_energy(CI_energy) call save_wavefunction deallocate(pt2,norm_pert) diff --git a/tests/bats/qp.bats b/tests/bats/qp.bats index ae385fe8..892d1a1b 100644 --- a/tests/bats/qp.bats +++ b/tests/bats/qp.bats @@ -79,11 +79,39 @@ function run_FCI() { eq $energy_pt2 $4 $thresh } +function run_all_1h_1p() { + thresh=1.e-6 + test_exe all_1h_1p || skip + ezfio set_file $1 + ezfio set determinants n_det_max $2 + ezfio set perturbation pt2_max $3 + ezfio set determinants threshold_davidson 1.e-10 + + qp_run all_1h_1p $1 | tee $1.F1h1p.out + energy="$(ezfio get all_singles energy)" + eq $energy $4 $thresh +} + # ___ # | _ _ _|_ # | (/_ _> |_ # + +#=== DHNO +@test "init DHNO chipman-dzp" { + run_init dhno.xyz "-b chipman-dzp -m 2" dhno.ezfio +} + +@test "SCF DHNO chipman-dzp" { + run_HF dhno.ezfio -130.4278777822 +} + +@test "all_1h_1p DHNO chipman-dzp" { + qp_set_mo_class -inact "[1-8]" -act "[9]" -virt "[10-64]" dhno.ezfio + run_all_1h_1p dhno.ezfio 10000 0.0000000001 -130.4466283766202 +} + #=== HBO @test "init HBO STO-3G" { run_init HBO.xyz "-b STO-3G" hbo.ezfio diff --git a/tests/input/dhno.xyz b/tests/input/dhno.xyz new file mode 100644 index 00000000..367a2fa7 --- /dev/null +++ b/tests/input/dhno.xyz @@ -0,0 +1,7 @@ +4 +XYZ file: coordinates in Angstrom +H -0.877367 -1.047049 0.000000 +N 0.000000 -0.544985 0.000000 +O 0.000000 0.738624 0.000000 +H 0.877367 -1.047049 0.000000 +