This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/hf/rohf

Restricted open-shell Hartree-Fock

ROHF keeps one set of spatial orbitals for both spins: Nb closed-shell orbitals holding an alpha and a beta electron, Na - Nb open orbitals holding one alpha electron each, and the virtual rest. Unlike UHF the wavefunction is an eigenfunction of S^2, with <S^2> = S(S+1) exactly.

No single Fock operator has these orbitals as eigenvectors, so the loop (lib/hf/scf_loop, options.method = SCF_ROHF) diagonalizes an effective matrix whose off-diagonal blocks are the three stationarity conditions and whose diagonal blocks are a choice: the coupling (lib/hf/coupling explains it and holds the registry of four). The choice changes the orbital energies and the path, not the converged energy or densities. For Na < Nb (PySCF's negative spin) the run swaps the two counts, since only the number of open orbitals matters, and swaps the densities back at the end.

The result's mo_occ is 2, 1 or 0 per orbital, alpha and beta hold the spin densities, and grad is the largest of |F_a D_a S - S D_a F_a| and the same for beta, which does not vanish for ROHF; convergence reads the effective matrix's error instead.

This page holds the ROHF checks against PySCF 2.5.0:

  • H2O+ 6-31G with every coupling, and triplet water at spin -2 and +2;
  • E_UHF <= E_ROHF for H2O+, OH and O2 on every basis with full integrals;
  • O2 6-31G: the plain step from PySCF's default and stable densities;
  • every SCF regime (RHF closed shell, UHF closed and open shell, ROHF open shell) reached by at least two accelerators.

Used with import hf.rohf.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 35–277