Skip to main content

Module scf

Expand description

Self-Consistent Field (SCF) Iterative Driver Self-Consistent Field (SCF) Iterative Driver

Solves the generalized Roothaan-Hall equation (FC = SCE) to find the molecular ground state electronic energy.

Implements Direct Inversion in the Iterative Subspace (DIIS) to aggressively accelerate convergence, strictly bounded within the zero-heap constraints.

Structs§

RhfResult
Converged RHF result: the electronic energy plus everything a caller needs to compute post-SCF observables (orbital energies for HOMO/LUMO, the density and overlap-consistent MO coefficients for Mulliken populations and the dipole).

Enums§

ScfError
ScfFormalism

Constants§

DIIS_SUBSPACE_SIZE
Subspace size for DIIS. Maximum historical Fock/Density/Error vectors kept.
MAX_SCF_ITERATIONS
SCF_CONVERGENCE_THRESHOLD

Functions§

gaussian_elimination
Gaussian elimination solver for small DIIS mixing matrices. Solves Ax = b where A is an N x N matrix, returning x. All done strictly on the stack.
jacobi_diagonalization
Zero-heap Jacobi eigenvalue algorithm for real symmetric matrices. Returns eigenvalues and eigenvectors.
orthogonalization_matrix
Calculate symmetric orthogonalization matrix X = S^(-1/2)
solve_rhf_scf
Perform a full Restricted Hartree-Fock SCF iteration with DIIS
solve_rhf_scf_4index
Full Restricted Hartree-Fock SCF with a REAL 4-index two-electron contraction and DIIS acceleration.
transpose
Helper function to perform matrix transposition on zero heap.