Skip to main content


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






MC-PDFT and CMS-PDFT energies, gradients, and dipole moments, as well as MC-DCFT energies are implemented in the pyscf-forge extension project of PySCF, which is available at


PySCF and pyscf-forge can be simultaneously installed with a single pip command:

pip install git+

If there is a problem with this installation, there may sometimes be a pending bugfix already available in one of the developer forks, which can be specified by replacing the URL in the command above; for instance,

pip install git+


MC-PDFT is implemented as a standard PySCF module and class. For instance, the following runs an MC-PDFT energy calculation using the tPBE on-top functional and a CASSCF(4,4) reference wave function, followed by an MC-DCFT calculation on the same wave function using the cBLYP converted functional:

from pyscf import mcpdft, mcdcft
mc0 = mcpdft.CASSCF (mf, 'tPBE', 4, 4).run ()
mc1 = mcdcft.CASSCF (mf, 'cBLYP', 4, 4).run ()

where mf is a standard PySCF Hartree-Fock method instance for the given molecule. A CASCI reference wave function is specified in a similar way:

mc = mcpdft.CASCI (mf, 'tPBE', 4, 4).run ()

Hybrid on-top functionals can be constructed using PySCF’s custom functional string format as shown in the example input file here. Additionally, the special case of hybrid tPBE with mixing parameter = 0.25 is encoded as ‘tPBE0’. For MC-PDFT, one may recompute the energy using a different on-top functional, without recomputing the reference wave function, using

e_tot, e_ot, e_states = mc.compute_pdft_energy_(otxc='tBLYP')

where e_tot is the state-averaged (if applicable) total energy, e_ot is the on-top energy or energies of the state(s), and e_states is a list of the total energies of every state (for a single-state calculation, the list has length=1 and is the same as e_tot). One may also use this function in concert with a previously-completed MC-SCF calculation,

mc1 = mcpdft.CASSCF (mc0, 'tPBE', 4, 4)

to compute the MC-PDFT energy of a previously-optimized CASSCF or CASCI wave function (i.e., mc0) without recomputing the latter’s orbitals or CI vectors.

MC-PDFT calculations based on state-averaged CASSCF reference wave functions are specified in the same way as state-averaged CASSCF:

mc = mcpdft.CASSCF (mf, 'tPBE', 4, 4)
mc_sa = mc.state_average ([0.5,0.5]).run ()

where, in this example, the model space contains two equally-weighted states. Multi-state PDFT methods such as CMS-PDFT, XMS-PDFT, and L-PDFT are specified in a similar way, respectively:

mc_cms = mc.multi_state ([0.5,0.5], method='cms').run ()
mc_xms = mc.multi_state ([0.5,0.5], method='xms').run () 
mc_lin = mc.multi_state ([0.5,0.5], method='lin').run () 

Gradient calculations and geometry optimizations are specified in exactly the same way as in CASSCF. Permanent and transition dipole moment calculations are specified by calling the dip_moment and trans_moment member functions respectively:

perm_ss = mc.dip_moment ()
perm_sa_0 = mc_sa.dip_moment (state=0)
perm_sa_1 = mc_sa.dip_moment (state=1)
perm_cms_0 = mc_cms.dip_moment (state=0)
perm_cms_1 = mc_cms.dip_moment (state=1)
trans_01 = mc_cms.trans_moment (state=(0,1))

Note that transition dipoles are only implemented for CMS-PDFT. Dipoles and gradients are not currently available for MC-DCFT, XMS-PDFT, or L-PDFT. For complete example inputs, see examples/mcpdft, examples/mcdcft, examples/grad, examples/geomopt, and examples/prop. For more details and references, see doc/mcpdft/