10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 21:03:56 +01:00

Fixed tests

This commit is contained in:
Anthony Scemama 2018-09-29 01:03:25 +02:00
parent 4bd3c9e275
commit 3c6e775291
3 changed files with 54 additions and 6 deletions

View File

@ -32,7 +32,7 @@ python:
script:
- ./configure ./config/travis.cfg
- source ./quantum_package.rc ; qp_module.py install Full_CI Full_CI_ZMQ Hartree_Fock CAS_SD_ZMQ mrcepa0 All_singles
- source ./quantum_package.rc ; qp_module.py install Full_CI Full_CI_ZMQ Hartree_Fock CAS_SD_ZMQ mrcc All_singles
- source ./quantum_package.rc ; cd ~ ; install_lapack.sh ; cd $QP_ROOT
- source ./quantum_package.rc ; ninja
- source ./quantum_package.rc ; cd ocaml ; make ; cd -

48
tests/bats/mrcc.bats Normal file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env bats
source $QP_ROOT/tests/bats/common.bats.sh
#=== H2O
@test "MRCC-lambda H2O cc-pVDZ" {
INPUT=h2o.ezfio
EXE=mrcc
test_exe $EXE || skip
qp_edit -c $INPUT
ezfio set_file $INPUT
ezfio set determinants threshold_generators 1.
ezfio set determinants threshold_selectors 1.
ezfio set determinants read_wf True
ezfio set mrcc lambda_type 1
ezfio set mrcc perturbative_triples 0
ezfio set mrcc n_it_max_dressed_ci 3
cp -r $INPUT TMP ; qp_run $EXE TMP
ezfio set_file TMP
energy="$(ezfio get mrcc energy)"
energy_pt2="$(ezfio get mrcc energy_pt2)"
rm -rf TMP
eq $energy -76.2294920123364 1.e-4
eq $energy_pt2 -76.2382119593925 1.e-4
}
@test "MRCC H2O cc-pVDZ" {
INPUT=h2o.ezfio
EXE=mrcc
test_exe $EXE || skip
qp_edit -c $INPUT
ezfio set_file $INPUT
ezfio set determinants threshold_generators 1.
ezfio set determinants threshold_selectors 1.
ezfio set determinants read_wf True
ezfio set mrcc lambda_type 0
ezfio set mrcc perturbative_triples 0
ezfio set mrcc n_it_max_dressed_ci 3
cp -r $INPUT TMP ; qp_run $EXE TMP
ezfio set_file TMP
energy="$(ezfio get mrcc energy)"
energy_pt2="$(ezfio get mrcc energy_pt2)"
rm -rf TMP
eq $energy -76.2294460531211 1.e-4
eq $energy_pt2 -76.2381753982904 1.e-4
}

View File

@ -5,7 +5,7 @@ source $QP_ROOT/tests/bats/common.bats.sh
#=== H2O
@test "MRCC-lambda H2O cc-pVDZ" {
INPUT=h2o.ezfio
EXE=mrcc
EXE=mrcc_zmq
test_exe $EXE || skip
qp_edit -c $INPUT
ezfio set_file $INPUT
@ -17,7 +17,7 @@ source $QP_ROOT/tests/bats/common.bats.sh
ezfio set mrcepa0 n_it_max_dressed_ci 3
cp -r $INPUT TMP ; qp_run $EXE TMP
ezfio set_file TMP
energy="$(ezfio get mrcc energy)"
energy="$(ezfio get mrcepa0 energy_pt2)"
rm -rf TMP
eq $energy -76.2382975461183 1.e-4
}
@ -25,7 +25,7 @@ source $QP_ROOT/tests/bats/common.bats.sh
@test "MRCC H2O cc-pVDZ" {
INPUT=h2o.ezfio
EXE=mrcc
EXE=mrcc_zmq
test_exe $EXE || skip
qp_edit -c $INPUT
ezfio set_file $INPUT
@ -37,14 +37,14 @@ source $QP_ROOT/tests/bats/common.bats.sh
ezfio set mrcepa0 n_it_max_dressed_ci 3
cp -r $INPUT TMP ; qp_run $EXE TMP
ezfio set_file TMP
energy="$(ezfio get mrcc energy)"
energy="$(ezfio get mrcepa0 energy_pt2)"
rm -rf TMP
eq $energy -76.2382468380776 1.e-4
}
#@test "MRCC-stoch H2O cc-pVDZ" {
# INPUT=h2o.ezfio
# EXE=mrcc
# EXE=mrcc_zmq
# test_exe $EXE || skip
# qp_edit -c $INPUT
# ezfio set_file $INPUT