qat.fermion.chemistry.pyscf_tools.perform_pyscf_computation
- qat.fermion.chemistry.pyscf_tools.perform_pyscf_computation(geometry: list, basis: str, spin: int, charge: int, run_fci: bool = False)
Perform various calculations using PySCF. This function is a helper function meant to kickstart molecule studies. Its use is completely optional, and using other methods or packages is entirely possible.
This function will compute:
The reduced density matrix,
The orbital energies,
The nuclear repulsion constant,
The number of electrons,
The one- and two-body integrals,
The groundstate energies obtained through Hartree-Fock and 2nd order Möller-Plesset perturbation approach,
(Optional) The groundstate energy using the full configuration interaction (full CI) approach.
Note
The FCI computation is very expensive for big molecules. Enable it only for small molecules !
- Parameters
geometry (list) –
Defines the molecular structure. The internal format is PySCF format:
atom = [[atom1, (x, y, z)], [atom2, (x, y, z)], ... [atomN, (x, y, z)]]
basis (str) – Defines the basis set.
spin (int) – 2S, number of alpha electrons - number beta electrons to control multiplicity. If spin is None, multiplicity
molecule. (will be guessed based on the neutral) –
charge (int) – Charge of molecule. Affects the electron numbers.
run_fci (bool, optional) – Whether the groundstates energies should also be computed using a full CI approach. Defaults to False.
- Returns
rdm1 (np.ndarray): Reduced density matrix.
orbital_energies (list): List of orbital energies.
nuclear_repulsion (float): Nuclear repulsion constant.
nels (int): Number of electrons.
one_body_integrals (np.ndarray): One-body integral.
two_body_integrals (np.ndarray): Two-body integral.
info (dict): Dictionary containing the Hartree-Fock and 2nd order Möller-Plesset computed ground state energies (and optionally the Full CI energy if run_fci is set to True).
- Return type
Tuple[np.ndarray, list, float, int, np.ndarray, np.ndarray, dict]