10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-10-20 14:58:19 +02:00
quantum_package/tests/bats/fci.bats

36 lines
725 B
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
2018-12-19 14:33:42 +01:00
test_exe fci || 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
2018-09-29 01:28:31 +02:00
ezfio set perturbation pt2_relative_error 0.001
2016-10-07 19:21:04 +02:00
ezfio set determinants n_det_max $2
ezfio set davidson threshold_davidson 1.e-10
2018-12-18 17:30:16 +01:00
qp_run fci $1
2018-10-19 16:33:58 +02:00
energy="$(ezfio get FCI energy | tr '[]' ' ')"
2016-10-07 19:21:04 +02:00
eq $energy $3 $thresh
2018-10-19 16:33:58 +02:00
energy_pt2="$(ezfio get FCI energy_pt2 | tr '[]' ' ')"
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]"
}
2018-10-19 16:33:58 +02:00
@test "FCI H2O cc-pVDZ" {
2018-12-01 00:55:39 +01:00
run_FCI h2o.ezfio 2000 -76.1250464119599 -76.1258876912360
2016-10-07 19:21:04 +02:00
}
2018-11-29 00:13:31 +01:00