Skip to content

EPR hyperfine coupling ​

The first v2.2 EPR prototype evaluates the isotropic Fermi-contact coupling from the UHF spin density. It is a light-element, single-reference model; the g-tensor, anisotropic tensor, relativistic corrections and paramagnetic shifts are documented follow-ups.

Status. Implemented and exposed on the Rust, Python, WASM and CLI surfaces. The anisotropic tensor, g-tensor and ORCA benchmark are pending. See the v2.x roadmap.

Feature. alpha-epr (included in alpha-v2).

Fermi-contact coupling ​

For a nucleus A, the isotropic hyperfine coupling is proportional to the spin density at the nucleus:

Aiso∝gNρs(RA),ρs(r)=∑μν(Pμνα−Pμνβ)ϕμ(r)ϕν(r).

The implementation uses the proton as the reference:

Aiso=1420.405751 MHz⋅gNgp⋅ρs(RA)ρ1sH(0).

ρ_{1s}^{H}(0) is evaluated from the same STO-3G basis, so the conversion is consistent with the basis instead of assuming an analytic hydrogen density.

Nuclear g-factors ​

The built-in table covers the common light nuclei and several heavier probes:

ZNucleusZNucleus
1¹H19³⁹K
6¹³C25⁵⁵Mn
7¹⁴N / ¹⁵N26⁵⁷Fe
8¹⁷O30⁶⁷Zn
9¹⁹F31⁶⁹Ga / ⁷¹Ga
15³¹P53¹²⁷I
16³³S78¹⁹⁵Pt

The table is intentionally small and explicit. An element without a g-factor is reported as skipped, not silently assigned a default.

API ​

rust
use sci_form::epr::EprConfig;
use sci_form::compute_epr_hyperfine;

let result = compute_epr_hyperfine(
    &[1],
    &[[0.0, 0.0, 0.0]],
    &EprConfig {
        nucleus: Some(1),
        multiplicity: 2,
        ..EprConfig::default()
    },
)?;

println!("A_iso = {:.3} MHz", result.entries[0].a_iso_mhz);

Input ​

FieldMeaning
nucleusTarget atomic number; None evaluates every known nucleus
chargeTotal molecular charge
multiplicitySpin multiplicity; default doublet

Output ​

TypeMeaning
HyperfineEntryAtom index, element, g-factor, spin density and A_iso
EprHyperfineResultEntries, multiplicity and notes

Spin density is in electrons/Bohr³; coupling is in MHz.

Validation ​

GateObservableResult
Hydrogen atomA_iso1420.405751 MHz within 5 MHz
Closed-shell waterH spin density< 1 MHz
Unknown g-factorUnsupported nucleusexplicit error
MultiplicityInvalid valuerejected

The hydrogen test is a real calibration: the STO-3G proton reference density is computed from the basis, so the result is not hard-coded.

Bindings ​

SurfaceEntry point
CLIsci-form epr '<elements>' '<coords>' --nucleus 1 --multiplicity 2
WASMcompute_epr_hyperfine(elements, coords, nucleus, charge, multiplicity)
Pythoncompute_epr_hyperfine(elements, coords, nucleus=None, charge=0, multiplicity=2)

The CLI prints the full JSON result. Omitting --nucleus evaluates every atom with a tabulated g-factor; in WASM, nucleus = 0 has the same meaning. An explicit selection with no tabulated nucleus is an error, and a multiplicity or charge incompatible with the electron count is rejected by the UHF solver.

The Python binding accepts nucleus as an atomic number in 1..=118 (or None); 0, values above 118 and negative values raise ValueError. The WASM binding uses u32 so a JavaScript value above 118 no longer wraps into a valid u8 and silently selects a different element; 0 remains the all-nuclei sentinel. Non-finite or malformed coordinate arrays are also ValueError/{error} rather than an engine failure.

Limitations ​

  • Only the isotropic Fermi-contact term; the anisotropic hyperfine tensor and the g-tensor are not implemented.
  • UHF/STO-3G spin polarization is approximate; spin contamination is not corrected.
  • Relativistic effects are absent, so heavy-element couplings are screening values at best.
  • The g-factor table is finite; an unknown nucleus is skipped.
  • No paramagnetic contact shift, no zero-field splitting, no EPR spectrum simulation.
  • No conformer averaging.

Next steps ​

  1. Add the anisotropic spin-dipole tensor.
  2. Add the g-tensor response.
  3. Add relativistic corrections and ECP support.
  4. Add spin-contamination diagnostics.
  5. Add conformer averaging.
  6. Validate against ORCA for organic radicals.

Released under the MIT License.