/usr/share/psi4/samples/cbs-xtpl-wrapper/test.in is in psi4-data 1:1.1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | #! RHF aug-cc-pVQZ energy for the BH molecule, with Cartesian input.
#! Various gradients for a strained helium dimer and water molecule
import numpy as np
# <<< energies >>>
nucenergy_ref = 8.801465529972 #TEST
scf_dz_ref = -76.0213974638 #TEST
scf_tzvp_ref = -76.0531455176 #TEST
scf_adtz_ref = -76.059124724830 #TEST
scf_atqz_ref = -76.060985115229 #TEST
scf_adtqz_ref = -76.061691654613 #TEST
mp2_addz_ref = -76.261216702741 #TEST
mp2_atz_ref = -76.341088480148 #TEST
mp2_adtz_ref = -76.3667778886 #TEST
mp2_atqz_ref = -76.4038500042 #TEST
molecule h2o {
O
H 1 1.0
H 1 1.0 2 104.5
}
# Get a reasonable guess, to save some iterations
set globals = {
scf_type df
mp2_type df
e_convergence 7
reference rhf
}
h2o.update_geometry()
compare_values(nucenergy_ref, h2o.nuclear_repulsion_energy(), 9, "[0] Nuclear repulsion energy") #TEST
# SCF TESTS
scf_dz = energy(cbs, scf_wfn='SCF', scf_basis='cc-pVDZ')
compare_values(scf_dz_ref, scf_dz, 6, "[1] SCF/DZ Energy Check") #TEST
#scf_tzvp = energy(cbs, scf_basis='def2-TZVP')
scf_tzvp = energy(cbs, scf_wfn='SCF', scf_basis='def2-TZVP')
compare_values(scf_tzvp_ref, scf_tzvp, 6, "[2] SCF/TZVP Energy Check") #TEST
scf_adtz = energy(cbs, scf_wfn='SCF', scf_basis='aug-cc-pV[23]Z')
compare_values(scf_adtz_ref, scf_adtz, 6, "[3] SCF/a[DT]Z Energy Check") #TEST
# Three point extrapolation
scf_adtqz = energy(cbs, scf_wfn='SCF', scf_basis='aug-cc-pV[D3Q]Z')
compare_values(scf_adtqz_ref, scf_adtqz, 6, "[4] SCF/a[DTQ]Z Energy Check") #TEST
# MP2 TESTS
mp2_addz = energy(cbs, corl_wfn='MP2', corl_basis='aug-cc-pV(D+d)Z')
compare_values(mp2_addz_ref, mp2_addz, 6, "[5] MP2/a(D+d)Z Energy Check") #TEST
mp2_atz = energy(cbs, corl_wfn='MP2', corl_basis='aug-cc-pVTZ')
compare_values(mp2_atz_ref, mp2_atz, 6, "[6] MP2/aTZ Energy Check") #TEST
mp2_adtz = energy(cbs, corl_wfn='MP2', corl_basis='aug-cc-pV[2T]Z')
compare_values(mp2_adtz_ref, mp2_adtz, 6, "[7] MP2/a[DT]Z Energy Check") #TEST
mp2_atqz = energy(cbs, corl_wfn='MP2', corl_basis='aug-cc-pV[T,Q]Z')
compare_values(mp2_atqz_ref, mp2_atqz, 6, "[8] MP2/a[TQ]Z Energy Check") #TEST
# <<< gradients >>>
lref_scf_dz = [[ 0.0, 0.0, 0.01233095], #TEST
[ 0.0, 0.0, -0.01233095]] #TEST
lref_scf_tz = [[ 0.0, 0.0, 0.01246097], #TEST
[ 0.0, 0.0, -0.01246097]] #TEST
lref_scf_dtz = [[ 0.0, 0.0, 0.01249265], #TEST
[ 0.0, 0.0, -0.01249265]] #TEST
lref_scf_dtqz = [[ 0.0, 0.0, 0.01244412], #TEST
[ 0.0, 0.0, -0.01244412]] #TEST
lref_mp2_dtz = [[ 0.0, 0.0, 0.01155124], #TEST
[ 0.0, 0.0, -0.01155124]] #TEST
ref_scf_dz = psi4.Matrix(2, 3) #TEST
ref_scf_dz.set(lref_scf_dz) #TEST
ref_scf_tz = psi4.Matrix(2, 3) #TEST
ref_scf_tz.set(lref_scf_tz) #TEST
ref_scf_dtz = psi4.Matrix(2, 3) #TEST
ref_scf_dtz.set(lref_scf_dtz) #TEST
ref_scf_dtqz = psi4.Matrix(2, 3) #TEST
ref_scf_dtqz.set(lref_scf_dtqz) #TEST
ref_mp2_dtz = psi4.Matrix(2, 3) #TEST
ref_mp2_dtz.set(lref_mp2_dtz) #TEST
nucenergy_ref = 1.17594935242
molecule he_dimer {
He 0 0 0
He 0 0 1.8
}
# Get a reasonable guess, to save some iterations
set globals = {
scf_type pk
mp2_type conv
reference rhf
}
clean()
he_dimer.update_geometry()
compare_values(nucenergy_ref, he_dimer.nuclear_repulsion_energy(), 9, "[10] Nuclear repulsion energy") #TEST
# SCF TESTS
scf_dz = gradient(cbs, scf_wfn='SCF', scf_basis='cc-pVDZ')
compare_matrices(ref_scf_dz, scf_dz, 6, "[11] SCF/cc-pVDZ Gradient") #TEST
scf_tz = gradient(cbs, scf_wfn='SCF', scf_basis='cc-pVTZ')
compare_matrices(ref_scf_tz, scf_tz, 6, "[12] SCF/cc-pVTZ Gradient") #TEST
scf_dtz = gradient(cbs, scf_wfn='SCF', scf_basis='cc-pV[23]Z')
compare_matrices(ref_scf_dtz, scf_dtz, 6, "[13] SCF/cc-pV[DT]Z Gradient") #TEST
scf_dtqz = gradient(cbs, scf_wfn='SCF', scf_basis='cc-pV[DTQ]Z')
compare_matrices(ref_scf_dtqz, scf_dtqz, 6, "[14] SCF/cc-pV[DTQ]Z Gradient") #TEST
# MP2 TESTS
mp2_dtz = gradient(cbs, corl_wfn='MP2', corl_basis='cc-pV[DT]Z')
compare_matrices(ref_mp2_dtz, mp2_dtz, 6, "[15] MP2/cc-pV[DT]Z Gradient") #TEST
mp2_dtz = gradient(cbs, corl_wfn='MP2', corl_basis='cc-pV[DT]Z', dertype='energy')
compare_matrices(ref_mp2_dtz, mp2_dtz, 6, "[16] MP2/cc-pV[DT]Z Gradient, dertype=0") #TEST
# <<< optimize >>>
molecule h2 {
H
H 1 R
R = 1
}
# Conventional to keep angular momentum low
set {
scf_type pk
mp2_type conv
g_convergence GAU_VERYTIGHT
e_convergence 1.e-10
}
h2.update_geometry()
compare_values(0.529177208590000, h2.nuclear_repulsion_energy(), 9, "Nuclear repulsion energy") #TEST
optimize(cbs, scf_wfn='SCF', scf_basis='cc-pvdz')
compare_values(0.747953788665, h2.R, 4, "[17] SCF/cc-pVDZ Optimized R") #TEST
optimize(cbs, scf_wfn='SCF', scf_basis='cc-pV[DT]Z')
compare_values(0.730953222371, h2.R, 4, "[18] SCF/cc-pV[DT]Z Optimized R") #TEST
|