10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-22 13:12:23 +02:00
QuantumPackage/plugins/local/tc_bi_ortho/31.tc_bi_ortho.bats

54 lines
905 B
Plaintext
Raw Permalink Normal View History

2023-02-24 21:38:09 +01:00
#!/usr/bin/env bats
source $QP_ROOT/tests/bats/common.bats.sh
source $QP_ROOT/quantum_package.rc
2023-06-02 20:32:31 +02:00
function get_e() {
grep "eigval_right_tc_bi_orth" $1 | cut -d '=' -f 2 | xargs
}
2023-02-24 21:38:09 +01:00
function run_Ne() {
2023-06-02 20:32:31 +02:00
qp set_file Ne_tc_scf
qp run cisd
qp run tc_bi_ortho | tee Ne_tc_scf.cisd_tc_bi_ortho.out
2023-02-24 21:38:09 +01:00
eref=-128.77020441279302
2023-06-02 20:32:31 +02:00
energy=$(get_e Ne_tc_scf.cisd_tc_bi_ortho.out)
eq $energy $eref 2e-4
2023-02-24 21:38:09 +01:00
}
@test "Ne" {
2023-06-02 20:32:31 +02:00
run_Ne
2023-02-24 21:38:09 +01:00
}
function run_C() {
2023-06-02 20:32:31 +02:00
qp set_file C_tc_scf
qp run cisd
qp run tc_bi_ortho | tee C_tc_scf.cisd_tc_bi_ortho.out
2023-02-24 21:38:09 +01:00
eref=-37.757536149952514
2023-06-02 20:32:31 +02:00
energy=$(get_e C_tc_scf.cisd_tc_bi_ortho.out)
eq $energy $eref 2e-4
2023-02-24 21:38:09 +01:00
}
@test "C" {
2023-06-02 20:32:31 +02:00
run_C
2023-02-24 21:38:09 +01:00
}
function run_O() {
2023-06-02 20:32:31 +02:00
qp set_file C_tc_scf
qp run cisd
qp run tc_bi_ortho | tee O_tc_scf.cisd_tc_bi_ortho.out
2023-02-24 21:38:09 +01:00
eref=-74.908518517716161
2023-06-02 20:32:31 +02:00
energy=$(get_e O_tc_scf.cisd_tc_bi_ortho.out)
eq $energy $eref 2e-4
2023-02-24 21:38:09 +01:00
}
@test "O" {
2023-06-02 20:32:31 +02:00
run_O
2023-02-24 21:38:09 +01:00
}