hartreefock

class slowquant.hartreefock.hartreefockclass._HartreeFock(molecule_obj, integral_obj)

Initialize Hartree-Fock class.

Parameters:
  • molecule_obj – Molecule object.

  • integral_obj – Integral object.

property log: str

Get log.

property rdm1_charge: ndarray

Get charge density 1-RDM.

\[D_\mathrm{C} = D_\alpha + D_\beta\]
Returns:

Charge density 1-RDM.

property rdm1_spin: ndarray

Get spin density 1-RDM.

\[D_\mathrm{S} = D_\alpha - D_\beta\]
Returns:

Spin density 1-RDM.

run_restricted_hartree_fock() None

Run restricted Hartree-Fock calculation.

run_unrestricted_hartree_fock() None

Run restricted Hartree-Fock calculation.

property spin_contamination: ndarray

Get spin contamination.

\[s = \sum_{i,j}^{N_\alpha,N_beta}\left|S_{ij}^{\alpha\beta}\right|^2\]
\[S_{ij}^{\alpha\beta} = C_{ai}^\alpha C_{bj}^\beta S_{ab}^\mathrm{AO}\]
Returns:

Spin density 1-RDM.

slowquant.hartreefock.hartreefock_in_memory.run_hartree_fock(S: ndarray, T: ndarray, V: ndarray, ERI: ndarray, number_electrons: int, log: _Logger, dE_threshold: float, rmsd_threshold: float, max_scf_iterations: int, use_diis: bool = True) tuple[float, ndarray, ndarray, ndarray]

Run restricted Hartree-Fock calculation.

Reference: https://github.com/CrawfordGroup/ProgrammingProjects/tree/master/Project%2303

class slowquant.hartreefock.diis.DIIS(number_bf: int, number_fock_saved_: int = 6)

Initialize DIIS-solver.

Parameters:
  • number_bf – Number of basis functions.

  • number_fock_saved – Max number of previous Fock matrices saved.

get_extrapolated_fock_matrix(fock_matrix: ndarray, density_matrix: ndarray, S: ndarray)

Calculate F’.

Reference: https://github.com/CrawfordGroup/ProgrammingProjects/tree/master/Project%2308

Parameters:
  • fock_matrix – Fock matrix.

  • density_matrix – Density matrix.

  • S – Overlap integral matrix.

Returns:

Extrapolated Fock matrix.