9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-07-19 09:13:26 +02:00

added basis correction and test

This commit is contained in:
Emmanuel Giner 2020-04-06 15:06:16 +02:00
parent 659d095a56
commit c4ded9dcfb
9 changed files with 2487 additions and 7 deletions

View File

@ -0,0 +1,63 @@
#!/usr/bin/env bats
source $QP_ROOT/tests/bats/common.bats.sh
source $QP_ROOT/quantum_package.rc
function run() {
thresh=$2
test_exe fci || skip
qp edit --check
qp set perturbation do_pt2 False
qp set determinants n_det_max 8000
qp set determinants n_states 1
qp set davidson threshold_davidson 1.e-10
qp set davidson n_states_diag 8
qp run fci
energy1="$(ezfio get fci energy | tr '[]' ' ' | cut -d ',' -f 1)"
eq $energy1 $1 $thresh
}
function run_md() {
thresh=$2
qp set mu_of_r mu_of_r_potential cas_ful
file_out=${EZFIO_FILE}.basis_corr.out
qp run basis_correction | tee $file_out
energy1="$(grep 'ECMD SU-PBE-OT , state 1 =' ${file_out} | cut -d '=' -f 2)"
eq $energy1 $1 $thresh
}
function run_sd() {
thresh=$2
qp set mu_of_r mu_of_r_potential hf
qp set_frozen_core
file_out=${EZFIO_FILE}.basis_corr.out
qp run basis_correction | tee $file_out
energy1="$(grep 'ECMD PBE-UEG , state 1 =' ${file_out} | cut -d '=' -f 2)"
eq $energy1 $1 $thresh
}
@test "O2 CAS" {
qp set_file o2_cas.gms.ezfio
qp set_mo_class -c "[1-2]" -a "[3-10]" -d "[11-46]"
run -149.72435425 3.e-4 10000
qp set_mo_class -c "[1-2]" -a "[3-10]" -v "[11-46]"
run_md -0.1160222327 1.e-6
}
@test "LiF RHF" {
qp set_file lif.ezfio
run_sd -0.0649431665 1.e-6
}
@test "F ROHF" {
qp set_file f.ezfio
run_sd -0.0355395041 1.e-6
}
@test "Be RHF" {
qp set_file be.ezfio
run_sd -0.0325139011 1.e-6
}

View File

@ -49,6 +49,18 @@ function run {
run hcn.xyz 1 0 aug-cc-pvdz
}
@test "LiF" {
run lif.xyz 1 0 cc-pvtz
}
@test "F" {
run f.xyz 2 0 cc-pvtz
}
@test "Be" {
run be.xyz 1 0 cc-pvtz
}
@test "N2" {
run n2.xyz 1 0 cc-pvtz
}

View File

@ -25,3 +25,9 @@ function run {
run cu_nh3_4_2plus.gms.out cu_nh3_4_2plus.ezfio
qp set scf_utils thresh_scf 1.e-10
}
@test "O2 CAS GAMESS" { # 1.38541s
run o2_cas.gms.out o2_cas.gms.ezfio
qp set scf_utils thresh_scf 1.e-10
qp set_mo_class -c "[1-2]" -a "[3-10]" -v "[11-46]"
}

View File

@ -21,6 +21,19 @@ function run() {
run b2_stretched.ezfio -48.9950585434279
}
@test "LiF" { # 3 s
run lif.ezfio -106.9801081911955
}
@test "Be" { # 3 s
run be.ezfio -14.57287346825270
}
@test "F" { # 3 s
run f.ezfio -99.40093527229389
}
@test "SiH2_3B1" { # 0.539000 1.51094s
run sih2_3b1.ezfio -289.9654718453571
}

View File

@ -2,12 +2,7 @@ program test_2_rdm
implicit none
read_wf = .True.
touch read_wf
! call routine_active_only
! call routine_full_mos
call routine
call routine_active_only
call routine_full_mos
end
subroutine routine
implicit none
provide act_2_rdm_ab_mo
end

1
tests/input/be.xyz Normal file
View File

@ -0,0 +1 @@
Be

1
tests/input/f.xyz Normal file
View File

@ -0,0 +1 @@
F

4
tests/input/lif.xyz Normal file
View File

@ -0,0 +1,4 @@
2
Li 0. 0. 1.56359565
F 0. 0. 0.

2385
tests/input/o2_cas.gms.out Normal file

File diff suppressed because it is too large Load Diff