9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-28 06:13:31 +01:00
qp2/plugins/local/tc_scf/11.tc_scf.bats

102 lines
2.0 KiB
Plaintext
Raw Normal View History

2023-02-07 13:43:37 +01:00
#!/usr/bin/env bats
source $QP_ROOT/tests/bats/common.bats.sh
source $QP_ROOT/quantum_package.rc
function run_Ne() {
rm -rf Ne_tc_scf
echo Ne > Ne.xyz
qp create_ezfio -b cc-pcvdz Ne.xyz -o Ne_tc_scf
2023-10-17 17:52:43 +02:00
qp run scf
2023-10-17 17:52:43 +02:00
qp set hamiltonian mu_erf 0.87
qp set tc_keywords j1b_type 3
2023-10-17 17:52:43 +02:00
qp set tc_keywords j1b_pen [1.5]
qp set tc_keywords bi_ortho True
2023-02-07 13:43:37 +01:00
qp set tc_keywords test_cycle_tc True
2023-10-17 17:52:43 +02:00
qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out
2023-02-07 13:43:37 +01:00
eref=-128.552134
energy="$(qp get tc_scf bitc_energy)"
eq $energy $eref 1e-6
}
@test "Ne" {
2023-10-17 17:52:43 +02:00
run_Ne
2023-02-07 13:43:37 +01:00
}
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
2023-10-17 17:52:43 +02:00
qp run scf
2023-10-17 17:52:43 +02:00
qp set hamiltonian mu_erf 0.87
qp set tc_keywords j1b_type 3
2023-10-17 17:52:43 +02:00
qp set tc_keywords j1b_pen [1.5]
qp set tc_keywords bi_ortho True
qp set tc_keywords test_cycle_tc True
2023-10-17 17:52:43 +02:00
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" {
2023-10-17 17:52:43 +02:00
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
2023-10-17 17:52:43 +02:00
qp run scf
2023-10-17 17:52:43 +02:00
qp set hamiltonian mu_erf 0.87
qp set tc_keywords j1b_type 3
2023-10-17 17:52:43 +02:00
qp set tc_keywords j1b_pen [1.5]
qp set tc_keywords bi_ortho True
qp set tc_keywords test_cycle_tc True
2023-10-17 17:52:43 +02:00
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" {
2023-10-17 17:52:43 +02:00
run_O
}
function run_ch2() {
rm -rf ch2_tc_scf
cp ${QP_ROOT}/tests/input/ch2.xyz .
2023-10-17 17:52:43 +02:00
qp create_ezfio -b "C:cc-pcvdz|H:cc-pvdz" ch2.xyz -o ch2_tc_scf
qp run scf
2023-10-17 17:52:43 +02:00
qp set hamiltonian 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
2023-10-17 17:52:43 +02:00
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" {
2023-10-17 17:52:43 +02:00
run_ch2
}