diff --git a/src/fci_tc_bi/13.fci_tc_bi_ortho.bats b/src/fci_tc_bi/13.fci_tc_bi_ortho.bats new file mode 100644 index 00000000..7f5d0a9f --- /dev/null +++ b/src/fci_tc_bi/13.fci_tc_bi_ortho.bats @@ -0,0 +1,26 @@ +#!/usr/bin/env bats + +source $QP_ROOT/tests/bats/common.bats.sh +source $QP_ROOT/quantum_package.rc + + +function run_O() { + qp set_file O_tc_scf + FILE=O_tc_scf/tc_bi_ortho/psi_l_coef_bi_ortho.gz + if test -f "$FILE"; then + rm O_tc_scf/tc_bi_ortho/psi* + fi + qp set determinants n_det_max 20000 + file=${EZFIO_FILE}.fci_tc_bi_ortho.out + qp run fci_tc_bi_ortho | tee $file + eref=-74.971188861115309 + energy="$(grep 'E(before) +rPT2 =' $file | tail -1 | cut -d '=' -f 2)" + eq $energy $eref 1e-4 +} + + +@test "O" { + run_O +} + + diff --git a/src/tc_bi_ortho/12.tc_bi_ortho.bats b/src/tc_bi_ortho/12.tc_bi_ortho.bats index 8f592fee..f5b9d8c0 100644 --- a/src/tc_bi_ortho/12.tc_bi_ortho.bats +++ b/src/tc_bi_ortho/12.tc_bi_ortho.bats @@ -7,9 +7,9 @@ source $QP_ROOT/quantum_package.rc function run_Ne() { qp set_file Ne_tc_scf qp run cisd - qp run tc_bi_ortho | tee Ne.ezfio.cisd_tc_bi_ortho.out + qp run tc_bi_ortho | tee Ne_tc_scf.cisd_tc_bi_ortho.out eref=-128.77020441279302 - energy="$(grep "eigval_right_tc_bi_orth =" Ne.ezfio.cisd_tc_bi_ortho.out)" + energy="$(grep "eigval_right_tc_bi_orth =" Ne_tc_scf.cisd_tc_bi_ortho.out)" eq $energy $eref 1e-6 } @@ -18,3 +18,32 @@ function run_Ne() { run_Ne } + +function run_C() { + qp set_file C_tc_scf + qp run cisd + qp run tc_bi_ortho | tee C_tc_scf.cisd_tc_bi_ortho.out + eref=-37.757536149952514 + energy="$(grep "eigval_right_tc_bi_orth =" C_tc_scf.cisd_tc_bi_ortho.out)" + eq $energy $eref 1e-6 +} + + +@test "C" { + run_C +} + +function run_O() { + qp set_file C_tc_scf + qp run cisd + qp run tc_bi_ortho | tee O_tc_scf.cisd_tc_bi_ortho.out + eref=-74.908518517716161 + energy="$(grep "eigval_right_tc_bi_orth =" O_tc_scf.cisd_tc_bi_ortho.out)" + eq $energy $eref 1e-6 +} + + +@test "O" { + run_O +} + diff --git a/src/tc_scf/11.tc_scf.bats b/src/tc_scf/11.tc_scf.bats index a5171902..91b52540 100644 --- a/src/tc_scf/11.tc_scf.bats +++ b/src/tc_scf/11.tc_scf.bats @@ -9,11 +9,13 @@ function run_Ne() { echo Ne > Ne.xyz qp create_ezfio -b cc-pcvdz Ne.xyz -o Ne_tc_scf qp run scf + + qp set ao_two_e_erf_ints mu_erf 0.87 + qp set tc_keywords j1b_type 3 + qp set tc_keywords j1b_pen [1.5] qp set tc_keywords bi_ortho True qp set tc_keywords test_cycle_tc True - qp set ao_two_e_erf_ints mu_erf 0.87 - qp set tc_keywords j1b_pen [1.5] - qp set tc_keywords j1b_type 3 + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out eref=-128.552134 energy="$(qp get tc_scf bitc_energy)" @@ -25,3 +27,75 @@ function run_Ne() { run_Ne } +function run_C() { + rm -rf C_tc_scf + echo C > C.xyz + qp create_ezfio -b cc-pcvdz C.xyz -o C_tc_scf -m 3 + qp run scf + + qp set ao_two_e_erf_ints mu_erf 0.87 + qp set tc_keywords j1b_type 3 + qp set tc_keywords j1b_pen [1.5] + qp set tc_keywords bi_ortho True + qp set tc_keywords test_cycle_tc True + + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out + eref=-37.691254356408791 + energy="$(qp get tc_scf bitc_energy)" + eq $energy $eref 1e-6 +} + + +@test "C" { + run_C +} + + +function run_O() { + rm -rf O_tc_scf + echo O > O.xyz + qp create_ezfio -b cc-pcvdz O.xyz -o O_tc_scf -m 3 + qp run scf + + qp set ao_two_e_erf_ints mu_erf 0.87 + qp set tc_keywords j1b_type 3 + qp set tc_keywords j1b_pen [1.5] + qp set tc_keywords bi_ortho True + qp set tc_keywords test_cycle_tc True + + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out + eref=-74.814687229354590 + energy="$(qp get tc_scf bitc_energy)" + eq $energy $eref 1e-6 +} + + +@test "O" { + run_O +} + + + +function run_ch2() { + rm -rf ch2_tc_scf + cp ${QP_ROOT}/tests/input/ch2.xyz . + qp create_ezfio -b "C:cc-pcvdz|H:cc-pvdz" ch2.xyz -o ch2_tc_scf + qp run scf + + qp set ao_two_e_erf_ints mu_erf 0.87 + qp set tc_keywords j1b_type 3 + qp set tc_keywords j1b_pen '[1.5,10000,10000]' + qp set tc_keywords bi_ortho True + qp set tc_keywords test_cycle_tc True + + qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out + eref=-38.903247818077737 + energy="$(qp get tc_scf bitc_energy)" + eq $energy $eref 1e-6 +} + + +@test "ch2" { + run_ch2 +} + diff --git a/tests/input/ch2.xyz b/tests/input/ch2.xyz new file mode 100644 index 00000000..f008490c --- /dev/null +++ b/tests/input/ch2.xyz @@ -0,0 +1,5 @@ +3 + +C 6.000000 0.000000 0.000000 0.173480 +H 1.000000 0.000000 -0.861500 -0.520430 +H 1.000000 0.000000 0.861500 -0.520430