ROHF and ROKS (restricted open-shell SCF)¶
vibe-qc has two mean-field references for open-shell molecules:
the unrestricted family (UHF / UKS) and the restricted
open-shell family (ROHF / ROKS) documented here. Both describe the
same radical or high-spin state; they differ in one decision: whether
the α and β electrons are allowed independent spatial orbitals.
This page is the dedicated reference for ROHF/ROKS: when to pick them over
UHF/UKS, how to run them, and what gradient/optimisation/post-SCF support
exists. For the broader open-shell setup (multiplicity, charge) see
molecules.md; for the
Fock-build modes that apply to every SCF method see
scf_modes.md.
When to use ROHF vs UHF¶
UHF / UKS (unrestricted) |
ROHF / ROKS (restricted open shell) |
|
|---|---|---|
Spatial orbitals |
independent α and β sets |
one common set: closed + open + virtual |
Spin purity |
not a spin eigenfunction; ⟨S²⟩ deviates from |
spin-pure by construction: ⟨S²⟩ = |
Energy |
variationally lowest single determinant |
slightly higher than UHF (extra orbital constraint) |
Best for |
quick open-shell SCF, bond breaking / strong static correlation where symmetry breaking is wanted |
spin-pure references for post-HF (ROHF-MP2 / ROHF-CC), a clean CAS starting point, and properties sensitive to spin contamination (hyperfine, spin densities) |
Rule of thumb. Reach for ROHF/ROKS when spin contamination would corrupt the answer or the downstream method (a spin-pure CAS reference, an ROHF-CCSD(T) energy, a clean spin density). Reach for UHF/UKS when you want the lowest single-determinant energy, are breaking bonds, or need a large fast DFT relaxation. UHF’s ⟨S²⟩ is reported in every open-shell run so you can see the contamination directly.
Running ROHF / ROKS¶
The spin partition (n_alpha − n_beta = multiplicity − 1) is read from
Molecule.multiplicity, exactly as for UHF. Use the dedicated drivers
(run_rohf / run_roks) for a result object, or run_job for the full
end-to-end run with output files + citations.
import vibeqc as vq
# Hydroxyl radical (doublet). See examples/molecular/input-oh-rohf.py.
oh = vq.Molecule(
atoms=[vq.Atom(8, [0.0, 0.0, 0.0]),
vq.Atom(1, [0.0, 0.0, 1.834])], # bohr
multiplicity=2,
)
basis = vq.BasisSet(oh, "6-31g*")
rohf = vq.run_rohf(oh, basis) # spin-pure: <S^2> = 0.75 exactly
print(rohf.energy, rohf.s_squared)
# End-to-end (writes .out / .molden / .references / .bibtex):
vq.run_job(oh, basis="6-31g*", method="rohf", output="oh_rohf")
The Kohn-Sham counterpart is ROKS, the same Roothaan coupling with a spin-polarised XC potential:
roks = vq.run_roks(oh, basis, functional="pbe") # spin-pure KS
vq.run_job(oh, basis="6-31g*", method="roks", functional="b3lyp",
output="oh_roks") # see examples/molecular/input-ch3-roks.py
ROKS supports LDA, GGA, meta-GGA, global-hybrid, and
range-separated-hybrid functionals (B3LYP, PBE0, TPSS, r²SCAN,
ωB97X, ωB97M-V, …). Double hybrids (B2PLYP, DSD-PBEP86, PWPB95)
run through vibeqc.run_double_hybrid (spin-pure ROKS SCF + a
semicanonical ROHF-MP2 doubles correction); a direct run_roks on a
double-hybrid functional points you there because the SCF energy alone
is incomplete. Convergence knobs live on
ROHFOptions / ROKSOptions (max_iter, conv_tol_energy,
conv_tol_grad, use_diis, level_shift, density_fit / aux_basis).
For degenerate ROKS terms, the KS driver averages the frontier shell
instead of forcing one arbitrary component to be the SOMO. Linear
OH(2Pi), for example, is represented with occupations
2, 2, 2, 1.5, 1.5, 0, ... across the pi pair; this preserves the
restricted open-shell symmetry and prevents the larger-basis ROKS/PBE
oscillation that an integer 2, 2, 2, 2, 1, 0, ... assignment produces.
Gradients, geometry optimisation, frequencies¶
ROHF has an analytic gradient (vibeqc.compute_rohf_gradient), so
geometry optimisation and harmonic frequencies run at full speed:
opt = vq.run_job(oh, basis="6-31g*", method="rohf", optimize=True)
frq = vq.run_job(oh, basis="6-31g*", method="rohf", hessian=True) # FD of the analytic gradient
ROKS geometry optimisation uses finite-difference forces for now
(the analytic molecular XC-gradient term is pending), correct but
slower; prefer UKS for large fast DFT relaxations. See
geometry_optimization.md for the optimiser
itself.
Beyond single points¶
ROHF/ROKS also drive:
Spin-pure CAS references:
cas_reference="rohf"gives CASSCF/CASCI a spin-pure starting determinant (cleaner than UHF natural orbitals); seenon_hf_solvers.md.ROHF-reference CCSD / CCSD(T):
run_job(method="ccsd(t)", ccsd_reference="rohf")runs the spin-orbital coupled-cluster kernel on the spin-pure reference; seeccsd.md.Semicanonical ROHF-MP2:
run_job(method="mp2", mp2_reference="rohf")(orvibeqc.run_rohf_mp2) computes second-order Møller-Plesset correlation on the spin-pure reference, including the Brillouin singles term that UMP2 lacks (Knowles et al. 1991). Needs a basis with a bundled RI auxiliary (cc-pVDZ / def2; Pople bases raise a clear error).Atomization energies (
run_job(atomization=True), with spin-pure free-atom references), PES scans (vibeqc.scan), and the molecular optimiser (vibeqc.molecular_optimize.optimize_molecule).The ASE calculator:
VibeQC(restricted_open=True)runs ROHF with analytic forces; seease_integration.md.
Periodic ROHF¶
Restricted open-shell HF is available for periodic systems at the
Γ-point and with full Brillouin-zone sampling (EWALD_3D), via the
standalone drivers run_rohf_periodic_gamma_ewald3d and
run_rohf_periodic_multi_k_ewald3d. A second standalone entry point,
run_periodic_rohf_gpw, provides 3D Gamma-point HF with GPW Hartree J,
per-spin exact K, and the Ewald one-electron/nuclear gauge. It uses the
shared Roothaan loop to retain one spatial-orbital set and integer 2/1/0
occupations.
These drivers are not yet wired into the run_periodic_job dispatcher.
The GPW route is not a GDF, BIPOLE, GAPW, or multi-k GPW implementation,
and periodic ROKS (periodic XC) and electronic smearing are still
pending. The smearing_alpha keyword on run_periodic_rohf_gpw controls
nuclear-charge smoothing, not electronic Fermi smearing. See
periodic_methods.md § 3.8 for the periodic SCF
context.
Theory¶
ROHF uses Roothaan’s single effective Fock operator (Roothaan,
Rev. Mod. Phys. 32, 179 (1960)). The MOs are partitioned into
closed, open, and virtual blocks with integer occupations (2/1/0). A
single effective Fock matrix is assembled from the per-spin Fα/Fβ via
Coulson’s coupling so that one diagonalisation yields a spin eigenfunction
with ⟨S²⟩ = S(S+1) exactly. ROKS reuses the identical coupling but with
Fα/Fβ carrying the spin-polarised KS exchange-correlation potential and,
for degenerate frontier terms, uniform fractional occupations within the
open block. Its energy uses E_xc[ρα, ρβ] in place of full exact exchange. The
roothaan_rohf_1960 citation fires automatically in any ROHF/ROKS run
(including CAS jobs that use cas_reference="rohf").
See also¶
molecules.md: open-shell configuration (multiplicity, charge) and the UHF/ROHF choice in context.functionals.md: functional families (ROKS supports LDA / GGA / meta-GGA / global and range-separated hybrids).scf_modes.md: AUTO / CONVENTIONAL / DIRECT Fock-build modes, shared by all SCF methods.non_hf_solvers.md: CAS / multireference methods (cas_reference="rohf").ccsd.md: coupled cluster, incl.ccsd_reference="rohf".