10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-10-31 19:23:50 +01:00
quantum_package/tests/bats/fci.bats

56 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-10-07 19:21:04 +02:00
#!/usr/bin/env bats
source $QP_ROOT/tests/bats/common.bats.sh
function run_FCI() {
thresh=5.e-5
test_exe full_ci || skip
qp_edit -c $1
ezfio set_file $1
2017-06-26 20:35:07 +02:00
ezfio set perturbation do_pt2 True
2016-10-07 19:21:04 +02:00
ezfio set determinants n_det_max $2
ezfio set davidson threshold_davidson 1.e-10
qp_run full_ci $1
energy="$(ezfio get full_ci energy)"
eq $energy $3 $thresh
energy_pt2="$(ezfio get full_ci energy_pt2)"
eq $energy_pt2 $4 $thresh
}
function run_FCI_ZMQ() {
thresh=5.e-5
2016-11-14 15:50:28 +01:00
test_exe fci_zmq || skip
2016-10-07 19:21:04 +02:00
qp_edit -c $1
ezfio set_file $1
2017-06-26 20:35:07 +02:00
ezfio set perturbation do_pt2 True
2016-10-07 19:21:04 +02:00
ezfio set determinants n_det_max $2
ezfio set davidson threshold_davidson 1.e-10
qp_run fci_zmq $1
2016-11-14 15:50:28 +01:00
energy="$(ezfio get full_ci_zmq energy)"
2016-10-07 19:21:04 +02:00
eq $energy $3 $thresh
2016-11-14 15:50:28 +01:00
energy_pt2="$(ezfio get full_ci_zmq energy_pt2)"
2016-10-07 19:21:04 +02:00
eq $energy_pt2 $4 $thresh
}
#=== H2O
@test "qp_set_mo_class H2O cc-pVDZ" {
qp_set_mo_class h2o.ezfio -core "[1]" -act "[2-12]" -del "[13-24]"
}
@test "FCI H2O cc-pVDZ" {
2017-10-16 22:41:40 +02:00
run_FCI h2o.ezfio 2000 -76.1253757275131 -76.1258128174355
2016-10-07 19:21:04 +02:00
}
2017-03-30 01:13:27 +02:00
2017-10-16 18:28:54 +02:00
2016-10-07 19:21:04 +02:00
@test "FCI-ZMQ H2O cc-pVDZ" {
2017-03-30 01:13:27 +02:00
run_FCI_ZMQ h2o.ezfio 2000 -76.1250552686394 -76.1258817228809
2016-10-07 19:21:04 +02:00
}