Pull Request for Multireference Methods Using Nonorthogonal Orbitals: GBCI, GB-PDFT, and XMS-GB-PDFT. - #200
Conversation
| return np.ascontiguousarray(arr, dtype=dtype) | ||
|
|
||
|
|
||
| def _grid_ao2mo(mol, ao, mo_coeff, non0tab=None, shls_slice=None, ao_loc=None): |
There was a problem hiding this comment.
This looks the same as _grid_ao2mo in pyscf.mcpdft.otpd
There was a problem hiding this comment.
Thanks for pointing this out. I refactored the GBCI OTPD code to reuse pyscf.mcpdft.otpd._grid_ao2mo instead of keeping a duplicate local implementation.
|
Move |
|
Thanks for your comment. I moved GBCI examples to |
matthew-hennefarth
left a comment
There was a problem hiding this comment.
There seems to be a lot of copy-paste from the main MC-PDFT repo but with some genuine modification in places. However, with regard to the MS-PDFT stuff, I think there is a chance for reuse of the existing code as must as possible, rather than copy/pasting. You can explore making the MSGBPDFT a child class of the MS-PDFT class in the core repo, but then modify/delete functions as necessary.
Also, you have only a few tests for a rather large amount of feature implemented (ie GBCI, GBPDFT, GBMSPDFT). And as I mentioned with regard to the TDM/DM etc, there might be additional untested features in the current PR.
|
Thank you for the detailed review. I will narrow the scope of this PR by removing the unvalidated property/TDM wrappers, refactor the MS-GBPDFT implementation to reuse the core MS-PDFT machinery where possible, and add focused tests for GBCI, GBPDFT, and XMS-GBPDFT, including a hybrid functional case(tPBE0). |
|
Thank you for the detailed review. I pushed an update addressing these points. I removed the property/TDM-related wrappers from this PR, refactored MS-GBPDFT to subclass the core MS-PDFT implementation and reuse its driver code, and added tests covering the GBCI RDM paths, GBPDFT, XMS-GBPDFT, and a tPBE0 hybrid case. Following the suggestion about not immediately breaking existing scripts, I kept |
M. Oh, J. Park, B. Kim, H. Lim, and S. Lee, Orbital-Relaxed Bath Theory for Charge-Transfer Processes in Transition-Metal Complexes, PCCP, 28, 13294 (2026)
Detailed Description
Overview
This PR introduces grouped-bath configuration interaction (GBCI) and
GBCI-based pair-density functional theory methods to PySCF-forge.
The previous
pyscf.sfnociimplementation has been renamed and reorganized aspyscf.gbci. In addition to the namespace change, routines that were previouslyembedded in
sfnoci.pyanddirect_sfnoci.pyhave been separated into reusablemodules, and new GBPDFT, MS-GBPDFT, and XMS-GBPDFT drivers are added.
Main Changes
1. GBCI core (
gbci/gbci.py,gbci/direct_gbci.py)Renames and reorganizes the previous SFNOCI implementation as GBCI:
sfnoci.pyworkflow togbci.pydirect_sfnoci.pytodirect_gbci.pylibsfnocitolibgbci2. Frozen active-space SCF utilities (
gbci/fasscf.py)Separates the frozen active-space SCF routines previously embedded in
sfnoci.pyinto a standalone reusable module.This module is used by the GBCI orbital-relaxation workflow and includes:
3. Density-matrix utilities (
gbci/rdm.py)Separates and extends the density-matrix routines previously embedded in
direct_sfnoci.py.The previous state-specific spin-separated 1-RDM and 2-RDM routines were
refactored and optimized. This PR also adds transition 1-RDM construction
between GBCI states and exposes reusable intermediates for GBPDFT and
XMS-GBPDFT calculations.
These intermediates are important because GBPDFT avoids explicitly constructing
full 2-RDM/2-CDM objects when evaluating the translated on-top pair density.
4. GBPDFT and on-top pair density (
gbci/gbpdft.py,gbci/otpd.py)Adds GBCI-reference pair-density functional theory:
5. MS-GBPDFT and XMS-GBPDFT (
gbci/msgbpdft.py,gbci/xmsgbpdft.py)Adds multi-state GBPDFT variants:
6. C library updates (
lib/gbci/)Updates and extends the C helper code:
lib/sfnoci/SFNOCI_contract.ctolib/gbci/gbci_contract.clib/gbci/otpd_contract.cfor GBPDFT on-top pair-density contractionslibgbciandlibgbpdftVerification Results
The GBCI test suite was run locally:
env PYTHONPATH=/home/Qchem_OMS/pyscf \ PYSCF_EXT_PATH=/home/Qchem_OMS/pyscf-forge \ python pyscf/gbci/test/test_gbci.pyResult:
The tests cover:
Example Usage
Additional examples are provided in:
examples/gbci/00-gbci.pyexamples/gbci/01-gbpdft.pyexamples/gbci/02-xmsgbpdft.pyReferences
SF-NOCI
N. J. Mayhall, P. R. Horn, E. J. Sundstrom, and M. Head-Gordon,
"Spin-flip non-orthogonal configuration interaction: a variational and almost black-box method for describing strongly correlated molecules",
Phys. Chem. Chem. Phys. 16, 22694 (2014).
SF-GNOCI (GBCI) / Grouped-Bath Ansatz
J. Park and S. Lee,
"Efficient grouped-bath ansatz for spin-flip non-orthogonal configuration interaction in transition-metal charge-transfer complexes",
J. Chem. Theory Comput. 21, 2988–2997 (2025).
Orbital-Relaxed Bath Theory (GBPDFT)
M. Oh, J. Park, B. Kim, H. Lim, and S. Lee,
"Orbital-relaxed bath theory for charge-transfer processes in transition-metal complexes",
Phys. Chem. Chem. Phys. 28, 13294–13303 (2026).
MC-PDFT
G. Li Manni, R. K. Carlson, S. Luo, D. Ma, J. Olsen, D. G. Truhlar, and L. Gagliardi,
"Multiconfiguration Pair-Density Functional Theory",
J. Chem. Theory Comput. 10, 3669–3680 (2014).
Multi-State PDFT / XMS-PDFT
J. J. Bao, C. Zhou, Z. Varga, S. Kanchanakungwankul, L. Gagliardi, and D. G. Truhlar,
"Multi-state pair-density functional theory",
Faraday Discuss. 224, 348–372 (2020).
Files Changed
pyscf/sfnoci/sfnoci.py→pyscf/gbci/gbci.pypyscf/sfnoci/direct_sfnoci.py→pyscf/gbci/direct_gbci.pypyscf/gbci/fasscf.pypyscf/gbci/rdm.pypyscf/gbci/gbpdft.pypyscf/gbci/msgbpdft.pypyscf/gbci/xmsgbpdft.pypyscf/gbci/otpd.pypyscf/gbci/test/test_gbci.pyexamples/gbci/00-gbci.pyexamples/gbci/01-gbpdft.pyexamples/gbci/02-xmsgbpdft.pypyscf/lib/sfnoci/SFNOCI_contract.c→pyscf/lib/gbci/gbci_contract.cpyscf/lib/gbci/otpd_contract.cpyscf/lib/CMakeLists.txtTesting
The following tests and example scripts were run successfully:
All tests and example scripts completed successfully.