# MC-PDFT

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

## OpenMolcas

See: https://comp.chem.umn.edu/openmolcas

## GAMESS

See: https://comp.chem.umn.edu/MC-PDFT_in_GAMESS

## pyscf-forge

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

https://github.com/pyscf/pyscf-forge

### Installation

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

pip install git+https://github.com/pyscf/pyscf-forge

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+https://github.com/MatthewRHermes/pyscf-forge

### Usage

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 ()

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) mc1.compute_pdft_energy_()

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. CMS-PDFT is specified in a similar way:

mc_cms = mc.multi_state ([0.5,0.5]).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, and not for MC-PDFT using a SA-CASSCF reference. Dipoles and gradients are not currently available for MC-DCFT. For complete example inputs, see examples/mcpdft, examples/mcdcft, examples/grad, examples/geomopt, and examples/prop. For more details and references, see doc/mcpdft/README.md.