Skip to main content


We develop the MC-PDFT program in several packages as described below.




mrh/PySCF See:


mrh is a free and open-source Python3 program which implements localized active space self-consistent fields (LASSCF), multi-configurational pair-density functional theory (MC-PDFT), and density matrix embedding theory (MC-PDFT) calculations utilizing PySCF as a quantum-chemistry backend. It is available at


MC-PDFT and LASSCF are both implemented as PySCF-like method classes, pending integration into the main PySCF project:

from mrh.my_pyscf import mcpdft

mc = mcpdft.CASSCF (mf, 'tPBE', ncas, nelecas, grids_level=6)
mc.kernel ()

where mf is a standard PySCF mean-field method instance. Practical LASSCF calculations often require a reasonably-localized initial guess for the active orbitals, which is provided by the localize_init_guess function:

from mrh.my_pyscf.lasscf_o0 import LASSCF

las = LASSCF (mf, (ncas1, ncas2), (nelecas1, nelecas2), spin_sub=(s1, s2))
mo_init = las.localize_init_guess (([0,1,2],[9,10,11]))
las.kernel (mo_init)

Here, localize_init_guess localizes the first active subspace, nelecas1 electrons in ncas1 orbitals, to the first three atoms of the molecule; and the second active subspace, nelecas2 electrons in ncas2 orbitals, to atoms 9 through 11. For more information about running MC-PDFT and LASSCF calculations, check out the examples/mcpdft and examples/lasscf folders, respectively, in the source code.The DMET API is somewhat more involved:

from mrh.my_dmet import localintegrals, dmet, fragments

myints = localintegrals.localintegrals (mf, range (mf.mol.nao_nr ()), 'meta_lowdin')
frag1 = fragments.make_fragment_atom_list (myints, [0,1,2], 'CASSCF(4,4)')
frag2 = fragments.make_fragment_atom_list (myints, [3,4,5,6,7,8], 'RHF')
frag3 = fragments.make_fragment_atom_list (myints, [9,10,11], 'CASSCF(4,4)')
dmet_obj = dmet (myints, [frag1, frag2, frag3])
energy = dmet_obj.doselfconsistent ()

Examples of more complete DMET scripts are available in the examples/lasscf_old/me2n2 and examples/lasscf_old/c2h6n4 folders.


mrh is licensed under GNU General Public License v2.0, and is a fork of casdmet by Hung Pham and QC-DMET by Sebastian Wouters.


  1. “Multiconfigurational Self-Consistent Field Theory with Density Matrix Embedding: The Localized Active Space Self-Consistent Field Method,” M. R. Hermes and L. Gagliardi, J. Chem. Theory Comput. 2019, 15, 972.
  2. “Variational Localized Active Space Self-Consistent Field Method,” M. R. Hermes, R. Pandharkar, and L. Gagliardi, J. Chem. Theory Comput. 2020, 16, 4923.
  3. “Analytic gradients for state-averaged multiconfiguration pair-density functional theory,” T. R. Scott, M. R. Hermes, A. M. Sand, M. S. Oakley, D. G. Truhlar, and L. Gagliardi, J. Chem. Phys. 2020, 153, 014106.