From b5402e5c1581905cfc8c67f369523f41cfe0a7bd Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 28 Dec 2018 18:11:49 +0100 Subject: [PATCH] Z-matrix tests --- src/ezfio_files/00.create.bats | 25 ++++++---------------- src/hartree_fock/20.hf.bats | 39 ++++------------------------------ tests/input/dhno.xyz | 7 ------ tests/input/f2.xyz | 4 ---- tests/input/f2.zmt | 3 +++ tests/input/h2o.xyz | 6 ------ tests/input/h2o2.xyz | 6 ------ tests/input/h2o2.zmt | 11 ++++++++++ tests/input/hbo.xyz | 5 ----- tests/input/n2h4.xyz | 8 ------- tests/input/n2h4.zmt | 14 ++++++++++++ 11 files changed, 39 insertions(+), 89 deletions(-) delete mode 100644 tests/input/dhno.xyz delete mode 100644 tests/input/f2.xyz create mode 100644 tests/input/f2.zmt delete mode 100644 tests/input/h2o.xyz delete mode 100644 tests/input/h2o2.xyz create mode 100644 tests/input/h2o2.zmt delete mode 100644 tests/input/hbo.xyz delete mode 100644 tests/input/n2h4.xyz create mode 100644 tests/input/n2h4.zmt diff --git a/src/ezfio_files/00.create.bats b/src/ezfio_files/00.create.bats index 413591a2..8eac5df3 100644 --- a/src/ezfio_files/00.create.bats +++ b/src/ezfio_files/00.create.bats @@ -5,6 +5,7 @@ source $QP_ROOT/tests/bats/common.bats.sh function run { INPUT=$1 EZ=${INPUT/.xyz/.ezfio} + EZ=${EZ/.zmt/.ezfio} MULT=$2 CHARGE=$3 BASIS=$4 @@ -26,10 +27,6 @@ function run { run clo.xyz 2 0 cc-pvdz } -@test "qp_create dhno.xyz" { - run dhno.xyz 2 0 chipman-dzp -} - @test "qp_create h3coh.xyz" { run h3coh.xyz 1 0 6-31g } @@ -58,12 +55,8 @@ function run { run co2.xyz 1 0 cc-pvdz } -@test "qp_create f2.xyz" { - run f2.xyz 1 0 "Def2-TZVP" -} - -@test "qp_create h2o.xyz" { - run h2o.xyz 1 0 cc-pvdz +@test "qp_create f2.zmt" { + run f2.zmt 1 0 "Def2-TZVP" } @test "qp_create hco.xyz" { @@ -82,20 +75,16 @@ function run { run clf.xyz 1 0 cc-pvdz } -@test "qp_create h2o2.xyz" { - run h2o2.xyz 1 0 cc-pvdz +@test "qp_create h2o2.zmt" { + run h2o2.zmt 1 0 cc-pvdz } @test "qp_create h2s.xyz" { run h2s.xyz 1 0 cc-pvdz } -@test "qp_create hbo.xyz" { - run hbo.xyz 1 0 cc-pvtz -} - -@test "qp_create n2h4.xyz" { - run n2h4.xyz 1 0 cc-pvdz +@test "qp_create n2h4.zmt" { + run n2h4.zmt 1 0 cc-pvdz } @test "qp_create oh.xyz" { diff --git a/src/hartree_fock/20.hf.bats b/src/hartree_fock/20.hf.bats index 105539de..99de7808 100644 --- a/src/hartree_fock/20.hf.bats +++ b/src/hartree_fock/20.hf.bats @@ -2,15 +2,8 @@ source $QP_ROOT/tests/bats/common.bats.sh -function run_init() { - cp "${QP_ROOT}/tests/input/$1" . - rm -rf -- $3 - qp_create_ezfio_from_xyz $1 -o $3 $2 - qp_edit -c $3 -} - -function run_HF() { +function run() { thresh=1.e-8 test_exe scf || skip qp_edit -c $1 @@ -23,40 +16,16 @@ function run_HF() { -#=== 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 -} - -#=== HBO -@test "init HBO STO-3G" { - run_init HBO.xyz "-b STO-3G" hbo.ezfio + run dhno.ezfio -130.4278777822 } @test "SCF HBO STO-3G" { - run_HF hbo.ezfio -98.8251985678084 -} - - -#=== H2O -@test "init H2O cc-pVDZ" { - run_init h2o.xyz "-b cc-pvdz" h2o.ezfio + run hbo.ezfio -98.8251985678084 } @test "SCF H2O cc-pVDZ" { - run_HF h2o.ezfio -0.760270218692179E+02 + run h2o.ezfio -0.760270218692179E+02 } -#=== H2O Pseudo -@test "init H2O VDZ pseudo" { - run_init h2o.xyz "-p bfd -b vdz-bfd" h2o_pseudo.ezfio -} - -@test "SCF H2O VDZ pseudo" { - run_HF h2o_pseudo.ezfio -16.9483703905461 -} diff --git a/tests/input/dhno.xyz b/tests/input/dhno.xyz deleted file mode 100644 index 367a2fa7..00000000 --- a/tests/input/dhno.xyz +++ /dev/null @@ -1,7 +0,0 @@ -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 - diff --git a/tests/input/f2.xyz b/tests/input/f2.xyz deleted file mode 100644 index 9128ff54..00000000 --- a/tests/input/f2.xyz +++ /dev/null @@ -1,4 +0,0 @@ -2 -F2 Geo: Experiment Mult: 1 symmetry: 18 -F 0.0 0.0 0.0 -F 0.0 0.0 1.4119 diff --git a/tests/input/f2.zmt b/tests/input/f2.zmt new file mode 100644 index 00000000..0dee27c4 --- /dev/null +++ b/tests/input/f2.zmt @@ -0,0 +1,3 @@ +F +F 1 1.4119 + diff --git a/tests/input/h2o.xyz b/tests/input/h2o.xyz deleted file mode 100644 index e8cd039b..00000000 --- a/tests/input/h2o.xyz +++ /dev/null @@ -1,6 +0,0 @@ -3 -XYZ file: coordinates in Angstrom -H 0.7510000000 0.1940000000 0.0000000000 -O 0.0000000000 -0.3880000000 0.0000000000 -H -0.7510000000 0.1940000000 0.0000000000 - diff --git a/tests/input/h2o2.xyz b/tests/input/h2o2.xyz deleted file mode 100644 index 47066833..00000000 --- a/tests/input/h2o2.xyz +++ /dev/null @@ -1,6 +0,0 @@ -4 -H2O2 Geo: Experiment Mult: 1 symmetry: 18 -H 0.819 0.817 0.422 -H -0.819 -0.817 0.422 -O 0.0 0.7375 -0.0528 -O 0.0 -0.7375 -0.0528 diff --git a/tests/input/h2o2.zmt b/tests/input/h2o2.zmt new file mode 100644 index 00000000..ea2bc08d --- /dev/null +++ b/tests/input/h2o2.zmt @@ -0,0 +1,11 @@ + o + o 1 oo + h 1 ho 2 hoo + h 2 ho 1 hoo 3 dih + +oo 1.475 +ho 0.95 +hoo 94.8 +dih 119.8 + + diff --git a/tests/input/hbo.xyz b/tests/input/hbo.xyz deleted file mode 100644 index 796a1e19..00000000 --- a/tests/input/hbo.xyz +++ /dev/null @@ -1,5 +0,0 @@ -3 -HBO Geo: Experiment Mult: 1 symmetry: 14 -B 0.0 0.0 1.166 -H 0.0 0.0 0.0 -O 0.0 0.0 2.366 diff --git a/tests/input/n2h4.xyz b/tests/input/n2h4.xyz deleted file mode 100644 index 8dbad41c..00000000 --- a/tests/input/n2h4.xyz +++ /dev/null @@ -1,8 +0,0 @@ -6 -N2H4 Geo: Experiment Mult: 1 symmetry: 18 -H -0.447 1.0031 0.7562 -H 0.447 -1.0031 0.7562 -H 0.9663 1.0031 0.0301 -H -0.9663 -1.0031 0.0301 -N 0.0 0.723 -0.1123 -N 0.0 -0.723 -0.1123 diff --git a/tests/input/n2h4.zmt b/tests/input/n2h4.zmt new file mode 100644 index 00000000..a710a495 --- /dev/null +++ b/tests/input/n2h4.zmt @@ -0,0 +1,14 @@ + n + n 1 nn + h 1 hn 2 hnn + h 2 hn 1 hnn 3 dih4 + h 1 hn 2 hnn 4 dih5 + h 2 hn 1 hnn 3 dih5 + +nn 1.446 +hn 1.016 +hnn 106.0 +dih4 -54.38 +dih5 54.38 + +