Skip to content

Commit

Permalink
Partial compatibility with PySCF PR #1859
Browse files Browse the repository at this point in the history
MC-PDFT code which depends on PySCF-forge remains broken. Fixes
there are pending.
  • Loading branch information
MatthewRHermes committed Oct 18, 2023
1 parent 1fedc6e commit 2aa5817
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions my_pyscf/mcscf/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 2aa5817

Please sign in to comment.