Advanced guides on electron integral
Computing the electron integrals is a crucial part of quantum chemistry, especially for the generation of molecular Hamiltonians. In previous tutorials, we explained how to obtain electron integrals (eInts) as well as the molecular Hamiltonian. In this tutorial, we give more detailed introductions on objects that QURI Parts provides for computing eInts, so that you may customize your algorithms for efficient eInt computations.
The standard steps of computing the electron integrals (eInts) involve:
- Obtain AO eInts from the molecule.
- Run self-consistent computation.
- Obtain spatial MO eInts from AO eInts and RHF.
- Convert spatial MO eInts to spin MO eInts.
As there are multiple types of electron integrals involved in the computation, and it is usually the case that we only need the spin MO eInt, QURI Parts provide 2 ways of obtaining the spin MO eInt.
- Save all the intermediate eInts on memory.
- Release the eInt array to the memory on demand.
We will present how to do the two versions of computations in this tutorial.
Overview
Here we give a brief introduction of how to perform the two versions of computation.
Quick summary: Compute with storing the electron integral arrays on memory
1. Define the molecule
from pyscf import gto, scf
from quri_parts.pyscf.mol import PySCFMolecularOrbitals, get_ao_eint_set
mole = gto.M(atom="O 0 0 0; H 0.2774 0.8929 0.2544; H 0.6068, -0.2383, -0.7169")
mf = scf.RHF(mole).run(verbose=0)
mo = PySCFMolecularOrbitals(mole, mf.mo_coeff)
2. Compute the AO eInts
ao_eint_set = get_ao_eint_set(mo, store_array_on_memory=True)