Skip to content

Commit 33005af

Browse files
authored
Update pymodule.py (#425)
* Update pymodule.py * Update df-casscf-gradient-2 * Update df-casscf-gradient-2 output.ref
1 parent 6b1d437 commit 33005af

File tree

3 files changed

+1090
-136
lines changed

3 files changed

+1090
-136
lines changed

forte/pymodule.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def gradient_forte(name, **kwargs):
311311
derivobj = psi4.core.Deriv(data.psi_wfn)
312312
derivobj.set_deriv_density_backtransformed(True)
313313
derivobj.set_ignore_reference(True)
314-
if int_type == "DF":
314+
if "DF" in int_type:
315315
grad = derivobj.compute_df("DF_BASIS_SCF", "DF_BASIS_MP2")
316316
else:
317317
grad = derivobj.compute(psi4.core.DerivCalcType.Correlated)

tests/methods/df-casscf-gradient-2/input.dat

+6-2
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,9 @@ set forte{
5858

5959
#set gradient_write true
6060
#set findif points 5
61-
grad = gradient('forte')
62-
compare_matrices(ref_grad, grad, 7, "CASSCF(4,4)/DZ gradient on butadiene with frozen orbitals")
61+
grad1 = gradient('forte')
62+
compare_matrices(ref_grad, grad1, 7, "CASSCF(4,4)/DZ gradient on butadiene with frozen orbitals")
63+
64+
set forte int_type diskdf
65+
grad2 = gradient('forte')
66+
compare_matrices(grad1, grad2, 8, "DISKDF vs DF CASSCF(4,4)/DZ gradient")

0 commit comments

Comments
 (0)