meanfield(name, geometry, charge=0, mult=1, basis='sto-3g', package='pyscf', outpath='.')[source]

Generates a file from which the mean field electronic structure of the molecule can be retrieved.

This function uses OpenFermion-PySCF and OpenFermion-Psi4 plugins to perform the Hartree-Fock (HF) calculation for the polyatomic system using the quantum chemistry packages PySCF and Psi4, respectively. The mean field electronic structure is saved in an hdf5-formatted file in the directory os.path.join(outpath, package, basis).

The charge of the molecule can be given to simulate cationic/anionic systems. Also, the spin multiplicity can be input to determine the number of unpaired electrons occupying the HF orbitals as illustrated in the figure below.


  • name (str) – molecule label

  • geometry (list) – list containing the symbol and Cartesian coordinates for each atom

  • charge (int) – net charge of the system

  • mult (int) – Spin multiplicity \(\mathrm{mult}=N_\mathrm{unpaired} + 1\) for \(N_\mathrm{unpaired}\) unpaired electrons occupying the HF orbitals. Possible values for mult are \(1, 2, 3, \ldots\). If not specified, a closed-shell HF state is assumed.

  • basis (str) – Atomic basis set used to represent the HF orbitals. Basis set availability per element can be found here

  • package (str) – Quantum chemistry package used to solve the Hartree-Fock equations. Either 'pyscf' or 'psi4' can be used.

  • outpath (str) – path to output directory


absolute path to the file containing the mean field electronic structure

Return type



>>> name = 'h2'
>>> geometry = [['H', (0.0, 0.0, -0.35)], ['H', (0.0, 0.0, 0.35)]]
>>> meanfield(name, geometry)