9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-21 11:03:29 +01:00

added test in fci_tc_bi_ortho

This commit is contained in:
eginer 2023-02-08 14:02:00 +01:00
parent 26bdbf7193
commit 261ff40044
4 changed files with 139 additions and 5 deletions

View File

@ -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
}

View File

@ -7,9 +7,9 @@ source $QP_ROOT/quantum_package.rc
function run_Ne() { function run_Ne() {
qp set_file Ne_tc_scf qp set_file Ne_tc_scf
qp run cisd 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 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 eq $energy $eref 1e-6
} }
@ -18,3 +18,32 @@ function run_Ne() {
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
}

View File

@ -9,11 +9,13 @@ function run_Ne() {
echo Ne > Ne.xyz echo Ne > Ne.xyz
qp create_ezfio -b cc-pcvdz Ne.xyz -o Ne_tc_scf qp create_ezfio -b cc-pcvdz Ne.xyz -o Ne_tc_scf
qp run 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 bi_ortho True
qp set tc_keywords test_cycle_tc 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 qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out
eref=-128.552134 eref=-128.552134
energy="$(qp get tc_scf bitc_energy)" energy="$(qp get tc_scf bitc_energy)"
@ -25,3 +27,75 @@ function run_Ne() {
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
}

5
tests/input/ch2.xyz Normal file
View File

@ -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