From 2aa5817ab01dcabe8878f02fb291d6227fdb13a2 Mon Sep 17 00:00:00 2001 From: Matthew R Hermes Date: Wed, 18 Oct 2023 11:38:40 -0500 Subject: [PATCH] Partial compatibility with PySCF PR #1859 MC-PDFT code which depends on PySCF-forge remains broken. Fixes there are pending. --- my_pyscf/mcscf/addons.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/my_pyscf/mcscf/addons.py b/my_pyscf/mcscf/addons.py index fcd8087e..7fdf80ab 100644 --- a/my_pyscf/mcscf/addons.py +++ b/my_pyscf/mcscf/addons.py @@ -22,10 +22,11 @@ def get_sanmix_fcisolver (samix_fcisolver): if isinstance (samix_fcisolver, StateAverageNMixFCISolver): return samix_fcisolver + fcisolvers, weights = samix_fcisolver.fcisolvers, samix_fcisolver.weights class FCISolver (samix_fcisolver.__class__, StateAverageNMixFCISolver): _get_nelec = StateAverageNMixFCISolver._get_nelec - sanmix_fcisolver = FCISolver (samix_fcisolver.mol) + sanmix_fcisolver = FCISolver (fcisolvers, weights) sanmix_fcisolver.__dict__.update (samix_fcisolver.__dict__) return sanmix_fcisolver @@ -192,7 +193,7 @@ def states_trans_rdm12s (self, ci1, ci0, norb, nelec, link_index=None, **kwargs) contract_2e = states_contract_2e make_hdiag = states_make_hdiag - h1ezipped_fcisolver = FCISolver (fcisolver.mol) + h1ezipped_fcisolver = FCISolver (fcisolver.fcisolvers, fcisolver.weights) h1ezipped_fcisolver.__dict__.update (fcisolver.__dict__) return h1ezipped_fcisolver