Capabilities and validation
Implemented ≠ validated. Working code is not a checked number.
Read this page before trusting any result. It lists every CLI method.kind
(which references it accepts, which tasks it supports, the matching Python
function, an example input) and the Python entry points. Each graded CLI
method.kind gets a grade (three kinds are ungraded, and Python entry points
are not graded individually), and the page shows how far each grade's numbers have been checked against an
independent reference and where they are known to fail.
How to read it: find the capability in the matrix
or the Python entry points. A matrix Grade cell links
to the Anchors table when a row there holds the evidence; the
Known limits section records the measured
negatives. Every matrix cell comes from the CLI dispatch in
crates/ferric-cli/src/lib.rs or the bindings in
crates/ferric-python/src/lib.rs. The page is maintained by hand, so check
those two files if a cell looks wrong. For keyword details see the
input reference; for the example files see the
examples index.
Grades
The grades are the ones ferric's CLI uses. Every CLI method.kind except
laplace-sos-mp2 has a grade. A kind's grade is for the exact method; the
local approximation of rimp2, drpa and linlccd (the [local] section)
is graded separately in that row's Caveat. The CLI prints the Smoke and Spike
grades as a [warning] line on stderr at run time; Proven kinds and the
ungraded kind print nothing. The warning text is the
EPISTEMIC_WARNINGS table in crates/ferric-cli/src/lib.rs, and the
"Caveat" column of the matrix condenses it. The grades themselves are
METHOD_KIND_GRADES in crates/ferric-core/src/certificate.rs, a copy of the
Grade column below that a test keeps equal to it.
rhf, uhf, rohf and ksdft energy runs print a certificate block after
the energy and write it to the JSON run log (run_end.extra.certificate; a
certificate record for the open-shell runs); Python RhfResult,
UhfResult and DftResult carry it as .certificate. It states the kind's
grade, the build, the approximations in effect (RI-J / RI-K, LinK / COSX, the
XC grid, a level shift, ECPs, embedding, solvation) and warnings: a Plateau
exit, a non-Stable stability verdict, and an unchecked UHF/UKS stability. An
unconverged SCF is capped to not graded.
Post-SCF kinds print a certificate block after their result: the MP2 family
(rimp2 exact, local and open-shell, mp3, oo-rimp2, att-rimp2, mp2-v,
scs-mp2, scs-mp2-2terfc, laplace-mp2, laplace-sos-mp2), rs-mp2-rpa,
drpa, pdep-rpa, ccsd, ccd, ccsd(t), linlccd, wb97x-l-v, b2plyp,
dsd-pbep86, tda, tddft, gw, bse-tda and
tdhf-static-polarizability. Kinds that write a result record carry it as
result.components.certificate; pdep-rpa, wb97x-l-v, b2plyp,
dsd-pbep86, tda, tddft, gw, bse-tda and
tdhf-static-polarizability write a certificate record. Python
RiMp2Result, Mp3Result, OoRiMp2Result, AttenuatedMp2Result,
ScsMp2Result, Mp2VResult, LaplaceMp2Result, SosMp2Result,
RsMp2RpaResult, CcResult, PdepRpaResult, GwResult, UGwResult,
BseResult, TdhfStaticPolarizabilityResult, DoubleHybridResult and
TddftResult carry it as .certificate;
the run_drpa and run_linlccd dicts carry a "certificate" key. The grade is the kind's row, capped at the grade of the
SCF reference's certificate, whose approximations and warnings it repeats as
scf <name> and scf reference: .... It records the auxiliary basis, frozen
core, a non-Coulomb correlation operator and each method's settings (SCS
scales, Laplace points, frequency quadrature, PDEP truncation, GW variant,
double-hybrid scaling or λ and ω, the TDDFT response grid).
Caps to not graded: an [local] amplitude threshold at finite eps, an
unconverged orbital optimization (oo-rimp2), drCCD fixed point (drpa) or
evGW eigenvalue loop. Warnings: GW and BSE-TDA runs at settings other than
n_quad = 100, trunc_thresh = 0, unconverged quasiparticle roots, suspect
quasiparticle energies, an unconverged PDEP eigensolver. Periodic runs (the
CLI [cell] section and the Python Gamma-point and k-point results) carry a
certificate with the grade not graded.
| Grade | Meaning |
|---|---|
| Proven | Total energies (or the stated property) agree at a stated tolerance with an independent reference, pinned by tests. An independent reference is another code (PySCF, MOLGW), a numpy reference, a published value, or an exact limit the method must reduce to. The [warning] line treats "Proven" and "Proven (narrow)" alike; the certificate names the grade. |
| Proven (narrow) | As Proven, but only on the stated class of systems, or only against the stated kind of reference (for example exact limits only) |
| Smoke | Runs end to end, and some pieces are checked, but there is no independent reference for the headline number, or only one loose one. The checks are range bands, internal consistency or limits rather than a tight external number. Do not quote a Smoke result as a reference value. |
| Spike | Built on new infrastructure and not yet compared against any reference code; for exploration only |
| not graded | Dispatched by the CLI with no recorded grade, so it prints no warning; treat it as unproven |
Symbols: ✓ = supported. — = not supported (the CLI refuses it with an error).
FD = finite differences of the analytic gradient (6N gradient
evaluations). The analytic Hessian covers closed-shell RHF and UHF of any multiplicity (both also
with RI-J and/or RI-K, without an external potential; all with ECPs), and ROHF with exact J/K or RI and
no external potential, with a basis up to f functions; rhf, uhf and
rohf frequencies use it there by default.
CLI method.kind matrix
"Reference" is the SCF reference the CLI builds for that kind. Open-shell support is listed only where the dispatch code handles it (see Open shells below).
method.kind | Family | Reference (CLI) | Energy | task = "optimize" | task = "frequencies" | Python | Example | Grade | Caveat |
|---|---|---|---|---|---|---|---|---|---|
rhf | SCF | RHF; RKS with [dft] functional (refuses multiplicity > 1) | ✓ | ✓ analytic | analytic (RHF, exact J/K, ECPs included, up to f; RKS through the moving-grid KS Hessian, as for ksdft); FD otherwise | run_rhf, run_optimize, run_frequencies | water-rhf.toml | Proven | — |
uhf | SCF | UHF; UKS with [dft] functional | ✓ | ✓ analytic (+ D3(BJ) or MBD@rsSCS gradient with [dft] dispersion on UKS) | analytic (UHF, exact J/K, ECPs included, up to f); FD otherwise; with [dft] dispersion on UKS, FD of the KS + dispersion gradient | run_uhf, run_frequencies(reference="uhf", xc=..., dispersion=...) | h_uhf.toml | Proven | — |
rohf | SCF | ROHF; ROKS with [dft] functional | ✓ | ✓ analytic (+ D3(BJ) or MBD@rsSCS gradient with [dft] dispersion on ROKS) | analytic (ROHF, exact J/K or RI, ECP allowed, no external potential, up to f); FD otherwise, and for ROKS (+ the dispersion gradient with [dft] dispersion on ROKS) | run_rohf, run_frequencies(reference="rohf", xc=..., dispersion=...) | nh2-rohf-frequencies.toml | Proven | — |
ksdft | SCF/DFT | RKS; UKS when multiplicity > 1 | ✓ | ✓ analytic (+ D3(BJ) or MBD@rsSCS gradient with [dft] dispersion, RKS and UKS) | analytic moving-grid (RKS LDA/GGA, pure or global hybrid, exact or RI J/K, no ECP or external potential, unpruned grid, response AO table within its cap); FD otherwise (UKS, meta-GGA, VV10, RSH, …); with [dft] dispersion FD of the KS + dispersion gradient (RKS and UKS) | run_dft / run_ksdft, run_frequencies(xc=..., dispersion=...) | benzene-dfb3lyp.toml, h2-lda-opt.toml | Proven | — |
rimp2 | MP2 | RHF; UHF + unrestricted RI-MP2 when multiplicity > 1 (energy only) | ✓ | ✓ analytic (Z-vector; closed shell only) | — | run_rimp2 (UHF + UMP2 when multiplicity > 1) | water-rimp2.toml; local: water-rimp2-local.toml, alkane8-rimp2-local-direct.toml | Proven | Exact RI-MP2. With [local] scheme = "amplitude-threshold" (run_rimp2(local=..., eps=...)): Proven (narrow) by its exact limit — at ε = 0 the in-core and integral_direct paths match PySCF DF-MP2 to ≤1.38e-11 Ha (H2O and n-butane, 6-31G and cc-pVDZ), at the default PCG stop of relres 1e-6; finite ε is a measured error map, not validated; closed shell and task = "energy" only; ε = 0 reproduces exact rimp2; the exact reference and the error against it are opt-in ([local] reference = true, compute_reference=True). integral_direct = true never forms the global 3-index tensor; its measured scaling is under Known limits. On the device ([gpu]) the energy stage runs with B_ov resident: at precision = "f64" (the default) it agrees with the CPU path to within a bound on the difference of summation order (gpu_rimp2_resident.rs); with precision = "mixed" and rimp2-energy in mixed_kernels it is a measured error map, not Proven (f32-resident B_ov, f64 accumulation; closed-shell and unrestricted, Coulomb, erfc and terfc operators), graded under Mixed-precision GPU kernels. |
mp3 | MP2 | RHF | ✓ | — | — | run_mp3 | water-mp3.toml | Proven | — |
oo-rimp2 | MP2 | RHF; UHF + unrestricted OO-RI-MP2 when multiplicity > 1 (energy only) | ✓ | — | — | run_oo_rimp2 (closed shell only) | water-oo-rimp2.toml | Proven (narrow) | Energy matches an independent numpy OO-RI-MP2 to 7.5e-13 Ha (closed-shell H2O and NH3, UHF CH3 / cc-pVDZ) and the closed-shell analytic gradient matches a finite difference of its own energy to 8e-9 Ha/Bohr. ORCA 6.1.1 stops 3.7e-8 to 7.0e-8 Ha above the same minimum. |
att-rimp2 | MP2 | RHF | ✓ | — | — | run_attenuated_rimp2 | water-attmp2.toml | Proven | — |
mp2-v | MP2 | RHF; UHF when multiplicity > 1 (energy only) | ✓ | — | — | run_mp2_v (closed shell only) | water-mp2v.toml | Proven (narrow) | The implementation is Proven (narrow): the damped and undamped VV10 half, the terfc-attenuated MP2 half (the published operator) and the erfc control each match an independent PySCF/numpy reference on H2O (cc-pVDZ, aug-cc-pVDZ) and NH3 (cc-pVDZ); the VV10 half and the erfc control also on the S22 water dimer (aug-cc-pVDZ). The terfc E_c itself is not re-validated as an operator here (that is the SCS-MP2(2terfc) row); this row adds its wiring through AttVv10Config::mp2_v_terfc_atz (r₀ in Å → Bohr → ω, metric, frozen core) and the unrestricted path (see Anchors). The parameterization is not benchmarked: the defaults (r₀ = 1.00 Å, b = 11.0, C = 0.0089) are fitted for aug-cc-pVTZ with frozen core and no counterpoise, only an aug-cc-pVTZ subset of S66 has been run (n=5: H-bonded and mixed dimers, S66x8 geometry and references, no CP-anchored reference), and no published MP2-V total energy exists to compare against, so another basis, frozen_core = 0 (the CLI default) or a different system class is unparameterized extrapolation. Open shell is checked only as a UHF singlet collapsed onto RHF; no open-shell parameterization exists (S66 is closed-shell). |
scs-mp2 | MP2 | RHF | ✓ | — | — | run_scs_mp2 | water-scs-mp2.toml | Proven | — |
scs-mp2-2terfc | MP2 | RHF | ✓ | — | — | run_scs_mp2_2terfc | water-scs-mp2-2terfc.toml | Proven (narrow) | No other code implements terfc. The terf/terfc integrals and the E_OS/E_SS/Eq. 12 energies match an independent Fourier-space construction (H2O, NH3 / cc-pVDZ; H2O / aug-cc-pVDZ). The published parameters are fitted for aug-cc-pVTZ with frozen core and no counterpoise; Only an aug-cc-pVTZ S66 subset (n=5, H-bonded/mixed, S66x8 geometry) has been run; there is no full-set statistic. Needs the terfc tables (FERRIC_TERF_TABLE_DIR, or the repository's terf-tables/). |
laplace-mp2 | MP2 | RHF | ✓ | — | — | run_laplace_mp2 | water-laplace-rimp2.toml | Proven | Minimax-Laplace denominators on five systems (R = 19.0 to 45.7) against exact DF-MP2 and against a quadrature-isolated reference that separates quadrature error from implementation error. See the Anchors table. |
laplace-sos-mp2 | MP2 | RHF | ✓ | — | — | run_laplace_sos_mp2 | water-laplace-sos-mp2.toml | not graded | With c_os = 1.0 it reproduces the opposite-spin MP2 energy (internal reference). |
pdep-rpa | RPA/GW | RHF, or RKS via [rpa] xc; UHF/UKS when multiplicity > 1 (energy only) | ✓ | ✓ (closed-shell RHF reference only; [rpa] xc is refused; analytic SCF + FD correlation) | — | run_pdep_rpa (closed shell only; open-shell U-PDEP-RPA is CLI-only) | water-pdep-rpa.toml | Proven | Open shell: Lanczos/Davidson, Dense/Laplace χ₀ and run_diagnostics; full rank, Lanczos ≡ Davidson ≡ the full-basis U-RI-dRPA diagnostic and a UHF singlet ≡ the closed-shell path (u_pdep_rpa.rs); chi0_sparsity = "boys" (or "auto" resolving to it) is refused. |
rs-mp2-rpa | MP2 / RPA | RHF | ✓ | — | — | run_rs_mp2_rpa | water-rs-mp2-rpa.toml | Smoke | The ω→0 and ω→∞ limits reduce exactly to MP2 and MP2+dRPA and are Proven. At production ω it is only marginally benchmarked on one small subset and is unproven on new systems. |
gw | RPA/GW | RHF, or RKS via [rpa] xc; UHF/UKS, or ROHF/ROKS with [gw] reference = "rohf", when multiplicity > 1 (energy only) | ✓ (QP energies) | — | — | run_gw, run_u_gw | water-g0w0-pbe.toml, oh-ugw.toml | Smoke | Matches PySCF gw_ac/ugw_ac only at matched settings (G0W0@HF and @PBE ≤1.3e-7 Ha, evGW ≤5.7e-7, ECP ≤2.5e-6, U-G0W0@UHF ≤7e-6 Ha; U-G0W0@UKS/PBE, with Σx − v_xc inside each spin's quasiparticle equation, ≤2.6e-8 Ha; U-G0W0 on a semi-canonicalized ROHF reference in the Anchors; the ROKS reference is not compared) with [rpa] n_quad = 100 and trunc_thresh = 0; the CLI defaults are coarser (the 20-point grid moves the H2O G0W0@PBE HOMO by 13 meV) and truncation is not validated. See the G0W0 anchors. |
bse-tda | RPA/GW | RHF only (refuses multiplicity > 1) | ✓ (excitations) | — | — | run_bse_tda | water-bse-tda.toml | Smoke | The lowest five singlets match an independent numpy BSE-TDA to 1.8e-10 Ha given the same quasiparticle energies (H2O cc-pVDZ and aug-cc-pVDZ, NH3 and CH2O cc-pVDZ; see anchors). The quasiparticle energies come from the internal G0W0, which matches PySCF only at n_quad = 100, trunc_thresh = 0; the defaults are coarser. |
tdhf-static-polarizability | RPA/GW | RKS only ([rpa] xc required) | ✓ (static α) | — | — | run_tdhf_static_polarizability | water-tdhf-static-alpha.toml | Smoke | Static α only. The kernel is statically screened RPAx, not bare TDHF. Its implementation matches an independent numpy assembly of the same kernel to 5.3e-9 relative, and its bare-exchange limit matches PySCF CPHF (see anchors), at matched settings: exact-J SCF and full-rank PDEP (trunc_thresh = 0; the CLI default is 1e-4). The physics is not established: at a physical scissor (0.36 Ha) α is 5.20 a.u. for water/cc-pVDZ against DOSD 9.64 (−46%), and the independent kernel gives the same 5.20. The same kernel gives C6 about 63% low. At scissor = 0 it can hard-error on a negative α diagonal, which the independent kernel reproduces (water/cc-pVDZ α_xx = −2.68); set [gw] scissor to about 0.3–0.4 Ha. |
ccsd | CC | RHF (spin-adapted solver) | ✓ | — | — | run_ccsd | water-ccsd.toml | Proven | — |
ccd | CC | RHF only (refuses multiplicity > 1) | ✓ | — | — | run_ccd | water-ccd.toml | Proven (narrow) | RI-CCD, spin-orbital solver. |
ccsd(t) | CC | RHF only (refuses multiplicity > 1) | ✓ | — | — | run_ccsd_t | water-ccsd-t.toml | Proven (narrow) | Spin-adapted CCSD + spin-adapted (T). Prints E_CCSD, E_(T) and the total. |
linlccd | CC | RHF only (refuses multiplicity > 1; open-shell LinLCCD(hh) is library-only) | ✓ | — | — | run_linlccd | water-linlccd.toml; local: water-linlccd-local.toml | Proven (narrow) | No other code implements LinLCCD(hh); the energy matches an independent numpy solve on PySCF density-fitted integrals to ≤1.2e-12 Ha (H2O and NH3 through the CLI's closed-shell path; UHF OH through the library-only open-shell path). With the hole–hole ladder off it reduces exactly to RI-MP2, and with exact integrals its driver terms reproduce canonical MP2; size consistency is checked. [mp2] linlccd_variant (hh, drivers-only, full) applies exact and local. With [local] (amplitude threshold): Proven (narrow); at ε = 0 every variant, full included, matches the independent numpy solve to ≤ 4.4e-13 Ha, as does the exact path. |
drpa | RPA/GW | RHF only (refuses multiplicity > 1) | ✓ | — | — | run_drpa, run_drpa_scan (local ε scan) | water-drpa.toml; local: water-drpa-local.toml | Proven (narrow) | Exact dRPA@HF by the drCCD Riccati solve with nothing truncated; equals the canonical plasmon formula (≤1e-12 Ha), full-rank PDEP (pdep-rpa, trunc_thresh = 0), and an independent numpy plasmon dRPA on PySCF integrals (≤3.0e-11 Ha; water and n-butane at 6-31G and cc-pVDZ, n-octane at 6-31G; see Anchors). Its memory grows as no³·nv² and a run that cannot fit is refused before the SCF. With [local] (amplitude threshold, eps or eps_sweep): Proven (narrow) by its exact limit; the finite-ε error is not variational, and on n-octane it is positive and grows with ε at every point measured (Anchors). |
wb97x-l-v | CC § ωB97X-L-V | Its own RKS (wB97X-L-V) reference (refuses multiplicity > 1; open shell is library-only) | ✓ | — | — | none | water-wb97xlv.toml | Proven (narrow) | E_KS and λ·E_c against PySCF with the paper's parameters plus a numpy LinLCCD(hh) (water, OH / def2-SVP); Be₂ bond energy against the paper's Table 4. |
b2plyp | CC § double hybrids | Its own RKS reference | ✓ | — | — | run_double_hybrid(kind="b2plyp") | water-b2plyp.toml | Spike | Weighted B88+LYP reference. Not compared with any reference code. |
dsd-pbep86 | CC § double hybrids | Its own RKS reference | ✓ | — | — | run_double_hybrid(kind="dsd-pbep86") | — | Spike | Weighted PBE+P86 reference. Not compared with any reference code. |
tda | RPA/GW § TDDFT | RHF (CIS), or RKS via [tddft] xc (refuses multiplicity > 1) | ✓ (excitations) | — | — | run_tddft(method="tda") | water-tda.toml | Proven (narrow, closed shell) | The lowest five roots match PySCF TDA for water, formaldehyde and NH3 at 6-31G and aug-cc-pVDZ with HF, LDA, PBE and B3LYP: at most 8.1e-4 eV (formaldehyde/aug-cc-pVDZ B3LYP, pruned-grid error), test bar 1e-3 eV; B3LYP/aug-cc-pVDZ on the reference's own flat 75 × 110 grid ≤ 2.8e-6 eV (bar 2e-5 eV). τ-only meta-GGAs (SCAN, r2SCAN, TPSS) take the τ kernel; r2SCAN matches PySCF on water/6-31G only, on the flat 75 × 110 grid (2.1e-6 eV). Meta-GGA runs default to a 150 × 434 grid, on which r2SCAN water roots sit within 9.2e-5 eV (6-31G) and 5.5e-6 eV (aug-cc-pVDZ) of a flat 150 × 590 grid (75 × 110: 2.1e-3 eV); SCAN is not grid-converged at 1e-4 eV on any grid tested (see Known limits). A [tddft] xc with no f_xc kernel (VV10, range-separated) is refused before the SCF. |
tddft | RPA/GW § TDDFT | RHF (TDHF), or RKS via [tddft] xc (refuses multiplicity > 1) | ✓ (excitations) | — | — | run_tddft(method="casida") | water-tddft-pbe.toml | Proven (narrow, closed shell) | Same comparison of the lowest five roots against PySCF TDDFT, same bar. Same functional refusals as tda. |
task = "optimize" is accepted only for rhf, ksdft, uhf, rohf,
pdep-rpa and rimp2. task = "frequencies" is accepted only for rhf,
ksdft, uhf and rohf. On an open-shell molecule both tasks are accepted
only for uhf, rohf and ksdft (UHF/UKS, ROHF/ROKS). Both tasks refuse
[dft] grid_prune, and [scf] k_builder = "cosx" except for rhf, ksdft,
uhf and rohf (the overlap fit with a functional, and for rohf, is
refused before the SCF); a COSX final pass is skipped for them. The RKS, UKS and ROKS
optimizers and frequency drivers apply D3(BJ) and MBD@rsSCS (energy and exact
gradient); an
open-shell task = "energy" single point applies either. Any
other combination exits with an error before the SCF runs.
Open shells in the CLI
uhfandrohfread[molecule] multiplicitydirectly. With[dft] functionalthey run UKS and ROKS, for energies, optimizations and frequencies.ksdftwithmultiplicity > 1runs UKS (theuhfroute with the functional set). For ROKS userohfwith[dft] functional.rhfrefusesmultiplicity > 1and points touhf/rohf.rimp2andoo-rimp2run on the same plain UHF thatkind = "uhf"runs, then take unrestricted RI-MP2 (UMP2, as PySCFmp.MP2(uhf)) and unrestricted OO-RI-MP2.[mp2] kappais refused on an open shell.task = "energy"only: there is no unrestricted MP2 nuclear gradient.pdep-rpa,gwandmp2-vsolve UHF with MOM after 5 iterations whenmultiplicity > 1, fortask = "energy"only. Forpdep-rpaandgw, setting[rpa] xcmakes that reference UKS;gwwith[gw] reference = "rohf"uses ROHF (ROKS with[rpa] xc) instead, semi-canonicalized per spin; U-G0W0 on a semi-canonicalized ROHF reference is in the Anchors, the ROKS reference is not compared.mp2-vdoes not read[rpa] xcand stays UHF.linlccdandwb97x-l-vrefuse an open-shell molecule; their open-shell versions are library-only (ferric_cc::linlccd_u::u_linlccd,ferric_cc::double_hybrid::u_solve_wb97x_l_v).ccd,ccsdandccsd(t)refuse an open-shell molecule, and no open-shell CCD, CCSD or CCSD(T) exists in the library either: every CC solver reads restricted orbitals.- Every other kind refuses
multiplicity > 1with an error before any integral is computed.
Python entry points
These are Python functions without a method.kind of their own; some rows
also have a CLI route through a TOML section or task, noted in the row.
Scope is taken from the binding code and its docstrings. They are not graded
individually.
| Capability | Python | Scope (verified in code) |
|---|---|---|
| Open-shell KS frequencies | run_frequencies(reference="uhf"|"rohf", xc=...) | Setting xc promotes RHF/UHF/ROHF to RKS/UKS/ROKS. FD Hessian. Also CLI: kind = "uhf"/"rohf" with [dft] functional and task = "frequencies". |
| Transition-state search | run_saddle | P-RFO. Closed shell only (refuses multiplicity ≠ 1). Raises if the start has no negative mode. Costs 2(6N+1) + (steps+1) gradients. |
| Reaction path | run_irc | Both IRC branches from a saddle's imaginary mode. Closed shell only. |
| Geometry optimization (Python) | run_optimize | RHF only (no xc argument). Accepts point charges and a field. |
| QM/MM energy + forces | QmmmSystem, run_qmmm | method = "rhf"/"uhf"/"rks"/"uks". Link atoms, boundary schemes (keep/delete-host/rc/rcd), Gaussian-smeared charges, Thole polarizable sites, an optional MM force field (MmTopology). See QM/MM. The CLI [qmmm] section covers fixed point charges only. |
| QM/MM optimization | run_optimize_qmmm | Same four methods. move_mm = "none"/"all"/("within", r)/("residues", [...]). Moving MM atoms requires mm_topology. |
| Constrained DFT | run_cdft, CdftConstraint | UHF, or UKS when functional names a libxc functional other than "HF" (None and "HF", any case, give UHF). Constrained UKS/PBE matches NWChem 7.2.2 (see anchors); UHF-cDFT state selection is compared against NWChem's DFT module with Hartree–Fock exchange (see anchors); UHF energies along a target scan and UHF couplings have no external comparison. Fragment target is a Becke electron population ("charge": Nα + Nβ; "spin": Nα − Nβ), not a net charge. Raises if the λ loop does not converge. Not graded; see Constrained DFT. |
| cDFT electron-transfer coupling | cdft_coupling | Wu–Van Voorhis H_ab between two run_cdft states, each with one converged "charge" constraint, on the same geometry, basis, occupations and Hamiltonian. Not graded. |
| Point charges / uniform field | point_charges=, external_field= on run_rhf/run_uhf/run_rohf/run_dft, run_optimize, run_frequencies, run_saddle, run_irc, run_pdep_rpa | Bohr and atomic units. run_rhf also takes smeared_charges=. The MP2/CC drivers take no external-potential arguments. The CLI equivalent is [external_potential], where a width makes a charge smeared. |
| D3(BJ) | run_dft(dispersion="d3bj"), run_frequencies(xc=..., dispersion="d3bj"), d3bj_energy | Additive, with parameters fitted per functional. run_frequencies takes it on RKS, UKS and ROKS. |
| MBD@rsSCS | run_dft(dispersion="mbd"), run_frequencies(xc=..., dispersion="mbd"), mbd_rsscs_energy | run_dft adds it to total_energy from Hirshfeld volume ratios of the converged density (DftResult.volume_ratios), with β published for PBE, PBE0, HSE06. With with_gradient=True it adds the analytic gradient: the exact analytic gradient, including the orbital relaxation of the Hirshfeld volumes (Z-vector; LDA, GGA and hybrid-GGA functionals without VV10). mbd_rsscs_energy is the standalone energy from caller-supplied ratios. |
| Charges | mulliken_charges, lowdin_charges, hirshfeld_charges, chelpg_charges, resp_charges | Take an RhfResult or DftResult. Mulliken, Löwdin, CHELPG and RESP are documented closed-shell only. hirshfeld_charges uses the CLI's free-atom SCF proatoms, solved with the result's SCF settings; proatom="slater" selects the single-Slater proatom. RESP is a single-stage restrained fit, not multi-conformer RESP. |
| Electrostatic potential | esp_at_atoms, esp_at_points | Evaluated exactly from the density. esp_at_points takes (N, 3) points in Bohr. |
| Polarizability / moments | hirshfeld_polarizability, orbital_moments, density_second_moment | — |
| ω tuning | tune_omega | Range-separation ω for a named functional. With continuation=True (off by default) each evaluation after the first is seeded from the nearest already-evaluated ω; the first uses the default guess. The cation's spin-population asymmetry is compared with that same neighbour (branch_tol, default 1e-7); a mismatch sets branch_warning and the per-evaluation branch_changed. ⟨S²⟩ is reported but not compared, because its smooth ω-drift exceeds the signal. With check_cation_stability (default on) every cation also gets the UKS internal-stability analysis: each evaluation carries cation_lambda_min (the orbital Hessian's lowest eigenvalue) and cation_stability, and a tuned ω whose cation is an internal saddle is an error naming ω and λ_min. A functional whose Hessian cannot be built (VV10, so ωB97X-V) is reported not_analysed per evaluation with a stability_warning; that is never read as stable. |
| Conformer statistics | boltzmann_weights, weighted_stats*, ConformerEnsemble | — |
| Integrals | compute_eri3, compute_eri3_mo, compute_metric_2c, boys_localize, shell_info | Low-level access. |
Polarizable (Thole) embedding is Python and Rust only. IEF-PCM, UHF
stability descent and terfc-attenuated MP2 are reachable from both: see
[pcm], [scf] stability_descent and [mp2] att_operator in the
Input reference.
Anchors
Where numbers are checked, they are checked against external references or
exact limits, not against ferric's own earlier output. "Stated agreement" is
the measured difference recorded in the repository; "test tolerance" is what
the pinning test asserts, which is often looser. Proof links to
the test file that asserts the row, and, where one exists, the script that
generated its reference data; a row with nothing to link is not graded Proven.
Proof files named validation_*.rs are #[ignore]d, so an ordinary
cargo test skips them; they run in the weekly validation / validation-* CI jobs and on
demand (cargo nextest run --run-ignored only -E 'binary(/^validation_/)').
| Capability | System / basis | Reference | Stated agreement | Test tolerance | Proof |
|---|---|---|---|---|---|
| Bundled basis sets: every registered orbital, RI and JK set loads to the published contractions | 45 orbital-set RHF cases (Pople 6D/5D per the Gaussian convention, Dunning, def2, pcseg, -PP with ECPs), 26 RI-MP2 aux cases, 6 DF-HF JK cases (incl. aug-cc-pV{D,T,Q}Z-JKFIT); small molecules (H2O, HCl, CH3Cl, HBr, Pd, …) | PySCF 2.13.1 with each basis taken from BSE 0.12 by name (never ferric's files); aug-JKFIT from Psi4, digit-identical to PySCF's copy | 1.8e-12 Ha (RHF); 2.4e-10 Ha (RI-MP2, PP-RIFIT on Pd; others ≤ 5e-11); 7.3e-13 Ha (DF-HF) | 1e-8 Ha | validation_basis_coverage.rs (full sweep), basis_coverage_vs_pyscf.rs (per-commit subset), gen_pyscf_basis_coverage_refs.py |
| UHF and ROHF energies, stability-checked | HO2, NO2, CH2 (triplet), allyl / 6-31G, def2-SVP | PySCF UHF/ROHF + stability() | 4.0e-12 Ha (energy); 3e-7 (⟨S²⟩) | 1e-10 Ha; 1e-6 | validation_open_shell_scf.rs, gen_uhf_rohf.py |
SCF stability: lowest orbital-Hessian eigenvalues and verdict (UHF internal, UKS internal, RHF internal, RHF→UHF external). RhfConfig::check_stability on an RHF/HF run reports both the internal (singlet) verdict on ScfResult::stability and the external (RHF→UHF triplet, rhf_external_stability) verdict on ScfResult::stability_external; the external operator is also checked against the triplet block of ferric's UHF Hessian at the RHF point, an independent construction | N2⁺, OH (UHF), water at r(OH) = 0.9572 and 2.0 Å (RHF), NH2 (UKS/PBE) / 6-31G; H₂ at 2.0 Å / STO-3G (fast tier) | PySCF dense gen_g_hop_uhf/gen_g_hop_rhf/hop_rhf2uhf Hessians + stability() | eigenvalues ≤ 4.5e-10 Ha; energies ≤ 7.1e-12 Ha; the dedicated triplet operator matches the UHF-at-RHF triplet block to ≤ 2.3e-13 Ha (two independent constructions); stable/unstable verdicts match PySCF, including water at 2.0 Å where internal is STABLE (+1.97e-2) and external UNSTABLE (−3.07e-1); OH (an exact zero mode) is reported MARGINAL by ferric where PySCF reports stable. KS references are refused for the external channel (no triplet XC kernel f_αα − f_αβ) | 1e-8 Ha; 1e-10 Ha; 2e-12 Ha | validation_scf_stability.rs, scf_stability_external.rs, validation_rsh_stability.rs, gen_scf_stability.py |
SCF convergence ladder with RHF internal stability descent (solve_rhf_ladder, check_stability + scf_stability_descent): converged energy, internal (singlet) and external (RHF→UHF) Hessian eigenvalues | N2 at 1.60 Å, CuCN, Cr(CO)6 / def2-SVP (Cu, Cr from Basis Set Exchange) | PySCF RHF .newton() from four guesses; dense singlet and triplet orbital Hessians from MO integrals, checked against PySCF's own operators | energy ≤ 8.8e-10 Ha; eigenvalues ≤ 1.3e-9 Ha; the plain-DIIS rung lands on the N2 saddle 1.906e-2 Ha higher; the UHF-Hessian cross-construction of the external eigenvalue runs on N2 and CuCN only, and Cr(CO)6 asserts the dedicated triplet operator's result (its own weekly CI job, validation-cr-co6) | 1e-8 Ha; 1e-8 Ha | validation_scf_ladder.rs, rhf_stability_descent.rs, gen_scf_ladder.py |
| RHF and UHF with def2 ECPs: energies and analytic gradients | HI, CH3I, RbH, I atom (UHF) / def2-SVP, def2-TZVP; SnH4 / def2-TZVP; HBr (all-electron control) | PySCF RHF/UHF + analytic gradient, and ORCA RHF (NoRI), both fed ferric's basis and ECP | ≤ 2.9e-8 Ha (energy, both codes); ≤ 2.3e-8 Ha/Bohr (gradient); all-electron HBr 1e-11 | 2.5e-7 Ha; 1e-7 Ha/Bohr | validation_ecp.rs, gen_ecp.py, gen_ecp_orca.py |
| RHF, UHF, RKS, UKS, ROKS and RI-MP2 nuclear gradients with def2 ECPs: full gradient, the ECP term alone (HF and KS; for RI-MP2 the ECP term is tested through the full gradient and a control that the HF-density ECP term misses), translation invariance, 5-point finite difference of ferric's own energy | HF: HI, CH3I / def2-SVP, def2-TZVP; SnH4 / def2-TZVP; CH2I (UHF doublet) / def2-SVP, def2-TZVP; HBr (all-electron control). KS/PBE: CH3I (RKS), CH2I (UKS, ROKS) / def2-SVP. RI-MP2: CH3I / def2-SVP, def2-svp-rifit | HF: PySCF analytic gradient with its ECP term separated (checked against a fixed-density finite difference), and ORCA EnGrad (NoRI), both fed ferric's basis and ECP. KS: PySCF with exact J, the matched (75,110) Becke grid and grid_response=True (analytic for RKS/UKS, 5-point finite difference of the ROKS energy). RI-MP2: 5-point finite difference of the PySCF DF-MP2 energy, its ECP term from the relaxed-energy derivative with respect to a λ dV_ECP/dR hcore perturbation, and ORCA RI-MP2 EnGrad | HF: gradient ≤ 1.3e-7 Ha/Bohr vs PySCF and ≤ 2.5e-7 vs ORCA; the ECP term alone ≤ 1.3e-7; own 5-point FD ≤ 1.9e-7; energy ≤ 2.9e-8 Ha. KS: energy ≤ 2.0e-8 Ha, gradient ≤ 1.4e-8 Ha/Bohr, the ECP term alone ≤ 1.1e-8, own FD ≤ 4.3e-8. RI-MP2: E_corr 7.4e-10 Ha; gradient 7.7e-9 Ha/Bohr vs the PySCF finite difference and 4.3e-8 vs ORCA | HF: 5e-7 Ha/Bohr (PySCF), 1e-6 (ORCA), 6e-7 (FD). KS: 2e-7 (PySCF), 6e-7 (FD). RI-MP2: 1e-7 (PySCF FD), 5e-7 (ORCA) | validation_ecp_gradient.rs, validation_ecp_rimp2_gradient.rs, gen_ecp_gradient.py |
| ESP at the nuclei | H2O, CH3OH (RHF), HO2 (UHF) / cc-pVDZ, def2-SVP | PySCF int1e_rinv on PySCF's converged density, fed to ferric in ferric's AO order (AO order checked through the overlap matrix) | 4.8e-14 a.u. same density; 4.6e-9 own SCF | 5e-13 a.u.; 5e-8 a.u. | validation_density_properties.rs, gen_properties.py |
| Electric field at the nuclei | H2O, CH3OH, HO2 / cc-pVDZ, def2-SVP | PySCF int1e_iprinv, same density (checked against a finite difference of the ESP) | 1.5e-13 a.u. same density; 2.7e-9 own SCF | 1e-12 a.u.; 3e-8 a.u. | ″ |
| Becke effective volumes | H2O, CH3OH, HO2 / cc-pVDZ, def2-SVP; free atoms Z = 1–18 (UKS-PBE; B, C, O, F, Al, Si, S, Cl as the fractional-occupation ensemble) / aug-cc-pVDZ | numpy on ferric's grid rebuilt from PySCF's radial, Lebedev and AO values, with ferric's Becke partition; free atoms vs PySCF UKS | 1.4e-15 rel. same density; 7.1e-9 (molecules), 3.5e-8 (atoms) own SCF; Li, Be, Na, Al 1.5e-6 from ferric's XC density floor (ρ ≤ 1e-10), which the reference does not apply; free-atom energies 3.1e-12 Ha | 1e-13; 5e-8; 2e-6 (Li, Be, Na, Al) | ″ |
Hirshfeld charges (hirshfeld_charges) with the same-basis free-atom SCF proatom (what the CLI and ferric.hirshfeld_charges pass by default) and with the single-Slater proatom (proatom="slater"); free-atom proatom tables (spherically_averaged_proatom) | H2O, CO, CH3OH (RHF) / cc-pVDZ, def2-SVP; free H, C, O (UHF) and He (RHF) atoms; HeH promolecule (zero-charge limit) | numpy on ferric's grid rebuilt from PySCF's radial, Lebedev and AO values, with PySCF's converged density and PySCF free-atom proatoms tabulated and interpolated as ferric does (scipy cubic spline of ln ρ, an independent build of the interpolant); the same charges on a dense (200, 590) grid and on PySCF's own level-9 grid (agreeing to ≤2.8e-7 e) | 1.9e-13 e same density; 2.6e-9 e own SCF and own free atoms; ferric's default grid ≤2.0e-4 e from the dense-grid value; the 0.05 Bohr proatom table ≤2.9e-7 e from a 0.005 Bohr one; promolecule 8.7e-6 e | 1e-10 e; 1e-6 e; 1e-3 e; 5e-5 e | validation_hirshfeld.rs, gen_hirshfeld.py, validation_properties_hirshfeld.rs |
Hirshfeld effective volumes (atomic_effective_volumes_hirshfeld, the TS C6 volumes), on the atom-centred Becke–Lebedev grid of hirshfeld_volume_grid_config (75 radial × 590 angular — the volume integrand carries an r³ factor and needs a higher Lebedev order than the XC grid's 110); and atomic_effective_volumes_hirshfeld_on_grid on the 0.20 Bohr lattice, which MBD@rsSCS integrates on | H2O, CO, CH3OH / cc-pVDZ, def2-SVP (SCF proatom); free H, C, O atoms (no proatom, as the CLI's free-atom denominator) | numpy on a dense (200, 590) Becke–Lebedev grid, same density and proatoms; the free-atom weight-one moment ∫ρ r³ against the same grid is the exactness anchor (one atom ⇒ Hirshfeld weight 1); plus numpy on ferric's lattice rebuilt point for point for the lattice entry point | 1.1e-7 rel. vs the dense grid, same density and own SCF alike; ∫ρ within 2.0e-7 e of N_e on the same grid; CH3OH's two mirror-image methyl H equal to 2.9e-14 rel.; free-atom weight-one moment 8.1e-13 rel. (the 1e-12 Hirshfeld weight floor then removes 1.2e-3 of free H's volume, 3.4e-10 of C's); lattice entry point 3.2e-13 rel. same density | 1e-6; 2e-6 e; 1e-10; 1e-11; 1e-11 | ″ |
TS C6 and MBD@TS given the same volume ratios: TS α_eff, ω, pair and molecular C6 (ts_atom_params, ts_dynamic_polarizability, casimir_polder_c6); full-range SCS screened α(iω) and C6 (mbd_screen, mbd_dynamic_polarizability), and the plain Gaussian-damped coupled-oscillator energy (coupled_qho_energy_plain_gg), which checks the oscillator algebra and is not a dispersion energy | H2O, CO, CH3OH / cc-pVDZ, def2-SVP; CH4, benzene / cc-pVDZ (Hirshfeld volume ratios); ferric's and pymbd's frequency grids | pymbd 0.15.0 / libmbd: free-atom table checked equal for every element used; MBD screening as libmbd scs and energy as libmbd plain screening with Gaussian damping (dip,gg), cross-checked against a numpy build and mpmath dimer closed forms | TS ≤ 7.5e-16 rel.; MBD 8.1e-15 against the same A&S erf ferric uses, 5.1e-7 against an exact erf | 1e-12; 1e-11; 1e-6 | validation_ts_mbd.rs, gen_ts_mbd.py |
MBD@rsSCS energy (mbd_rsscs_energy, mbd_rsscs_energy_from_params): range-separated SCS screening (short-range (1−f)·T_GG), screened α₀, C6, ω and R_vdW, and the long-range coupled-oscillator energy with f·T_bare; free-atom R_vdW table (Z = 1–54); frequency grid | H2O, CO, CH3OH / cc-pVDZ, def2-SVP; CH4, benzene / cc-pVDZ (Hirshfeld volume ratios); β = 0.83 (PBE) and 0.85 (PBE0/HSE06), a = 6 | pymbd 0.15.0 (screening + mbd_energy in Python) and libmbd 0.15.0 (Fortran, variant='rsscs') given identical inputs, which agree with each other to < 1e-10; R_vdW table read back from pymbd vdw_params; grid vs pymbd freq_grid(15) | E ≤ 9.5e-12 rel.; screened α₀, C6, ω, R_vdW ≤ 1.5e-14 rel.; grid 3.8e-14 | 1e-10; 1e-12; 1e-12 | validation_mbd_rsscs.rs, gen_ts_mbd.py |
MBD@rsSCS nuclear gradient, exact (mbd_rsscs_gradient; on an SCF mbd_rsscs_for_scf, used by [dft] dispersion = "mbd" with task = "optimize" and by run_dft(with_gradient=True)): explicit term at fixed volume ratios; Hirshfeld-volume term with the occupied orbitals held fixed (AOs and proatoms follow the atoms, orthonormality term −½ Tr[V D Sˣ D], centroid-anchored lattice response); orbital relaxation from the KS Z-vector (ferric_scf::zvector_ks: closed-shell for RKS; coupled α/β for UKS, with orthonormality term −Σ_σ Tr[V D_σ Sˣ D_σ]; three-block closed/open/virtual for ROKS, with orthonormality term −Tr[Sˣ W_Q], W_Q = D_α V D_α + P_c V P_c + ½ (P_c V P_o + P_o V P_c)) | explicit: the 8 systems × 2 β above; SCF terms: H2O / STO-3G (HF and PBE), H2O / 6-31G (PBE, PBE0, HSE06, PBE + RI-J), NH3 / 6-31G (PBE); UKS: OH / STO-3G (PBE), NH2, OH (doublets) and O2 (triplet) / 6-31G (PBE, PBE0, HSE06), OH / 6-31G (PBE + RI-J, PBE0 + RI-JK); anchor: H2O / STO-3G RKS run through the UKS path (PBE, PBE0, HSE06); ROKS: HCO (doublet) and CH2 (triplet) / STO-3G (PBE), HCO, NH2 (doublets), CH2 and O2 (triplets) / 6-31G (PBE, PBE0, HSE06), HCO / 6-31G (PBE + RI-J); anchor: H2O / STO-3G RKS run through the ROKS path (PBE, PBE0, HSE06) | explicit vs libmbd 0.15.0 force=True (checked against libmbd's own finite differences to ≤ 4.2e-11) and vs central FD in every position and every α₀, C6, R_vdW input; volume term vs central FD of the volumes on a fixed lattice at fixed D; the unrelaxed gradient vs central FD of the pipeline with the reference occupied orbitals re-orthonormalized at each displaced geometry; the exact gradient vs central FD of the full SCF + MBD pipeline, and its relaxation term vs the difference of the two FDs | explicit 6.2e-16 abs vs libmbd; parameter derivatives ≤ 1.3e-6 rel. (FD); volume term 2.5e-8 abs (Slater proatom), 6.5e-9 (tabulated proatom), both at h = 1e-4; unrelaxed 3.4e-9 (H2O/STO-3G HF); exact 8.0e-10 (H2O/STO-3G PBE), ≤ 3.5e-9 (H2O/6-31G, all four), 2.0e-10 (NH3/6-31G) Hartree/Bohr at h = 1e-3; relaxation term (1.0e-5 H2O, 1.6e-6 NH3) vs FD ≤ 3.5e-9; UKS (h = 3e-5): unrelaxed 3.9e-11 and exact 2.9e-11 (OH/STO-3G, h = 1e-3), exact ≤ 1.9e-9 (6-31G, exact J/K), 6.0e-9 (RI-J), 5.0e-9 (RI-JK), relaxation term (2.7e-6–1.0e-5) vs FD ≤ 6.0e-9; the UKS path on a closed shell reproduces the RKS gradient to 3.0e-14; ROKS (h = 1e-3, re-orthonormalizing closed and open orbitals as one set for the unrelaxed FD): unrelaxed ≤ 2.2e-11 against a closed–open cross term of 7.1e-8–3.2e-7, exact ≤ 2.1e-11 (STO-3G), ≤ 2.1e-11 (6-31G, PBE and PBE0), ≤ 4.5e-10 (HSE06), 7.5e-9 (RI-J), relaxation term (2.7e-6–9.8e-6) vs FD ≤ 7.5e-9, every displaced SCF on the reference state (max|ΔD|/h ≤ 0.39 per Bohr); the ROKS path on a closed shell reproduces the RKS gradient to 2.7e-14 | 1e-14; 1e-5 rel.; 1e-6 rel. (Slater), 5e-8 rel. (tabulated); 5e-8; 5e-9; UKS 5e-10, anchor 1e-12; ROKS 5e-10, anchor 1e-12 | validation_mbd_rsscs.rs, mbd_scf_gradient.rs, mbd_scf_gradient_uks.rs, mbd_scf_gradient_roks.rs, unit tests in dispersion/mbd_rsscs.rs |
MBD@rsSCS exact gradient on ²Π radicals (UKS and ROKS Z-vector with the axis-rotation null mode projected out, zvector_ks::NullModeDiagnostics) | OH / STO-3G (UKS PBE, PBE0; ROKS PBE0), OH / 6-31G (UKS PBE), NO / STO-3G and 6-31G (UKS PBE), CH / 6-31G (ROKS PBE); null-mode identification on OH, NO / STO-3G and OH / cc-pVDZ | central FD of the full SCF + MBD pipeline (h = 1e-3); the softest eigenvector of the dense orbital Hessian, an independent construction of the mode | exact gradient 7.1e-12–5.4e-11 Hartree/Bohr against relaxation terms of 2.2e-7–1.0e-5; the mode matches the softest eigenvector to |cos| > 0.9999, Rayleigh quotients −3.5e-3 to +9.9e-3 against ≥ 0.57 for every other direction; a non-linear radical (NH2) is bit-identical to the unprojected solver | 5e-10; 0.9999; 0.05 | mbd_scf_gradient_degenerate.rs, unit tests in zvector_ks.rs |
Harmonic frequencies with dispersion (harmonic_frequencies_with_scf_correction; CLI task = "frequencies" + [dft] dispersion, Python run_frequencies(dispersion=...)): central differences of the KS + dispersion analytic gradient, each from the SCF converged at that displaced geometry | H2O / STO-3G, PBE (D3(BJ), MBD@rsSCS); H2 / STO-3G HF with a synthetic harmonic-spring correction | D3: the dispersion Hessian vs 4-point second differences of the D3(BJ) energy, and the frequencies vs those of the KS Hessian plus that independent D3 Hessian; MBD: v·H·v along three fixed directions vs second differences of the full SCF + MBD energy; spring: the closed-form spring Hessian; a no-op correction reproduces the plain FD Hessian bit for bit | D3 5.3e-9 Hartree/Bohr² (largest element 1.9e-5), frequencies 9.8e-6 cm⁻¹; MBD 1.5e-6 (0.8% of 2.0e-4, limited by noise in the energy differences; without the orbital-relaxation term 3.2e-5); spring 6.6e-8 at a 1e-3 Bohr step (truncation, 25× smaller than at 5e-3) | 2e-8; 5e-5 cm⁻¹; 3e-6; 2e-7 | dispersion_frequencies.rs |
Harmonic frequencies with dispersion (open shell): harmonic_frequencies_with_scf_correction on UKS (reference = Uhf) and ROKS (reference = Rohf); CLI uhf/rohf/ksdft + [dft] functional + [dft] dispersion with task = "frequencies", Python run_frequencies(reference="uhf"|"rohf", dispersion=...). Central differences of the KS + dispersion gradient, each from the UKS/ROKS SCF converged at that displaced geometry; MBD@rsSCS with the UKS or ROKS Z-vector | PBE / STO-3G, bent geometries: NH2 (doublet, UKS), HCO (doublet, ROKS; in-plane SOMO), CH2 (triplet, UKS and ROKS). OH is excluded (degenerate SOMO) | D3: the dispersion Hessian vs 4-point second differences of the D3(BJ) energy, the frequencies vs those of the KS Hessian plus that independent D3 Hessian, and the translational and rotational sum rules of the D3 Hessian; MBD: v·H·v along three fixed directions vs 5-point second differences (h = 0.08 Bohr) of the full SCF + MBD energy, with the unrelaxed gradient (no Z-vector) as negative control; a no-op correction reproduces the plain UKS / ROKS FD Hessian bit for bit, and the correction sees an SCF of the requested spin | D3 3.7e-9 (NH2) and 6.5e-9 (HCO) Hartree/Bohr² (largest elements 1.7e-5, 2.9e-5), frequencies 9.4e-6 and 3.0e-5 cm⁻¹; sum rules: translation ≤ 1.1e-11, rotation ≤ 3.0e-9 against a gradient term of 1.9e-6–1.1e-5; MBD ≤ 4.8e-8 (curvatures 6.1e-5–2.1e-4) vs 8.3e-7–1.6e-5 without the orbital-relaxation term; full corrected Hessian translational sum ≤ 1.3e-6 (KS grid noise) | 2e-8; 5e-5 cm⁻¹; 1e-10, 1e-8; 2e-7; 1e-5 | dispersion_frequencies_open_shell.rs, validation_dispersion_frequencies_open_shell.rs |
D3(BJ) dispersion energy and analytic gradient (ferric_d3::d3bj_energy, d3bj_gradient), two-body and with the Axilrod–Teller–Muto three-body term (s9 = 1: zero damping, rs9 = 4/3, exponent 16, CN-interpolated C6) | Two-body: 24 system/functional cases. With ATM: water, methane, Ar2, water dimer, Br2, benzene, Ar3, CF2ONH, CHBr3 × PBE, PBE0, B3LYP (27 cases; the three-body term is nonzero on the 21 with three or more atoms) | simple-dftd3 1.6.0 (dftd3 Python package, an independent Fortran implementation) with the parameters passed explicitly; central FD of ferric's energy; a sympy proof of the CN chain rule and of the ATM gradient | two-body energy ≤ 1.5e-13 Ha; with ATM: energy ≤ 1.2e-13 Ha, gradient ≤ 5.5e-13 Ha/Bohr, the three-body part alone ≤ 2.6e-15 Ha and ≤ 5.9e-16 Ha/Bohr; analytic vs FD ≤ 3.0e-11 Ha/Bohr (CF2ONH, CN spread 1.75); E linear in s9 to 1e-15, a dimer bit-identical at s9 = 0 and 1 | 1e-12 Ha (energy); 1e-11 Ha/Bohr (gradient); 1e-12 Ha/Bohr (three-body gradient); FD 1e-7 Ha/Bohr | vs_reference_dftd3.rs, vs_reference_dftd3_atm.rs, gradient_vs_fd.rs, gen_d3_atm_reference.py, d3_cn_chain_rule_gradient_sympy.py, d3_atm_gradient_sympy.py |
| Static α (direct RPA with a density-fitted Coulomb kernel, no exchange; not CPHF) | H2O / aug-cc-pVDZ; CH3OH / cc-pVDZ | numpy linear solve on PySCF int3c2e with the same aux basis | 4.8e-14 rel. same orbitals; 5.3e-10 rel. own SCF | 5e-13; 5e-9 | validation_static_alpha.rs, gen_properties.py |
Dynamic α(iω) and Casimir–Polder C6 (direct RPA, density-fitted Coulomb kernel, no exchange), molecular and Becke per-atom (molecular_dynamic_polarizability, pdep_polarizability_becke_dynamic, casimir_polder_c6); per-atom α is the Krishtal–Senet–Van Alsenoy intrinsic polarizability (atom-centred Becke dipole on the bra, analytic molecular dipole on the ket; JCP 125, 034312 (2006)) and the charge-transfer remainder α_CT = α_mol − Σ_A α^A (charge_transfer_remainder[_dynamic]); ω = 0 against the static α, molecular and per-atom | H2O, N2 / aug-cc-pVDZ (aug-cc-pvdz-rifit) | numpy sum over Casida excitations on PySCF int3c2e with the same aux basis, at ferric's 20 Gauss–Legendre nodes (rebuilt with leggauss); per-atom and α_CT on the copy of ferric's Becke grid, α_CT also as the independent charge-flow form 4 (Σ_A R_A q^A)ᵀ R μ | α(iω) 4.9e-14 rel. same orbitals; C6 6.2e-14; per-atom 3.4e-14; 5.3e-10 own SCF; α_CT,iso(0) is 27.0% (H2O) and 22.7% (N2) of α_iso; α_CT vs charge-flow form 1.1e-4 / 2.0e-5 (grid error of the lab dipole) | 1e-11; 1e-11; 1e-10; 5e-9; α_CT 1e-10, charge-flow 1e-3 | validation_pdep_c6.rs, gen_pdep_c6.py |
NPZ export ([rpa] export_npz) | water / STO-3G, CLI pdep-rpa | numpy.load of the CLI's file against the Python bindings | exact (keys, shapes, dtypes, C order, geometry); per-atom and molecular α origin-independent to 3.4e-13 rel.; alpha_ct = alpha_tensor − Σ_A alpha_atomic | exact; 1e-11 rel. under translation; 1e-13 | test_validation_npz_export.py |
| NPZ export against PySCF: all 30 keys for the default knobs plus the surface ESP, including the C6 block and the PDEP eigenpotentials; each knob turned off removes exactly its keys | water / cc-pVDZ, CLI pdep-rpa with exact J/K | numpy.load of the CLI's file against PySCF integrals contracted with the exported density and orbitals, and against PySCF RHF; α against the numpy dRPA-RI solve; PDEP eigenpotentials against PySCF's generalized dielectric eigenproblem; TS C6 recomputed from the exported α(iω) and the Tkatchenko–Scheffler free-atom table | integral level ≤2.8e-14; density/orbital-energy/property chain ≤5.9e-10; α 9.2e-11 rel.; PDEP metric 4.3e-12, projector 2.6e-7; C6 recomputed exactly | 5e-13; 1e-8 (density), 3e-9; 1e-9; 5e-11, 1e-6; 1e-12 | validation_npz.rs, gen_npz.py |
| KS-DFT energies: open-shell UKS and second-row closed shell | UKS: NH2, CH3, HO2, O2 (triplet) × PBE, B3LYP, ωB97X-V / 6-31G, def2-SVP; RKS: H2S, HCl, SiH4 × PBE, B3LYP, HSE06 / def2-SVP, def2-TZVP | PySCF UKS/RKS + stability(), same grid and density fitting; for UKS ωB97X-V both codes use exact J and range-separated DF-K, whose fitting metrics differ, which sets that functional's larger bar; for RKS HSE06 both use exact J and short-range DF-K in the attenuated metric | energy ≤3.1e-12 Ha (PBE, B3LYP), 4.2e-12 Ha (HSE06), 6e-6 Ha (ωB97X-V); ⟨S²⟩ ≤4.6e-9 (PBE, B3LYP), 1.3e-7 (ωB97X-V). The VV10 potential Vnl equals the derivative of Enl: FD(Exc) − Tr[V X] ≤ 8e-11 for a random symmetric X on ωB97X-V (NH2 / 6-31G, closed and polarized; test_xc_blocks.py), and the low-gradient σ derivative matches FD to 5.3e-7 relative (unit test in vv10.rs, bar 1e-5). The ωB97X-V static polarizability αzz of water / 6-31G (RI-JK) from the CPKS solve matches the finite-field SCF dipole to 1.5e-10 and the finite-field −d²E/dF² to 8.7e-10 relative (test_vv10_polarizability_matches_the_finite_field_dipole in test_response_blocks.py; bars 1e-8 and 2e-8); with the σ gate on ∂ω₀/∂σ restored the two routes miss by 1.3e-5 and 5.1e-5. | energy 1e-10 Ha (PBE, B3LYP, HSE06), 2e-5 Ha (ωB97X-V); ⟨S²⟩ 5e-8, 1e-6 | validation_ks_energies.rs, gen_ks_energies.py |
KS-DFT energies: ROKS (rohf with [dft] functional) | NH2, CH3, HO2, OH (degenerate π hole) × PBE, B3LYP / 6-31G, def2-SVP | PySCF ROKS, same grid and density fitting (RI-J; RI-K for B3LYP), six starts each polished by second-order SCF and checked with stability(); PySCF's own ROKS does not converge on OH without that polish, and its converged OH points spread by up to 1.3e-6 Ha (π-hole orientation on the grid) | 8.0e-13 Ha; OH 8.0e-7 Ha | 1e-11 Ha; OH 5e-6 Ha | validation_roks_energies.rs, gen_roks_energies.py |
| Meta-GGA energies (SCAN, r2SCAN) | RKS: H2O, NH3, H2S, CH4 / def2-SVP, def2-TZVP; RI-J (default) and exact J; UKS: NH2 / def2-SVP, def2-TZVP | PySCF RKS/UKS + stability(), same grid, density fitting and XC density floor | RKS energy ≤ 4.0e-12 Ha, UKS ≤ 2.4e-13 Ha; frontier orbitals ≤ 1.1e-8 Ha; ⟨S²⟩ ≤ 5.2e-10 | energy 5e-11 Ha; orbitals 1e-7 Ha; ⟨S²⟩ 5e-9 | validation_mgga_energies.rs, gen_mgga_energies.py |
| Meta-GGA TPSS (molecular): energies and closed-shell gradient | RKS: H2O, CH4 / cc-pVDZ; UKS: NH2 / cc-pVDZ; RI-J (def2-universal-jkfit); gradient: H2O / STO-3G | PySCF RKS/UKS (TPSS = MGGA_X_TPSS + MGGA_C_TPSS), flat (75,110) Becke-1988 grid, same density fitting; gradient: central FD of ferric's own energy | energy ≤ 2.1e-13 Ha (H2O 5.7e-14, CH4 1.6e-13, NH2 UKS 2.1e-13); gradient vs FD ≤ 1.4e-7 Ha/Bohr | 1e-4 Ha (the dft_scan.rs bar shared with SCAN / r2SCAN); 3e-4 Ha/Bohr. Limits: no PySCF gradient pin, no open-shell gradient, one basis per energy case | dft_scan.rs, dft_gradient_mgga.rs, gen_pyscf_mgga_refs.py |
SCF stability for a range-separated hybrid: the lowest UKS-internal orbital-Hessian eigenvalue and the stable/unstable verdict, with the exchange response built as c_SR·δK[erfc(ω)] + c_LR·δK[erf(ω)] from the same density-fitted SR/LR pair the converged Fock uses, and the f_xc kernel built at the same overridden ω. RhfConfig::check_stability refuses ωB97X-V itself (StabilitySkip::Vv10Kernel: nothing in the workspace has a VV10 response kernel), so this row is measured through the #[doc(hidden)] rsh_uks_lowest_hessian_eigenvalue entry point, which accepts that omission to compare against a reference making the same one | N2⁺ / def2-SVP, ωB97X-V with ω overridden to 0.40 and 0.60 Bohr⁻¹, bracketing the 0.53–0.56 instability onset; OH / cc-pVDZ for the fast-tier kernel and finite-difference checks | PySCF dense newton_ah.gen_g_hop_uhf on a dft.UKS with mf.omega overridden, exact J and the matched (75,110) / VV10 (50,50) grids, the cation converged from the default guess and not stability-followed (past the onset the symmetric branch is a saddle, which is the point); PySCF's KS response omits the VV10 second derivative and so does ferric's, so the comparison is like-for-like on that omission | λ_min ≤ 1.9e-7 Ha and SCF energy ≤ 1.7e-8 Ha at both ω; verdicts match (STABLE at 0.40, UNSTABLE at 0.60); the plain-Coulomb exchange response (one Coulomb-kernel δK scaled by c_SR) misses the same spectrum by ≥ 2.9e-1 Ha. Fast tier: the density-fitted SR/LR response agrees with c_SR·K[erfc(ω)] + c_LR·K[erf(ω)] from four-centre integrals to 7.7e-4 relative, while kernels swapped, c_SR for both, c_LR dropped and ω doubled each sit ≥ 0.42 away; the analytic matvec matches a finite difference of the orbital gradient at ω = 0.40 to 5.3e-12 (falling 16× for a 4× smaller step); erfc(ω) + erf(ω) at equal coefficients reproduces the global-hybrid exchange to 8.2e-15 relative in four-centre integrals; at ω = 0 the matvec is bit-identical | 2e-6 Ha (~10× the measured max); 1e-7 Ha; 8e-3 rel.; 1e-6 rel.; 1e-12 rel. | validation_rsh_stability.rs, rsh_orbital_hessian.rs, gen_scf_stability.py |
RSH ω tuning (tune_omega): the objective J(ω) = ε_HOMO(N) + E(N−1) − E(N) (signed; the tuner minimizes |J|) and the tuned ω* | H2O, NH3 / def2-SVP, ωB97X-V: J at ω = 0.2, 0.3, 0.4, 0.5, 0.6 Bohr⁻¹ and ω*; N2 / def2-SVP: J at ω = 0.2–0.5 only, because the N2⁺ cation turns UKS-unstable between ω = 0.53 and 0.56, below J's root. For ωB97X-V that onset cannot be flagged by tune_omega (VV10: no response kernel, so every evaluation is not_analysed and the result warns). On that symmetric branch ferric's J matches the PySCF probe to 7.4e-8 Ha (ω = 0.53) and 4.7e-7 Ha (ω = 0.56) and its ⟨S²⟩ to 3.0e-7, and J, ⟨S²⟩ and the cation spin-population asymmetry are all smooth across the onset: a lower cation state exists past it (reached when seeded toward it: 8.9e-5 Ha below the symmetric state at ω = 0.56, 4.6e-4 Ha at 0.60) but the tuner does not find it, and no energy, ⟨S²⟩ or population quantity flags it, because what changes there is a curvature; only the orbital Hessian's lowest eigenvalue does (next paragraph). continuation=True keeps ω* bit-identical on H2O and NH3; on H2O its J differs from the independent solves by SCF stopping noise in ε_HOMO that tracks density_conv: 1.7e-7 Ha at 1e-7, 2.6e-10 Ha at 1e-9 | PySCF RKS neutral and stability-checked doublet UKS cation with mf.omega overridden, same grid, exact J on both states and range-separated DF-K; ω* from brentq on J. Both states use exact J, as tune_omega does by default. Cation stability (non-VV10 ωB97X, def2-SVP, mf.omega overridden, default guess, dense gen_g_hop_uhf λ_min): N2⁺ λ_min = +3.06e-2, +2.01e-2, +1.23e-2, +2.2e-3 at ω = 0.30, 0.40, 0.45, 0.50 and −6.9e-3, −1.50e-2, −3.83e-2 at 0.55, 0.60, 0.80, so the symmetric cation is a saddle from between 0.50 and 0.55 on; H2O⁺ and NH3⁺ are ≥ +7.8e-2 at ω = 0.3, 0.6, 1.0. A tune_omega bracket past the onset raises an error naming ω and λ_min; a bracket below it returns with no warning | ε_HOMO ≤6.7e-6 Ha (N2 4.8e-7); IP ≤8.8e-7 Ha; J ≤6.3e-6 Ha; ω* ≤2.8e-5 Bohr⁻¹; cation λ_min ≤2.3e-8 Ha/rad² (N2 1.8e-9), verdict sign matches PySCF at all 13 points | 2e-5 Ha; 5e-6 Ha; 2e-5 Ha; 1e-4 Bohr⁻¹; 3e-7 Ha/rad² | validation_rsh_omega.rs, omega_tuning_cation_branch.rs, validation_omega_tuning_cation.rs, validation_rsh_cation_stability.rs, gen_rsh_omega.py, gen_rsh_cation_stability.py |
| Constrained DFT (Becke charge and spin constraints): E(N) − E_unconstrained, λ, and dE/dN = −λ | LiH (Li), HF (F), H2O⁺ (O; charge and spin) / 6-31G, def2-SVP, 3–4 targets each | NWChem 7.2.2 cdft ... pop becke, PBE, Becke-partitioned Treutler grid, fed ferric's basis; internal: natural-target limit (λ = 0) and dE/dN = −λ | unconstrained E 1.0e-8 Ha; E(N) − E_unc 2.0e-7 Ha; λ 1.1e-6 (NWChem, grid limit); dE/dN = −λ to 2.3e-12 Ha (Simpson, def2-SVP) | 5e-8 Ha; 1e-6 Ha; 5e-6; 5e-11 Ha | validation_cdft.rs, gen_cdft.py, NWChem inputs |
Constrained DFT state selection at an integer target: which constrained state ferric lands on, seeded from NWChem's orbitals (solve_cdft_uhf_seeded, CdftSeed) and unseeded with and without the stability descent | HeNe⁺ (N_He = 2, R = 2.0 Å), LiH⁺ (N_Li = 2.8, R = 3.0 Å) / def2-SVP, two states each | NWChem 7.2.2 cDFT (HF exchange), run both with its native Becke partition and with ferric's He/Ne radius ratio by relabelling the atoms; NWChem orbitals imported into ferric (AO order and the d(m=+1) sign mapped and checked) | one-shot energy of NWChem's orbitals ≤ 4.7e-10 Ha; seeded and unseeded states ≤ 7.7e-10 Ha after the quadrature correction; λ 3.2e-5 (HeNe⁺), 2.9e-7 (LiH⁺) | 1e-8 Ha; 1e-8 Ha; 1e-4 | validation_cdft_state.rs, gen_cdft_state.py |
cDFT-ET coupling (Wu–Van Voorhis, coupling_hab) and its ingredients: determinant overlap, one- and two-electron transition elements, |V|; KS-PBE diabats end to end | He₂⁺ at 2.50/3.00/3.50 Å / def2-SVP, aug-cc-pVDZ | NWChem 7.2.2 cDFT + et (its MO files recomputed in PySCF, every et number reproduced to ≤ 5.9e-11); the textbook form F = E + λN with its constraint-offset invariance | kernel ≤ 5.9e-11 Ha; coupling vs textbook ≤ 2e-18; E − E_unc ≤ 4.0e-7 Ha; λ ≤ 6.6e-6; |S| ≤ 2.8e-3 rel., |V| ≤ 8.3e-4 rel. (both largest at def2-SVP 3.50 Å, where |S_AB| = 3.9e-4 is the smallest of the six points; the absolute S offset is a flat 1.7e-7–1.1e-6 across the row, and V ∝ S so its relative error is smaller than S's everywhere); all six points converge end to end, deepest inner SCF 106 iterations (cap 150); and from λ = 0 with no multiplier start, all six reach the same root to ≤ 3.5e-10 in λ and ≤ 1.6e-10 Ha in E, in 11–21 outer iterations against the 3–4 a start at the root needs | 2e-10 Ha; 1e-12; 2e-6 Ha; 3e-5; 4e-3 rel. (S); 2e-3 rel. (V) | validation_cdft_et.rs, gen_cdft_et.py |
| IEF-PCM solver and SCF on PySCF's cavity; ferric's own cavity; the solver's analytic limits | water, NH3 / STO-3G, cc-pVDZ; ε = 78.4, 4.7. Limits: a unit point charge at d/R = 0, 0.25, 0.5 in one Lebedev sphere (50, 110, 302 points), ε = 78.4, 4; water's cavity for ε → ∞ | PySCF RHF.PCM() IEF-PCM; its SWIG cavity injected into ferric. Limits: the analytic Born and Kirkwood reaction-field energies, the Gauss-law charge −(ε−1)/ε, and the conductor equation S q = −v | charges 1.3e-17, E_pcm 3.5e-18 Ha (solver); total energy 4.8e-12 Ha (SCF); ferric's own cavity (modified-Bondi radii, 110-point spheres) 0.07–0.61% from PySCF. Limits at 302 points: Born 1.1e-8 (ε = 78.4) and 1.7e-7 (ε = 4) relative, Kirkwood ≤ 1.8e-4 relative at d/R = 0.5, each error falling monotonically 50 → 110 → 302; total charge within 1.3e-7 of Gauss's law; the conductor gap scales as 1 − f(ε) (ratio 100.000 between ε = 1e6 and 1e8) | 1e-11 Ha (solver); 1e-10 Ha (SCF); own cavity ±2%; limits: the a-posteriori estimate |E₃₀₂ − E₁₁₀| (|Q₃₀₂ − Q₁₁₀| for the charge), ratio within a factor 2 | validation_pcm.rs, gen_pcm.py, ief_limits.rs, pcm_ief_sympy.py |
| Geometry optimization, RHF and RKS | H2O, NH3, CH2O from distorted starts / RHF and B3LYP 6-31G, PBE cc-pVDZ | PySCF analytic gradient (KS with grid response) driven to max abs gradient ≤ 1e-6 Ha/Bohr by scipy BFGS; exact J/K | distances ≤ 2.6e-6 Bohr; angles ≤ 1.1e-4°; optimized energies ≤ 9.3e-13 Ha | 2e-5 Bohr; 1e-3°; 1e-10 Ha | validation_geometry_optimization.rs, gen_geometry_optimization.py |
| Geometry optimization, UHF, ROHF and UKS | HO2, CH3, NH2 from distorted starts / UHF, ROHF, UKS-PBE 6-31G | PySCF analytic gradient driven to max abs gradient ≤ 1e-6 Ha/Bohr by scipy BFGS; stability() at start and end | distances ≤ 2.6e-6 Bohr; angles ≤ 1.1e-4°; optimized energies ≤ 9.3e-13 Ha; ⟨S²⟩ ≤ 4.9e-9 (UHF, UKS; ROHF is a pure spin state and is not checked) | 2e-5 Bohr; 1e-3°; 1e-10 Ha; 5e-8 (⟨S²⟩, UHF and UKS) | validation_geometry_optimization.rs, gen_geometry_optimization.py |
| G0W0@HF | H2O / cc-pVDZ | Published MOLGW IP (11.97 eV); PySCF gw_ac (IP 12.160 eV) | — | 0.30 eV (IP); 0.20 eV (PySCF LUMO and gap) | h2o_g0w0_cohsex.rs |
| MP3 (RI integrals) | H2O, NH3 / cc-pVDZ, def2-SVP; all-electron and frozen core | exact-integral PySCF RHF, then the same aux basis and DF factorization as ferric; two independent numpy MP3 constructions (spin-orbital textbook, closed-shell via PySCF's linear doubles residual), agreeing to 2e-17 | ≤ 7.6e-12 Ha | 1e-10 Ha | validation_cc.rs, gen_cc.py, reference data |
| RI-CCD | H2O, NH3 / cc-pVDZ, def2-SVP | exact-integral PySCF RHF, then the same aux basis and DF factorization as ferric; PySCF CCD on the DF integrals | ≤ 1.9e-11 Ha | 2e-10 Ha | validation_cc.rs, gen_cc.py, reference data |
| RI-CCSD, spin-orbital and spin-adapted | H2O, NH3 / cc-pVDZ, def2-SVP; HCN / cc-pVDZ; H2O / aug-cc-pVDZ; C2H6 / cc-pVDZ (spin-adapted only) | exact-integral PySCF RHF, then the same aux basis and DF factorization as ferric; PySCF CCSD on the DF integrals | ≤ 4.7e-11 Ha (both solvers) | 2e-10 Ha | validation_cc.rs, gen_cc.py, reference data |
| CCSD(T), spin-orbital and spin-adapted (T) | H2O / cc-pVDZ, aug-cc-pVDZ; HCN / cc-pVDZ; C2H6 / cc-pVDZ (spin-adapted only) | exact-integral PySCF RHF, then the same aux basis and DF factorization as ferric; PySCF ccsd_t on the DF integrals | (T) ≤ 6.9e-12 Ha; the two (T) codes agree to 8.9e-12 | 1e-10 Ha | validation_cc.rs, gen_cc.py, reference data |
CAS-CI (library only: ferric_ci::run_cas_ci, closed-shell RHF reference, lowest Ms = 0 root): total, core and active-space energies | N2 at r = 1.10 and 2.20 Å, CAS(6,6) / cc-pVDZ; H2O, CAS(4,4) / 6-31G; each also with the window moved down one orbital | PySCF mcscf.CASCI on an exact-integral RHF with the same orbital window, checked against a dense diagonalization of the full active-space Hamiltonian. At 2.20 Å both codes use the symmetric RHF, which is internally unstable toward a symmetry-broken RHF 0.19 Ha lower | E_CASCI ≤ 1.4e-11 Ha; e_core and the active-space energy ≤ 2.6e-10 Ha; E_RHF 2.2e-12 Ha. Slater–Condon signs: every element of general_element, sigma and the diagonal against an independent bit-loop second-quantized H on random asymmetric integrals (CAS(4,4) to CAS(6,6), odd and even N_α), ≤ 8.9e-15; an exact Jordan–Wigner derivation of the same convention | 3e-9 Ha (CAS-CI energies), 5e-11 Ha (E_RHF), 1e-12 (signs) | validation_casci.rs, gen_casci.py, slater_condon_brute_force.rs, casci_slater_condon_phases_sympy.py |
Point-group-blocked closed-shell RHF (ferric_scf::symmetric::solve_rhf_symmetric with RhfConfig.symmetry, optional irrep_nelec; Python run_rhf(symmetry=True), CLI [scf] symmetry with kind = "rhf"; Abelian subgroup of the molecule's point group; returns a SymmetricRhf whose AO matrices are in the symmetry frame): total energy, per-irrep occupation, and the irrep_nelec excited-state energy | H2O (C2v), NH3 (Cs), C2H4 and benzene (D2h) / STO-3G, 6-31G; H2O with the out-of-plane 1b1 pair moved into a1 (irrep_nelec); H2 / cc-pVDZ at R = 50 and 10000 Å, sigma_g^2 | PySCF RHF with mol.symmetry = True and irrep_nelec, ferric's basis and geometry. D2h irrep labels depend on the detected axes, so D2h occupations are compared as a multiset. Negative control: without symmetry ferric ends not converged and far from sigma_g^2 (-0.71267 and -0.70740 Ha at R = 50 and 10000 Å); the value it stops at depends on the SCF trajectory and the BLAS kernel (PySCF without symmetry, recorded in the references: -0.42718 and -0.37335 Ha, also not converged) | E ≤ 1.0e-11 Ha over all 10 blocked and 2 excited cases; identical per-irrep occupations; blocked vs unblocked energy ≤ 1.1e-13 Ha (STO-3G, same frame) and ≤ 7.8e-14 Ha (H2O, NH3, CH4, N2 / cc-pVDZ, same frame); max |[R,F]| ≤ 6.4e-14; H2 sigma_g^2 (in scf_symmetry.rs, not the ignored PySCF test) matches PySCF to 1.1e-16 (R = 50 Å) and 4.4e-16 Ha (R = 10000 Å) | 1e-8 Ha (PySCF, H2O/NH3/C2H4/benzene and the excited state), 1e-9 Ha (stretched H2 reference energies), 1e-10 Ha (blocked vs unblocked), 1e-10 (commutator) | validation_scf_symmetry.rs, scf_symmetry.rs, gen_scf_symmetry.py |
Point-group-blocked closed-shell RKS (solve_rhf_symmetric with RhfConfig.xc set; Python run_dft/run_ksdft(symmetry=True), CLI [scf] symmetry with kind = "ksdft" or "rhf" + [dft] functional; no Fock or density symmetrisation: the KS grid is built in the symmetry frame, where every Lebedev rule and Becke weight maps onto itself under the detected operations; a near-degenerate HOMO/LUMO pair in different irreps not listed in irrep_nelec is refused, and so is a main grid below 110 angular points, where the grid splits degenerate partners by more than the 1e-3 Ha check): PBE total energy and per-irrep occupation | H2O (C2v) / STO-3G, 6-31G; H2 / cc-pVDZ at R = 50 and 10000 Å, sigma_g^2 and sigma_u^2 (irrep_nelec) | PySCF dft.RKS PBE with mol.symmetry = True on ferric's KS recipe: (75, 110) unpruned grid, Becke partition with Becke radii adjustment, RI-J with def2-universal-jkfit from ferric's JSON. Each code builds its grid in its own symmetry frame; the frames differ by an axis permutation or sign (an Oh operation), so the grids coincide. Negative control: without symmetry ferric RKS ends not converged, more than 1e-3 Ha (in practice about 0.4-0.6 Ha) above sigma_g^2 at -0.91423 Ha; the value depends on the SCF trajectory and the BLAS kernel (PySCF without symmetry, recorded in the references: -0.41244 and -0.40191 Ha, not converged) | E ≤ 3.6e-13 Ha over the 2 H2O and 4 H2 cases; identical per-irrep occupations; blocked vs unblocked energy ≤ 2.3e-13 Ha (H2O, NH3, C2H4, benzene / STO-3G PBE, same frame, RI-J; H2O / 6-31G also with exact J, 1.4e-14; H2O / STO-3G SCAN 5.7e-14 and ωB97X-V 1.4e-14); max |[R,F_KS]| ≤ 5.1e-13 (V_xc included); rotated and translated H2O input vs the unblocked input-frame energy 5.3e-5 Ha (the grid is not rotation invariant; the same-frame anchor holds) | 5e-12 Ha (PySCF), 1e-9 Ha (stretched H2 in scf_symmetry_ks.rs), 1e-10 Ha (blocked vs unblocked), 1e-10 (commutators), 1e-3 Ha (rotated input, documented) | validation_scf_symmetry.rs, scf_symmetry_ks.rs, gen_scf_symmetry.py |
Point-group-blocked open-shell UHF and ROHF (library only: ferric_scf::symmetric_open::solve_uhf_symmetric and solve_rohf_symmetric with RhfConfig.symmetry, optional per-irrep (n_alpha, n_beta) irrep_nelec argument; no Kohn-Sham; ROHF needs rohf_occupation_guard = false; return SymmetricUhf / SymmetricRohf, whose AO matrices are in the symmetry frame): total energy, per-irrep (alpha, beta) occupation, and the irrep_nelec excited-state energy | NH2, CH3 (D3h, blocked in a C2v subgroup), NO2 (C2v) doublets, O2 (D2h) and CH2 (C2v) triplets / STO-3G, 6-31G (NO2 6-31G only); H2O+ with the hole moved from the out-of-plane 1b1 orbital to 3a1 (2A1 instead of 2B1, irrep_nelec); singlet H2 at 2.0 Å / 6-31G as the negative control | PySCF UHF and ROHF with mol.symmetry = True and irrep_nelec ({irrep: (n_alpha, n_beta)}), ferric's basis and geometry. D2h (and CH3, whose D3h has three equivalent C2v subgroups) irrep labels depend on the detected axes, so those occupations are compared as a multiset of (n_alpha, n_beta). Negative control: unblocked UHF on singlet H2 at 2.0 Å lands on a spatially symmetry-broken solution 0.0847 Ha below the symmetric sigma_g^2 state (ferric with scf_stability_descent -1.00093524 Ha, PySCF after following its instability -1.00093524 Ha), which the blocked solver cannot reach by construction (a blocked closed-shell UHF has identical alpha and beta blocks, so it is the restricted determinant; it returns the sigma_g^2 energy, equal to RHF) | E ≤ 3.5e-12 Ha over all 11 UHF and 11 ROHF blocked cases and the 4 excited cases; identical per-irrep (alpha, beta) occupations; blocked vs unblocked energy ≤ 7.1e-14 Ha (STO-3G, same frame, scf_open_symmetry.rs); max |[R,F_alpha]|, |[R,F_beta]| ≤ 3.8e-15; ⟨S²⟩ blocked = unblocked to 1e-8; rotated and translated NH2 and O2 input vs the unblocked input-frame energy ≤ 5.7e-14 Ha (symmetrization shift ≤ 4.2e-16 Bohr) | 1e-8 Ha (PySCF, ground and excited), 1e-8 Ha (H2 negative control energies), 1e-10 Ha (blocked vs unblocked), 1e-9 Ha (rotated input), 1e-10 (commutators) | validation_uhf_symmetry.rs, scf_open_symmetry.rs, gen_uhf_symmetry.py |
| G0W0 quasiparticle energies, HOMO−2 to LUMO+2, @HF and @PBE (and @HF with one frozen core orbital) | H2O, NH3, N2 / cc-pVDZ (cc-pvdz-ri), aug-cc-pVDZ (aug-cc-pvdz-rifit); @PBE: H2O / both bases, N2 / cc-pVDZ | PySCF gw_ac fed ferric's basis and aux, with the same 100-point frequency grid, Padé nodes, full quasiparticle equation and exact-integral SCF; @PBE references apply ferric's XC density floor (ρ ≤ 1e-10) and evaluate the Padé as the standard Thiele fraction, because PySCF's pade_thiele_ndarray applies its last coefficient twice (up to 7.1e-3 Ha at @PBE) | @HF ≤ 1.3e-7 Ha, @PBE ≤ 6.2e-8 Ha; Σc(ef + iω) at the Padé nodes ≤ 8.6e-11 Ha; Σx ≤ 4.9e-9 Ha | 1e-6 Ha (Σc(iω) 1e-9) | validation_gw.rs, gen_gw.py |
| G0W0@HF with ECPs | I2, Xe, Ag2 / aug-cc-pVDZ-PP (def2-tzvp-rifit) | PySCF gw_ac, same basis, inline ECP and aux | ≤ 2.5e-6 Ha (ε_mf 2.9e-6 from the ECP SCF offset) | 2e-5 Ha | ″ |
| U-G0W0@UHF | OH, CH3, NH2 / cc-pVDZ, aug-cc-pVDZ; O2 and CH2 triplets / aug-cc-pVDZ | PySCF ugw_ac on a stability-checked UHF, with ferric's per-spin Fermi level | ≤ 8.7e-7 Ha; OH/cc-pVDZ 7.0e-6 Ha (its π hole makes the UHF marginally stable) | 3e-5 Ha | ″ |
U-G0W0@UKS/PBE (gw with [rpa] xc and multiplicity > 1) | OH, CH3, NH2 / cc-pVDZ (cc-pvdz-ri) | PySCF ugw_ac Σc(ef + iω) on a stability-checked exact-J UKS/PBE with ferric's per-spin XC density floor and per-spin Fermi level; standard Thiele continuation and the quasiparticle equation solved in numpy with the density-fitted Σx, because PySCF's ugw_ac vhf_df exchange has the wrong sign | Σc(ef + iω) ≤8.7e-9 Ha, v_xc ≤7.1e-10 Ha, quasiparticle energies ≤2.6e-8 Ha on orbitals whose quasiparticle equation has one root (NH2's α HOMO and HOMO−1 have three within 1 Ha and are not compared); ferric solves each spin's quasiparticle equation with Σx − v_xc inside it, as the reference does; adding the shift after an unshifted solve lands 0.38–0.96 eV away, and the test requires ferric to miss that root | Σc(ef + iω) 1e-7 Ha; v_xc 1e-8 Ha; quasiparticle energies 3e-7 Ha | validation_gw.rs, gen_gw.py |
| COHSEX (@HF and @PBE), evGW₀, evGW (@HF) | COHSEX: H2O, N2 / cc-pVDZ; evGW₀, evGW: H2O / cc-pVDZ | numpy COHSEX on PySCF's density-fitted integrals; @PBE on the exact-J RKS/PBE orbitals with ferric's XC density floor, plus the static Σx − v_xc from PySCF's density-fitted exchange and v_xc; anchored to U-COHSEX on the same RKS orbitals as UKS (1.1e-15 Ha); evGW₀ and evGW by iterating PySCF's get_sigma with ferric's update rule | COHSEX@HF 9.4e-10 Ha; COHSEX@PBE 1.2e-9 Ha; evGW₀/evGW 5.7e-7 Ha | 1e-8 / 1e-8 / 5e-6 Ha | ″ |
| U-COHSEX@UHF (static, HF reference, spin-summed W) | OH, CH3, NH2 / cc-pVDZ (cc-pvdz-ri), aug-cc-pVDZ (aug-cc-pvdz-rifit); O2 and CH2 triplets / aug-cc-pVDZ; H2O / cc-pVDZ singlet UHF against the closed-shell COHSEX | numpy U-COHSEX on PySCF's density-fitted integrals with ferric's aux, W from ε = I + Π_α + Π_β, on the stability-checked UHF of the U-G0W0 row; the singlet UHF numpy reproduces the closed-shell COHSEX reference to 2.1e-9 Ha | ε_qp ≤ 3.3e-9 Ha (open shell); the singlet UHF through run_u_gw equals closed-shell COHSEX to 8.1e-10 | 3e-8 Ha (anchor 1e-8) | validation_u_cohsex.rs, gen_u_cohsex.py, reference data |
| U-RPA, U-G0W0 and U-RI-MP2 (doubles only) on a ROHF reference, semi-canonicalized per spin | OH, CH3 doublets / cc-pVDZ (cc-pvdz-ri) | PySCF URPA, ugw_ac and a numpy UMP2 (checked against DFUMP2) on the ROHF orbitals semi-canonicalized in numpy (each spin's Fock diagonalized in its occupied and virtual blocks); the ROMP2 singles term is not included on either side | U-RPA E_c ≤ 7.3e-12 Ha, U-MP2 E_c ≤ 8.7e-12, U-G0W0 QP ≤ 1.5e-5 (OH β) and ≤ 1.3e-6 (CH3); semicanonical orbital energies ≤ 6.4e-10 | 1e-10 Ha (E_c), 5e-5 Ha (QP) | validation_rohf_reference.rs, gen_rohf_semicanonical.py, reference data |
| BSE-TDA singlet excitation energies and oscillator strengths (G0W0@HF, static W, frozen core 0) | H2O / cc-pVDZ (cc-pvdz-ri), aug-cc-pVDZ (aug-cc-pvdz-rifit); NH3, CH2O / cc-pVDZ; lowest five singlets | numpy BSE-TDA on PySCF density-fitted integrals with ferric's aux, W from the static RPA dielectric on HF energies; the kernel is diagonalized on ferric's own quasiparticle energies, because G0W0 energies of core and high virtual orbitals move by up to 0.29 Ha under a 1e-10 relative change of Σc(iω). The lowest five Ω are insensitive to that: two independent generator runs move individual far-from-Fermi quasiparticle energies by up to 3.8e-3 Ha and the lowest five Ω by at most 1.1e-7 Ha, because those states carry ≤ 7e-3 of their norm on the affected rows. Replacing the out-of-window quasiparticle energies by a rigid scissor outside HOMO−k…LUMO+k instead moves the lowest five Ω by 1.5e-4 to 9.4e-3 Ha (k = 2) and 1.4e-5 to 2.0e-4 Ha (k = 8), so every quasiparticle energy is solved and the poorly-determined ones are reported in BseResult::qp_suspect_mos rather than replaced; CIS limit (W replaced by the bare Coulomb interaction, HF energies) against the same numpy build and PySCF tdscf.TDA | Ω ≤ 1.8e-10 Ha and oscillator strengths ≤ 2.6e-9 against the kernel on ferric's QP energies; ≤ 2.2e-7 Ha with each side's own QP energies; CIS anchor ≤ 1.6e-9 Ha vs numpy DF-CIS | 2e-9 Ha (Ω), 3e-8 (f), 2e-6 Ha (own QP) | validation_bse.rs, gen_bse.py |
RPAx static polarizability (run_rpax_static_polarizability, statically screened W(0) from full-rank PDEP, frozen core 0) | H2O, NH3 / aug-cc-pVDZ (aug-cc-pvdz-rifit) at RHF, scissor 0; H2O / cc-pVDZ (cc-pvdz-ri) at PBE (exact J, (75,110) grid), scissor 0.36 Ha; full 3×3 tensor | numpy assembly of the same A±B kernel on PySCF density-fitted integrals with ferric's aux, W(0) = Lᵀ(I + Π(0))⁻¹L by a direct inverse on the unshifted mean-field energies. The numpy bare-exchange limit (W replaced by the bare Coulomb interaction) equals PySCF's CPHF α from its own response operator to ≤ 1.9e-14 relative, both density-fitted and with exact integrals. ferric's bare-exchange limit is compared with the same numpy build; against exact-integral CPHF it differs by the density-fitting error of the aux (9.0e-5 H2O, 1.5e-5 NH3). The lowest eigenvalues of A+B and A−B are compared too, because the static α does not depend on A−B | α ≤ 5.3e-9 relative (worst element over max |α|), α_iso ≤ 2.8e-9; bare limit ≤ 5.4e-9; lowest A±B eigenvalues ≤ 7.5e-10 Ha | 5e-8 (α), 1e-8 Ha (eigenvalues) | validation_rpax_alpha.rs, gen_rpax_alpha.py |
| TDA and Casida TDDFT excitation energies | water, formaldehyde, NH3 / 6-31G, aug-cc-pVDZ; r2SCAN (τ kernel): water / 6-31G on the flat 75 × 110 grid | PySCF tddft.TDA/TDDFT, same RI and grid; r2SCAN: PySCF get_ab | HF ≤ 2e-6 eV; LDA/PBE ≤ 1.2e-5 eV; B3LYP ≤ 8.1e-4 eV on the default pruned grid, ≤ 2.8e-6 eV (water, formaldehyde / aug-cc-pVDZ) on the reference's flat grid; r2SCAN 2.1e-6 eV (TDA and Casida). PySCF fed ferric's grid coordinates and weights reproduces ferric's r2SCAN roots to 6e-8 eV and E_SCF to 1e-12 Ha on the flat and the default grid | 1e-3 eV; same grid 2e-5 eV | validation_tddft.rs, gen_tddft_refs.py |
| RI-MP2 analytic gradient (exact-J/K RHF), all electrons and frozen core | distorted H2O, bent HCN / cc-pVDZ (cc-pvdz-ri); distorted NH3 / def2-SVP (def2-svp-rifit); frozen core: the same three, freezing the cores ORCA freezes | ORCA RI-MP2 NoRI NoFrozenCore EnGrad and frozen-core RI-MP2 EnGrad, with the same /C aux; PySCF DFMP2 5-point finite differences (all electrons) | ≤ 2.1e-9 Ha/Bohr (PySCF FD); ≤ 5.1e-8 Ha/Bohr (ORCA, its own floor); energies ≤ 1.3e-10 Ha. Frozen core: 4.9e-8 (H2O), 1.3e-8 (HCN), 1.7e-8 (NH3) Ha/Bohr vs ORCA, E_corr < 5e-11 Ha; H2O / STO-3G with O 1s frozen 2.0e-9 Ha/Bohr vs FD of ferric's own energy; without the core–active response block the H2O / cc-pVDZ gradient misses FD by 9.8e-5 | 2e-8 Ha/Bohr (FD), 2.5e-7 Ha/Bohr (ORCA); 1e-9 Ha; 1e-6 Ha/Bohr (own FD) | validation_rimp2_gradient.rs, gen_rimp2_gradient.py |
RI-MP2 relaxed dipole and finite-field relaxed polarizability (library: cpks_polar::static_relaxed_density_ao, ff_polar; all electrons) | water / STO-3G (pinned) and cc-pVDZ (measured, not pinned); aux cc-pvdz-ri | PySCF finite-field DF-MP2 energy with the same aux basis (scripts/cpks/ff_dfmp2_dipole_alpha.py) | relaxed μ_z 3e-8 a.u. (STO-3G), 2e-8 (cc-pVDZ); ff_polar relaxed α diagonal 3e-6 a.u. (STO-3G), α_zz 1.4e-5 (cc-pVDZ).; the analytic relaxed α (mp2_polarizability_analytic) is the next row | 1e-6 a.u. (μ); 1e-4 a.u. (α) | cpks_polar.rs, ff_polar.rs, ff_dfmp2_dipole_alpha.py |
Relaxed RI-MP2 static polarizability, analytic (mp2_polarizability_analytic → analytic_alpha_relaxed; library only, closed shell, no frozen core): dipole CPHF, first-order Fock response, central difference (h = 1e-4) of the relaxed density along the first-order field reference. Exactness anchor: the same difference of the SCF density equals the CPHF HF α to 4e-9 rel. ff_polar (finite field, re-converged SCF) is a cross-check. Attenuated correlation (Coulomb RHF, erfc(ωr) MP2) matches a 5-point finite field of that energy | H2O / STO-3G, cc-pVDZ; NH3 in a generic orientation (all 9 elements) / cc-pVDZ; aux cc-pvdz-ri, exact-J/K RHF | PySCF 2.13 finite-field −d²E/dF² of RHF + DF-MP2, same aux basis (5-point diagonal, 16-point mixed) | ≤ 2.2e-6 rel | 1e-5 × max(|α_ref|, α_iso) | cpks_polar.rs (relaxed_alpha_matches_pyscf_energy_hessian), ff_dfmp2_dipole_alpha.py |
IEF-PCM analytic nuclear gradient (ferric_pcm::pcm_gradient, threaded into the RHF/UHF/ROHF/KS gradients) | water, C1 methanol, NH2 / STO-3G, ε = 78.4 (RHF, RKS-SVWN, UHF, ROHF; point and Gaussian probes; Lebedev 50, 110, 302) | central FD of pcm_step's energy at fixed density and of the solvated SCF energy; PySCF 2.13 IEF-PCM nuc_grad_method() on ferric's 302-point cavity (= PySCF's gen_surface: tessera count, area, centroid to 1e-10); rigid-rotation FD for the torque | PySCF: 4.2e-11 (water), 7.2e-11 (methanol) Ha/Bohr; FD: ≤ 2.0e-7 (fixed density), ≤ 2.9e-7 (SCF) Ha/Bohr; ε = 1 + 2e-9 vs vacuum 3.3e-12; Σ_A g = 0 per part; torque 1.36e-4 vs FD to 8e-9; nine single-term mutants (switching, area, S/D diagonal and off-diagonal, tessera-site, nuclear-tessera terms) each fail the FD tests | 1e-6 Ha/Bohr (PySCF); FD: |FD(2h) − FD(h)| plus a round-off / SCF-convergence floor | pcm_gradient.rs (ferric-pcm), pcm_gradient.rs (ferric-scf), gen_pcm_grad.py |
| COSMO solvation (RHF, UHF; energy only, no gradient: gradient entries refuse it) | H2O, NH3, CH3OH, acetate(−) / STO-3G, cc-pVDZ × ε 4.7, 78.4; HO2 (UHF) / cc-pVDZ | PySCF pcm.py COSMO driver with ferric's radii, 110-point cavity and point-charge potential (ferric's model); stock PySCF COSMO for the formulation gap | solvated energy ≤ 1.9e-11 Ha, E_cosmo ≤ 9.7e-11 Ha (ferric's model); 0.05–0.51% from stock PySCF COSMO (point vs Gaussian surface charges) | 1e-10 Ha; 1e-9 Ha; 2% | validation_cosmo.rs, gen_cosmo.py |
| Attenuated RI-MP2 (erfc on 3-center and metric) | H2O, NH3 / aug-cc-pVDZ + aug-cc-pVDZ-RIFIT, ω 0.2, 0.222, 0.42, 1.0 Bohr⁻¹ | numpy RI-MP2 on PySCF int3c2e/int2c2e under with_range_coulomb(-ω) | E_corr ≤ 5.9e-12 Ha at every ω; ω → 0 reproduces Coulomb RI-MP2 to 1.6e-15 | 1e-10 Ha | validation_attenuated_mp2.rs, gen_attenuated_mp2.py |
MP2-V (att_mp2_vv10): damped VV10 half, terfc-attenuated MP2 half and erfc control | H2O / cc-pVDZ, aug-cc-pVDZ; NH3 / cc-pVDZ; water dimer (S22) / aug-cc-pVDZ (VV10 and erfc control only; the terfc reference has no dimer); r₀ = 1.00 Å (b 11.0) and 0.85 Å (b 8.0), C = 0.0089, ferric's 50 × 50 NLC grid, PySCF's RHF density | PySCF numint._vv10nlc (undamped); numpy VV10 from Vydrov & Van Voorhis 2010 with the 1 − terfc(R, r₀)² damping (damped); numpy RI-MP2 on PySCF with_range_coulomb(-ω) integrals, ω = 1/(r₀√2), frozen core (erfc control); numpy RI-MP2 on Fourier-space terfc integrals (PySCF ft_ao plus k-space quadrature; the SCS-MP2(2terfc) reference, reused, r₀ = 1.00 Å, frozen core 1; its terfc definition is taken from ferric's shim.cc, so only the r₀ → 0 and ∞ limits constrain ω = 1/(r₀√2)) (terfc) | E_nl ≤ 3.1e-16 Ha undamped, damped and at the r₀ → 0 self-pair limit; terfc E_c, E_OS, E_SS ≤ 2.5e-12 Ha; erfc E_c ≤ 7.0e-12 Ha; E_nl on ferric's own density ≤ 1.12e-13 Ha; ∫ρ on the NLC grid ≤ 1.10e-13; a collapsed UHF singlet reproduces them (terfc E_c ≤ 9e-12 Ha). Controls: the erfc and Coulomb operators miss the terfc E_c by ≥ 1.0e-3 Ha (the test requires only ≥ 1e-8 Ha); mutants: erfc for terfc, r₀ in Å, Coulomb fitting metric | 5e-15 Ha (VV10); 1e-12 electrons (∫ρ on the NLC grid); 1e-12 Ha (E_nl on own density); 3e-11 Ha (terfc E_c); 1e-10 Ha (erfc E_c, E_HF) | validation_mp2_v.rs, gen_mp2_v.py, gen_terfc_integrals.py |
SCS-MP2(2terfc): terf/terfc 3-index (P|μν) and 2-index (P|Q) integrals, element-wise by shell class (s through f), and E_OS, E_SS (r₀ = 0.75, 1.00, 1.05 Å) with the Eq. 12 total (scs_mp2_2terfc, published defaults) | H2O, NH3 / cc-pVDZ + cc-pVDZ-RI; H2O / aug-cc-pVDZ + aug-cc-pVDZ-RIFIT; frozen core 0 and 1 | Fourier-space terf, (2π)⁻³∫d³k (4π/k²)e^(−k²/4w²)cos(kr₀) Re[χ̂_P* ρ̂_μν], on PySCF ft_ao/ft_aopair and a Gauss–Legendre × Lebedev k-grid; terfc = PySCF analytic Coulomb − terf; numpy RI-MP2 with the terfc metric on PySCF exact-J/K RHF orbitals. Shares none of ferric's McMurchie–Davidson pass or tables. The same k-grid with the erf kernel reproduces PySCF with_range_coulomb(w) integrals to ≤ 3.4e-12, and the s-type terf/terfc elements match a 1-D real-space Gaussian-blob quadrature (no Fourier transform) to ≤ 3.5e-12; the generator refuses to write above 5e-11 | 3-index ≤ 1.4e-13 and 2-index ≤ 2.6e-12 in every shell class; E_OS, E_SS and the Eq. 12 correlation energy ≤ 3.3e-12 Ha; terfc at r₀ = 0.75 Å misses the 1.05 Å reference by 5.2e-3 Ha or more, and erfc at the same curvature misses terfc by 4.1e-2 Ha or more. the published parameters (aug-cc-pVTZ, frozen core, no counterpoise) are exercised only on an S66 subset (n=5, H-bonded/mixed, S66x8 geometry; no external anchor for the counterpoise path) | 2e-12 (3-index), 3e-11 (2-index); 5e-11 Ha | validation_terfc_integrals.rs, validation_scs_mp2_2terfc.rs, gen_terfc_integrals.py, reference data |
| QM/MM electrostatic embedding (RHF): energy, embedding shift, QM gradient, MM forces | H2O + 10 charges / cc-pVDZ, aug-cc-pVDZ; CH3OH + 501 TIP3P charges / 6-31G | PySCF qmmm.mm_charge | energy and shift ≤ 4.8e-12 Ha; QM gradient ≤ 1.2e-10, MM forces ≤ 4.4e-12 Ha/Bohr (up to 501 charges) | 5e-11 Ha; 1e-9, 5e-11 Ha/Bohr | validation_qmmm.rs, gen_qmmm.py |
Gaussian-smeared MM charges (width in Bohr, ζ = 1/width², same as PySCF radii with unit="Bohr") | H2O + 10 charges / cc-pVDZ, widths 0.5, 1, 2 Bohr | PySCF qmmm.mm_charge(radii=) | energy ≤ 4.1e-12 Ha; QM gradient ≤ 1.2e-10 Ha/Bohr; width → 0 reproduces point charges to 3.0e-12 Ha | 5e-11 Ha; 1e-9 Ha/Bohr | ″ |
| KS QM/MM (exact J/K, matched (75,110) grid; gradient with grid response) | CH3OH + 20 charges / def2-SVP, B3LYP and PBE | PySCF qmmm.mm_charge on dft.RKS, grid_response=True | energy ≤ 4.1e-12 Ha; QM gradient ≤ 2.9e-9, MM forces ≤ 1.8e-10 Ha/Bohr | 1e-10 Ha; 3e-8, 2e-9 Ha/Bohr | ″ |
| Thole polarizable embedding (induced point dipoles, exponential Thole damping a = 2.1304): energy, E_pol, induced dipoles, QM gradient, MM rows | H2O + 4 TIP3P waters (α O 0.837, H 0.496 ų; with and without intramolecular exclusions) / cc-pVDZ, RHF; NH2 + 3 waters / cc-pVDZ, UHF; anchors: one site 30 Å away (classical limit −½α|E0|²), α → 0 (PySCF qmmm.mm_charge) | numpy induction model on PySCF point-dipole field integrals and qmmm.mm_charge, self-consistent in the SCF; gradients by 5-point finite difference | total energy ≤ 3.7e-12 Ha, E_pol ≤ 1.5e-9, induced dipoles ≤ 1.5e-9 a.u., QM and MM gradients ≤ 3.0e-9 Ha/Bohr; far-site E_pol within 7.7e-8 (relative) of −½α|E0|² | 5e-11 Ha (total), 1e-8 (E_pol, dipoles), 3e-8 Ha/Bohr | validation_thole.rs, gen_thole.py |
QM/MM geometry optimization (optimize_qmmm): stationarity of the returned geometry and the full-structure gradient (link (1−g)/g fold, RC/RCD midpoint ½/½ fold, MM force field) | Capped ethane (QM CH3, link at the C–C cut) RHF × Keep, delete-host (Z1), RC / STO-3G, realistic MM LJ (C σ 3.40 Å, H 2.65 Å; every QM–MM pair excluded or 1-4 scaled), Z1 also 6-31G, move_mm all; ethyl radical (QM CH2•, capped CH3• doublet) UHF × Z1, RC, all; RKS/PBE and UKS/PBE (DF-J/K def2-universal-jkfit) × RCD × ("within", r) with the M2 hydrogens frozen; capped ethane + 2 TIP3P-charged waters selected by whole residue × RCD × ("residues", [...]) | None exists: no other code defines this energy surface (partition, link scale and boundary scheme are not standardized). Internal two-path check: central finite difference of the energy the optimizer minimizes, partition rebuilt at each displacement, against the analytic gradient. Both paths share the SCF, integrals, DF fit and grid; partition-construction errors are covered by charge-bookkeeping assertions and scheme-swap controls instead. With no MM atoms, each of RHF/UHF/RKS/UKS reproduces the plain optimizer bit for bit | Free rows at the returned geometry ≤ 4.4e-6 Ha/Bohr (frozen rows ≥ 3e-3, as they must be); FD vs analytic ≤ 1.8e-8 Ha/Bohr at the minimum and ≤ 5.8e-7 relative off it (PBE ≤ 8.4e-8). Gradients of the wrong scheme, of the field switched off, or with an MM-row fold broken miss by ≥ 3.5e-3 relative; Keep (host charge 0.44 Å from the link H, q = −0.1) converges in 13 steps. The residue system has no bound minimum with its generic force field, so only its free-set behaviour and off-minimum gradient are checked | per case, ~10× measured: stationarity 9.6e-6 to 4.4e-5 Ha/Bohr; FD 1.1e-7 to 1.8e-7 Ha/Bohr (minimum), 5.3e-7 to 5.8e-6 relative (off) | validation_optimize_qmmm.rs, qmmm_gradient_at_minimum.rs |
| MM force field (ferric-mm): bond, angle, torsion, Coulomb and LJ energies and gradients, exclusion and 1-4 pair sets | ALA-ALA, ACE-PHE-NME, TRP-PRO-ASP (charge −1), ACE-PHE-NME + 3 TIP3P waters, at the relaxed geometry and two random displacements; one extra case with every torsion phase shifted by 37° | OpenMM Reference platform (double precision), ff14SB and flexible TIP3P, no cutoff (the default; PME / Ewald and periodic images are not implemented); Coulomb and LJ split by evaluating copies of the nonbonded force with epsilons or charges zeroed | energies ≤ 1.75e-12 relative, gradients ≤ 8.5e-11 relative (after OpenMM's Coulomb constant, which differs from ferric's by 6.6e-11 relative); pair sets identical. Near φ = 0 and π and near-linear valence angles the torsion gradient matches central FD within a tolerance derived from the step (truncation + round-off); an exactly linear angle (and a torsion through a collinear angle) gives a finite, exactly zero gradient | 1e-11 (energy), 1e-9 (gradient), relative; FD: the derived step tolerance | validation_mm.rs, gen_mm.py, terms_fd.rs, mm_dihedral_gradient_sympy.py |
MM nonbonded cutoff (ferric-mm, opt-in NonbondedMethod::CutoffNonPeriodic, Rust library only): reaction-field Coulomb, LJ truncated or switched, 1-4 pairs uncut, cell list | Ethanol + 12 TIP3P-charged waters (45 atoms, diameter 14.2 Å): cutoff 5 Å with ε_rf 78.3, 78.3 + LJ switch from 4 Å, and 1; cutoff 2.9 Å with a switch from 2.2 Å (two 1-4 pairs beyond the cutoff) | OpenMM NonbondedForce CutoffNonPeriodic, Reference platform, charges rescaled to OpenMM's Coulomb constant; anchors: cutoff beyond the diameter with ε_rf = 1 equals the all-pairs sum bit for bit (LJ energy, gradient) and Coulomb minus exactly c_rf Σ q_i q_j; the default all-pairs path is unchanged bit for bit; cell list equals the brute-force pair set | energy ≤ 2.4e-14, gradient ≤ 2.4e-15 relative; central FD with pairs inside, in the switching region and beyond the cutoff ≤ 1.8e-11 Ha/Bohr | 1e-12 relative (energy, gradient); FD 1e-10 Ha/Bohr | cutoff.rs, gen_openmm_mm_cutoff_refs.py, mm_cutoff_sympy.py |
QM–MM Lennard-Jones across a covalent cut (qmmm_mm_terms): 1-2/1-3 QM–MM pairs excluded, 1-4 pairs scaled by the topology's scale_lj_14, both from the full bond graph | Ethanol cut at C–C (realistic LJ, C σ 3.4 Å), QM = CH2OH and QM = CH3 at 1-4 LJ scale 0.5, QM = CH2OH at 0.75; every pair class (1-2, 1-3, 1-4, 1-5) present across the cut | OpenMM Reference platform, exceptions from OpenMM's own createExceptionsFromBonds, charges zero; QM–MM part isolated as E(all) − E(QM ε = 0) − E(MM ε = 0). With no bond path between the regions the result is bit-identical to the every-pair sum | energy ≤ 8.7e-19 Ha, gradient ≤ 2.0e-18 Ha/Bohr; FD of the MM terms across the cut ≤ 1.5e-11 Ha/Bohr. The every-pair sum misses OpenMM by 6839 kcal/mol | 1e-14 Ha, 1e-14 Ha/Bohr; FD 1.5e-10 Ha/Bohr | qmmm_lj_vs_openmm.rs, gen_openmm_qmmm_lj_refs.py |
| External potential in the RI-MP2 analytic gradient | H2O + 10 charges / cc-pVDZ; CH3OH + 20 charges / 6-31G; aux cc-pVDZ-RI | 5-point finite difference of PySCF DFMP2 on qmmm.mm_charge RHF, same aux | energies ≤ 8.4e-12 Ha; RI-MP2 gradient ≤ 4.8e-9 Ha/Bohr vs PySCF FD | 1e-10 Ha; 3e-8 Ha/Bohr | validation_qmmm_mp2_gradient.rs, gen_qmmm.py |
| κ-regularized RI-MP2 (κ = 0.5, 1.1, 2.0 Eh⁻¹; opposite- and same-spin parts) | H2O, CH4 / cc-pVDZ (cc-pvdz-ri) | numpy (1 − exp(−κΔ))² sum on PySCF density-fitted integrals with the same aux basis; κ → ∞ checked against PySCF DFMP2 | E_corr (OS, SS, total) ≤ 3.3e-12 Ha at κ = 0.5, 1.1, 2.0; κ → ∞ equals RI-MP2 exactly | 3e-11 Ha | validation_kappa_mp2.rs, gen_kappa_mp2.py |
AO-Laplace RI-MP2 (compute_mo and compute_ao, n_quad 3/5/7, all electrons) | H2O / cc-pVDZ and aug-cc-pVDZ, CH4, s-trans-1,3-butadiene, n-octane / cc-pVDZ (cc-pvdz-ri, aug-cc-pvdz-rifit) | Two numpy references on PySCF density-fitted integrals with the same aux basis: the dense (i,a,j,b) sum with the exact 1/Δ (equal to PySCF mp.dfmp2.DFMP2 to 6.7e-16), and the same sum with 1/Δ → Σ_k w_k e^(−t_k Δ) over the identical minimax nodes parsed from minimax.rs, which isolates quadrature error from implementation error | MO ≡ AO ≤ 3.4e-13 Ha; vs the quadrature-isolated reference (implementation error) ≤ 3.1e-11 Ha; vs exact DF-MP2 at n_quad = 7 (quadrature error) 8.0e-9 (CH4, R = 19.0), 4.0e-8 (octane, R = 24.5), 1.5e-7 (butadiene, R = 33.7), 8.3e-8 (H2O, R = 36.4), 2.2e-7 (H2O/aug, R = 45.7) — the error tracks R, and no case approaches the k = 7 table limit R ≤ 1000 | 1e-10 Ha (MO ≡ AO); 1e-9 Ha (vs quadrature reference); 2e-6 Ha (vs exact DF-MP2) | validation_laplace_mp2.rs, gen_laplace_mp2.py, reference data, validation_laplace_energy_is_thread_independent.rs |
Local RI-MP2 (rimp2 with [local] scheme = "amplitude-threshold"), in-core (global and per-pair domain fit) and integral_direct, at ε = 0 with every locality map at its no-op limit; finite ε as a measured error map | H2O, n-butane / cc-pVDZ, 6-31G (cc-pvdz-ri), frozen core 0 and one per heavy atom; finite ε on n-butane / cc-pVDZ | PySCF DFMP2 with the same aux basis (canonical orbitals, closed-form denominators), checked against a dense numpy sum to 1e-12. ORCA 6.1.1 DLPNO-MP2 (NormalPNO, TightPNO) on n-butane and n-octane / cc-pVDZ is recorded as a ballpark only: it truncates by PNO occupation, not by an amplitude threshold, so the two recoveries are not compared | E_corr ≤ 1.38e-11 Ha at ε = 0 (24 comparisons), at the default PCG stop of relres 1e-6. At ε = 1e-5, 1e-4, 1e-3 (n-butane, all electrons) ferric recovers 99.98%, 99.67%, 95.0% of DF-MP2 in-core and 99.98%, 99.65%, 95.0% integral-direct with its production maps; ORCA DLPNO-MP2 recovers 99.97% (NormalPNO) and 99.99% (TightPNO) of its own RI-MP2 | 1e-10 Ha (ε = 0); finite ε: under-correlation that grows with ε, no tolerance | validation_lmp2_amplitude.rs, gen_lmp2_amplitude.py |
DLPNO-MP2, pair-driven library path (dlpno_mp2_from_b_ov; library only, canonical occupieds). Untruncated (DlpnoConfig::exact()) against PySCF, then a measured truncation sweep over t_cut_pno and t_cut_pairs | n-butane, n-hexane, n-octane / cc-pVDZ (cc-pvdz-ri), frozen core 0 and one per carbon | PySCF DFMP2 with the same aux basis (checked against a dense numpy sum to 1e-12) for the untruncated number. ORCA 6.1.1 RI-MP2 cross-checks PySCF to 4.0e-8 Ha. ORCA DLPNO-MP2 (Normal/TightPNO) and, for n-butane only, DLPNO-CCSD(T) against canonical CCSD(T) are recorded as context | Untruncated DLPNO and canonical RI-MP2 agree with PySCF to 3.6e-11 Ha (12 comparisons). Recovery of ferric's own canonical RI-MP2 (all electrons, C4 / C6 / C8): 99.98 / 99.95 / 99.92% at t_cut_pno = 1e-8, 99.75 / 99.48 / 99.10% at 1e-7, 97.2 / 95.3 / 93.4% at 1e-6, monotone in both thresholds and never above 100%. ORCA DLPNO-MP2 recovers 99.975 / 99.965 / 99.956% (NormalPNO) and 99.988 / 99.983 / 99.980% (TightPNO) of ORCA RI-MP2. ORCA DLPNO-CCSD(T) on n-butane recovers 99.87% (Normal) and 99.95% (Tight) of canonical CCSD(T); that canonical CCSD(T) uses exact integrals while DLPNO uses RI, so those percentages include the RI error. Different localization, different thresholds: the two sets of percentages are not a ranking, and the all-electron columns are lopsided, because ORCA applies a separate TCutPNO (core) of 1e-10 (against 1e-8 for valence at NormalPNO, observed for n-butane) while ferric applies one flat t_cut_pno to every pair (n-butane at 1e-8: 99.9957% frozen-core against 99.977% all-electron; compare the frozen-core rows in the JSON for the cleaner side-by-side). The pair screen t_cut_pairs is uninformative at C4–C8: all-electron it removes only core pairs (at 1e-4, 13 / 21 / 30% of pairs for C4 / C6 / C8, costing 0.22 / 0.44 / 0.82% of E_corr), frozen-core it keeps every valence pair. With ferric's own Boys-localized occupieds the same screen drops pairs (next row); ORCA's pair prescreen is a different criterion and was not re-run. No speedup is claimed and ferric has no DLPNO-CCSD(T) driver | 4e-10 Ha (untruncated vs PySCF); ORCA RI-MP2 vs PySCF 4e-7; truncated runs: monotone, one-sided, and the t_cut_pno = 1e-6 run must miss the reference by more than the anchor bar with virtual retention below 1 | validation_dlpno_mp2.rs, gen_dlpno.py |
DLPNO-MP2 pair screen on Boys-localized occupieds (dlpno_mp2_localized_from_b_ov; library only, closed shell, pair screening only: full canonical virtuals, no PNO/PAO truncation). Occupieds localized block by block (core, valence), Fock-coupled Jacobi amplitude solve over the retained pairs, pair retention and recovered E_corr against ferric's canonical RI-MP2 at t_cut_pairs = 1e-3 to 1e-6 | water, n-butane, n-hexane, n-octane / cc-pVDZ (cc-pvdz-ri), frozen core 0 and one per carbon | ferric's own canonical RI-MP2 (the energy is invariant to the occupied rotation, so the untruncated localized solve must reproduce it); a numpy prototype (proto_dlpno_loc_occ.py) of the formulation exists but its output is not committed and it compares only against its own canonical sum. No ORCA comparison | Untruncated localized solve == canonical RI-MP2 to 3.2e-12 Ha (water), 1.9e-12 / 3.9e-12 / 5.9e-12 Ha (C4 / C6 / C8); the residual is the Jacobi tolerance (2.8e-15 at a 1e3 tighter threshold). Pair retention at t_cut_pairs = 1e-4 (all electron, C4 / C6 / C8): 0.667 / 0.511 / 0.410, recovering 99.90 / 99.81 / 99.76% of E_corr (errors 0.58 / 1.7 / 2.8 mHa, one-sided); frozen core: 0.901 / 0.716 / 0.585, recovering 99.93 / 99.84 / 99.80%. At t_cut_pairs = 1e-5 (C4 / C6 / C8): all-electron retention 0.725 / 0.600 / 0.494 with errors 0.19 / 0.50 / 0.88 mHa; frozen-core retention 1.000 / 0.868 / 0.729 with errors 0 / 0.18 / 0.43 mHa. The C8 all-electron error at 1e-4 is 2.8 mHa (~1.8 kcal/mol), so 1e-4 is not chemical accuracy; 1e-5 is the more useful threshold. The screen is informative with localized occupieds, unlike the canonical row above. C4-C8 are below the locality onset (~30 Bohr), so these retentions describe these chains only. Opt-in add-back (add_back_truncation: the screened pairs' diagonal-f estimate is added to the result; cost one (ia|jb) block per discarded pair, at most one extra screen pass) cuts the all-electron error at every threshold measured: 1e-4 gives 0.58 / 1.68 / 2.80 mHa without and 0.12 / 0.40 / 0.68 mHa with (C4 / C6 / C8), 1e-5 gives 0.19 / 0.50 / 0.88 mHa without and 0.007 / 0.058 / 0.131 mHa with; gains 4.1x to 26x. There was no overshoot in the nine measured runs (C4–C8, cc-pVDZ, all electron, 1e-3 to 1e-5); the estimate is not a bound, so this is not a general guarantee. At 1e-3 the corrected error is still 5.4 / 9.4 / 13.3 mHa, so 1e-3 stays unusable. Frozen core was not measured with add-back. It is bit-identical when no pair is screened. The Jacobi conv_thresh default 1e-10 was checked: 1e-9 saves 3 of 23 iterations and moves the energy by at most 5.9e-8 mHa, so the default is unchanged. Mutation ledger in dlpno_localized_occupied.rs. No speedup, no PNO-level result, no ORCA ranking | 1e-10 Ha (anchor, ~17x the largest measured floor); screened runs one-sided, monotone in t_cut_pairs, and above the anchor bar whenever pairs are dropped; retention at 1e-4 below 1 for C6 and C8 and falling with chain length; add-back gain at least 2x with no overshoot | validation_dlpno_localized.rs, dlpno_localized_occupied.rs |
| LinLCCD(hh) correlation energy | H2O, NH3 (RHF); OH (UHF, stability-checked) / 6-31G, cc-pVDZ (cc-pvdz-ri) | numpy exact linear solve of the hole–hole ladder equations on PySCF density-fitted integrals; ladder off checked against PySCF DFMP2/DFUMP2 | LinLCCD(hh) ≤ 4.4e-13 Ha closed shell, 1.2e-12 Ha OH UHF; ladder off equals RI-MP2 to 1.1e-16 | 1e-11 Ha | validation_linlccd.rs, gen_linlccd.py |
Amplitude-threshold LinLCCD at ε = 0, all three variants (drivers-only, hh, full), global and integral-direct paths, plus exact canonical LinLCCD of each variant | H2O, NH3 (RHF) / 6-31G, cc-pVDZ (cc-pvdz-ri) | numpy exact linear solves on PySCF density-fitted integrals: hh in the occupied-pair eigenbasis, full (hh + pp ladders) as a Sylvester equation in the joint eigenbasis, each in spin orbitals and spin-adapted (agree ≤ 1.1e-16); no ladder checked against PySCF DFMP2 | local ≤ 4.4e-13 Ha (drivers-only), 2.8e-13 (hh), 2.0e-13 (full); integral-direct ≤ 3.0e-13; exact canonical ≤ 4.4e-13; at finite ε (NH3/cc-pVDZ, hh) the error is +1.6e-13 at ε = 1e-6, +2.7e-9 at 1e-5, +1.07e-5 Ha at 1e-4 | 5e-12, 3e-12, 2e-12 Ha; 3e-12; 5e-12 | validation_linlccd_amplitude.rs, gen_linlccd.py |
| ωB97X-L-V components: E_KS (libxc ωB97X-V form with the paper's 18 parameters, VV10 b = 10, C = 0.01), λ·E_c = LinLCCD(hh) under λ·erfc(ωr)/r (λ = 0.6, ω = 0.1), total; Be₂ bond energy E(10 000 Å) − E(r_e) | H2O (RKS, exact J and RI-J), OH (ROKS → semicanonical → unrestricted) / def2-SVP (def2-svp-rifit, def2-universal-jkfit); Be₂ / def2-QZVPPD | PySCF KS with register_custom_functional_ ext params on ferric's (75,110) grid; numpy LinLCCD(hh) on PySCF density-fitted λ·erfc integrals; ladder off equals λ² × PySCF SR-MP2; Be₂: paper Table 4 (2.3 kcal/mol) | E_KS ≤ 1.05e-9 Ha; λ·E_c on the same orbitals 7.2e-14 Ha; total on ferric's orbitals 1.1e-7 Ha; Be₂ 2.299 kcal/mol | 1e-8; 1e-11; 5e-7 Ha; 0.3 kcal/mol | validation_wb97xlv.rs, wb97x_l_v_be2_bde.rs, gen_wb97xlv.py |
| OO-RI-MP2 energy and analytic nuclear gradient (all electrons, exact-J/K Fock, RI correlation) | distorted H2O, distorted NH3 (RHF, energy and gradient); CH3 doublet (UHF, energy) / cc-pVDZ (cc-pvdz-ri) | Energy: an independent numpy OO-RI-MP2 on PySCF integrals (exact J/K, the same aux, minimized to max orbital gradient ≤ 1e-10, anchored to PySCF SCF + DF-MP2 at zero rotation); cross-check: ORCA OO-RI-MP2 NoRI NoFrozenCore with the same /C aux, which stops 3.7e-8 to 7.0e-8 Ha above the minimum (reference/doubles split off by up to 1.5e-5 Ha). Gradient: 5-point finite difference of ferric's own OO energy; loose cross-checks against the finite difference of ORCA's OO energy and ORCA's analytic EnGrad (which misses that finite difference by up to 8e-6 Ha/Bohr) | total 7.5e-13 Ha, reference/doubles split 6.4e-10 Ha vs numpy; gradient 8.0e-9 Ha/Bohr vs own FD, 2.0e-7 vs the FD of ORCA's energy | 1e-11 Ha (total), 5e-9 Ha (split), 2e-7 Ha (vs ORCA); 1e-7 Ha/Bohr (own FD), 1e-6 Ha/Bohr (ORCA FD) | validation_oo_rimp2.rs, gen_oo_rimp2.py, ORCA inputs |
Unrestricted RI-MP2 (rimp2 with multiplicity > 1): E_corr and the αα, ββ, αβ blocks | OH, CH3, NH2, O2 (triplet), HO2 / cc-pVDZ (cc-pvdz-ri); HO2 also with frozen core 2 | PySCF DFUMP2 with the same aux on a stability-checked exact-integral UHF; αα and ββ split by an independent numpy build anchored to DFUMP2's same-spin and opposite-spin energies to 1e-11 Ha | E_UHF ≤2.8e-12 Ha; every MP2 energy ≤9.2e-10 Ha (HO2), ≤5.8e-11 Ha elsewhere | 3e-11 Ha; 1e-8 Ha | validation_u_rimp2.rs, gen_u_rimp2.py |
| OO-RI-MP2 with a def2 ECP: energy and analytic nuclear gradient (core Hamiltonian includes V_ECP; gradient includes the ECP derivative term) | HI at 1.75 Å (RHF) / def2-SVP (def2-svp-rifit), gradient on the I atom | Energy: the independent numpy OO-RI-MP2 extended with PySCF's ECP core Hamiltonian (ECP read from ferric's basis JSON), anchored to PySCF RHF + DF-MP2 at zero rotation; gradient: 5-point finite difference of ferric's own OO energy | OO total 1.5e-8 Ha (the ECP integral offset the RHF energy also carries); doubles 5.5e-11 Ha; gradient 2.3e-9 Ha/Bohr vs its own finite difference | 2.5e-7 Ha; 5e-8 Ha/Bohr | validation_oo_rimp2_ecp.rs, gen_oo_rimp2_ecp.py, zero-rotation anchors in oo_rimp2_ecp.rs |
| Open-shell PDEP-RPA correlation energy (UHF reference, full rank, spin-summed dielectric) | OH, CH3, NH2 (doublets), O2 (triplet) / cc-pVDZ (cc-pvdz-ri); OH / aug-cc-pVDZ (aug-cc-pvdz-rifit); H2O / cc-pVDZ through both the restricted and the unrestricted path | PySCF gw.urpa.URPA (and gw.rpa.RPA for H2O) on the same stability-checked exact-integral UHF, same aux basis and the same 40-point Gauss–Legendre frequency grid; cross-checked by numpy on PySCF's density-fitted integrals; truncation checked against a numpy emulation | ≤ 9.2e-11 Ha (OH/aug-cc-pVDZ); truncated 6.4e-11; U path vs R path at the closed-shell limit 3.2e-12 | 1e-9 Ha (U vs R 3e-11) | validation_urpa.rs, gen_urpa.py |
dRPA@HF by the drCCD Riccati solve (drpa, exact) and its local approximation ([local] amplitude threshold); closed shell, frozen core 0, 1 and (n-butane) 4 | H2 / STO-3G (STO-3G aux); H2O, n-butane / 6-31G, cc-pVDZ (cc-pvdz-ri); n-octane / 6-31G (cc-pvdz-ri), carbon cores frozen, ε = 0 to 1e-3 | numpy plasmon dRPA on PySCF density-fitted integrals with the same aux basis and an exact-J/K RHF, Fock semicanonicalized, Ω² from a symmetric eigensolve; the formula and its frozen cores match PySCF gw.rpa.RPA on the same integrals (≤ 3.6e-11 Ha at 160 frequency points) and the H2 value matches the proof notebook's −0.0126072623 (3.7e-11) | ε = 0: ≤ 3.0e-11 Ha on the CLI's exact route, the integral-direct route and the in-crate canonical plasmon reference. n-octane, ε = 1e-6 / 1e-5 / 1e-4 / 1e-3: error +6.7e-7 / +3.9e-5 / +5.5e-4 / +1.0e-2 Ha (less correlation) at 82 / 50 / 18 / 2.8% of amplitudes kept; there is no external finite-ε reference | 3e-10 Ha (ε = 0) | validation_drpa_amplitude.rs, gen_drpa_amplitude.py; references in testdata/reference/validation/drpa_amplitude/ |
| Attenuated PDEP-RPA correlation energy (erf and erfc on the 3-center integrals and the metric; closed shell, full rank) | H2O, NH3 / cc-pVDZ (cc-pvdz-ri); H2O / aug-cc-pVDZ (aug-cc-pvdz-rifit); ω 0.2, 0.222, 0.42, 1.0 Bohr⁻¹ | numpy dRPA on PySCF int3c2e/int2c2e under with_range_coulomb(±ω), the same metric factorization as ferric (eigh with a 1e-10 cutoff for erf, Cholesky for erfc), the same RHF and the same 40-point Gauss–Legendre grid; the Coulomb kernel matches PySCF gw.rpa.RPA to 1.6e-14 Ha; erfc(ω → 0) and erf(ω → ∞) reproduce Coulomb RPA | ≤ 5.8e-11 Ha (erf), 3.5e-11 (erfc), 4.5e-11 (Coulomb); the ω → 0 erfc and ω → ∞ erf limits equal Coulomb RPA to 4.9e-11 | 1e-9 Ha (erf), 5e-10 (erfc, Coulomb, limits) | validation_attenuated_rpa.rs, gen_attenuated_rpa.py |
RS-MP2-RPA correlation energy, formulations B (DeltaLr: E_MP2[Coulomb] + E_dRPA[erf] − 2·E_OS[erf]) and T (CoupledRings: E_MP2[Coulomb] + ΔdRPA[Coulomb] − ΔdRPA[erfc]); every reported component | H2O, NH3 / cc-pVDZ (cc-pvdz-ri); H2O / aug-cc-pVDZ (aug-cc-pvdz-rifit); ω 0.222 (= 0.420 Å⁻¹, the default) and 0.42 Bohr⁻¹ | numpy assembly on PySCF int3c2e/int2c2e under with_range_coulomb(±ω): RI-MP2 spin components and dRPA from the same fitted integrals ferric uses per operator (eigh with a 1e-10 cutoff for erf, Cholesky otherwise), 40-point Gauss–Legendre grid; Coulomb pieces match PySCF DFMP2 to 3.3e-16 Ha and gw.rpa.RPA to 1.7e-14 Ha; the frequency-integrated second-order ring term equals 2·E_OS to 3.2e-15 relative; exact limits B, T(ω → 0) = MP2 and B, T(ω → ∞) = MP2 + ΔdRPA[Coulomb] | every component ≤ 4.7e-11 Ha (MP2 pieces 4.2e-11, dRPA pieces 2.9e-11, B/T e_corr 4.3e-11); ω → 0 and ω → ∞ limits to 4.3e-11 | 5e-10 Ha | validation_rs_mp2_rpa.rs, gen_rs_mp2_rpa.py |
Closed-shell RPA nuclear gradient (total_rpa_gradient: central finite difference of E_RHF + E_c^RPA, exact-J/K RHF reference, full rank; all electrons and one frozen core orbital) | distorted H2O, distorted NH3 / cc-pVDZ (cc-pvdz-ri) | finite differences of PySCF exact-integral RHF + gw.rpa.RPA with the same aux basis and the same 40-point Gauss–Legendre frequency grid (5-point stencil step-converged to 7.4e-10 Ha/Bohr, and the 3-point stencil at ferric's step); 5-point finite difference of ferric's own energy; controls: RHF gradient, E_c-only gradient, all-electron vs frozen core, 6- vs 40-point grid | E_c ≤ 1.5e-13 Ha; gradient ≤ 1.9e-9 Ha/Bohr vs PySCF at the same 3-point step, ≤ 5.7e-8 vs a converged 5-point FD (the 3-point truncation); sum over atoms ≤ 4.8e-9 | 1e-12 Ha (E_c); 2e-8 (same step), 2e-7 (5-point) Ha/Bohr | validation_rpa_gradient.rs, gen_rpa_gradient.py |
| RI-MP2 size-extensivity | H2 dimer at large separation | 2 × monomer | 2e-12 Ha | 1e-7 Ha | rimp2_size_extensivity.rs |
| RHF/UHF/ROHF/KS gradients, including density-fitted J/K | water, OH, HO2 / cc-pVDZ, 6-31G | finite differences of the energy; PySCF df.grad | 1e-7 to 3e-7 Ha/Bohr (FD); ~1e-10 (PySCF) | 1e-6 Ha/Bohr | df_jk_gradient.rs |
KS gradient on a custom or angularly pruned XC grid (RKS LDA/PBE, UKS PBE, ROKS PBE; flat 40x194, NWChem 30x194, SGX-pruned 20x194), through restricted_scf_gradient / unrestricted_scf_gradient / restricted_open_scf_gradient | water, NH2 / 6-31G | central FD of the energy on the same grid; an LDA water optimization on 40x194 then checked for a stationary point of that grid's energy | 0.9e-7 to 1.4e-7 Ha/Bohr (default-grid FD floor 0.9e-7 to 1.4e-7); the default-grid gradient paired with the same SCF misses by 2.8e-4 to 6.0e-4; the optimum has max FD gradient 1.4e-7. The VV10 nonlocal gradient (no Becke weight response by design) is not FD-validated, only shown to depend on nlc_grid | 3e-7 Ha/Bohr | ks_gradient_scf_grid.rs |
| Analytic RHF Hessian (skeleton one- and two-electron, overlap/W and CPHF response terms) and its harmonic frequencies | H2O, NH3, CH2O / cc-pVDZ; distorted H2O / def2-SVP | PySCF hessian.rhf (analytic, and its skeleton partial_hess_elec + hess_nuc); PySCF finite differences of its analytic gradient; ferric's own gradient differenced | total Hessian ≤ 1.6e-7 Ha/Bohr² vs PySCF analytic (≤ 8.2e-8 at cc-pVDZ); skeleton ≤ 5.9e-10; frequencies ≤ 6.9e-4 cm⁻¹; each skeleton term vs a finite difference of its gradient piece ≤ 3.4e-8 | 1e-6 Ha/Bohr² (total), 1e-8 (skeleton), 1e-2 cm⁻¹ | validation_rhf_hessian.rs, rhf_hessian_fd.rs, gen_rhf_hessian.py |
Analytic RHF Hessian for RI-J with exact K (the fitted Coulomb energy ½ dᵀV⁻¹d with the Cholesky-solved metric: skeleton with the 3c and 2c second derivatives (a stencil of the first-derivative blocks) and the metric cross terms, J^x with the auxiliary-fit part in the first-order Fock matrix, the SCF's own DfJ in the CPHF kernel) and its harmonic frequencies | H2O, CH2O, distorted NH3 / cc-pVDZ with cc-pVDZ-RIFIT; distorted H2O / def2-SVP with def2-universal-jkfit | PySCF has no analytic RI-J + exact-K Hessian, so: an analytic Hessian composed from PySCF's own pieces (df.hessian.rhf J skeleton and vj1 with the full auxiliary response, hessian.rhf exact K, gen_response of the only_dfj mean field) and finite differences of PySCF's analytic only_dfj gradient; ferric's own DF gradient differenced with the SCF re-converged; an exactness anchor (an auxiliary basis that spans the density's products); the exact-J Hessian as negative control | total vs the composed PySCF Hessian ≤ 1.6e-7 Ha/Bohr² (3.3e-8 H2O, 8.3e-8 CH2O, 1.7e-8 NH3, 1.6e-7 H2O/def2-SVP); skeleton ≤ 1.9e-10; frequencies ≤ 6.9e-4 cm⁻¹; vs PySCF's FD Hessian ≤ 1.6e-6 (that FD's own floor); vs ferric's differenced DF gradient (displaced SCFs converged to 1e-14 in energy) 9.2e-11 (STO-3G), 3.3e-10 (cc-pVDZ), 1.2e-10 (NH3), 4.2e-10 (def2-SVP); with an auxiliary basis that spans the density's products the fitted skeleton and J^x equal the exact four-centre ones to 2.2e-13 and 5.8e-13 (1.8e-5 and 4.4e-5 with the ordinary RIFIT functions); the exact-J Hessian misses by 1.0e-4 (def2-SVP) to 5.3e-4 (51× to 265× the bar) and its frequencies by 0.32 to 1.04 cm⁻¹; omitting the auxiliary-fit part of J^x, the metric second-derivative term or the cross terms misses by 0.12 to 7.5e3; a stencil step ten times too large (4.0e-7) is seen only by the 1e-8 comparison with ferric's own gradient, and an explicit metric inverse is blind on well-conditioned metrics (8e-12 for water) and seen only on an ill-conditioned one (9.0e-7 on the RI-J pieces for benzene/def2-universal-jkfit); neither reaches the PySCF bar | 2e-6 Ha/Bohr² (total), 2e-9 (skeleton), 1e-5 (vs PySCF FD), 1e-8 (vs ferric's DF gradient), 1e-2 cm⁻¹; control ≥ 10× the bar. RI-J with an external potential, and a metric with eigenvalues below 1e-10 are refused, not validated | validation_df_hessian.rs, df_hessian_rij.rs, df_hessian_stencil.rs, gen_df_hessian.py |
Analytic RHF Hessian for RI-K (the fitted exchange energy −¼ Σ_ij L_ij · V⁻¹ L_ij per occupied pair with the SCF's V^{-1/2}V^{-1/2} metric: skeleton with the 3c and 2c second derivatives (a stencil of the first-derivative blocks) and the cross terms, K^x with its metric and auxiliary-centre response in the first-order Fock matrix, the SCF's own DfK in the CPHF kernel), alone and with RI-J, and its harmonic frequencies | H2O, CH2O, distorted NH3 / cc-pVDZ and distorted H2O / def2-SVP, all with def2-universal-jkfit; RI-K alone also with STO-3G, 6-31G and cc-pVDZ-RIFIT | PySCF's analytic density-fitted Hessian (df.hessian.rhf, full auxiliary response; J and K fitted with the same auxiliary basis, a direct reference) and finite differences of PySCF's analytic DF gradient; ferric's own DF-K gradient differenced with the SCF re-converged; for one occupied column the RI-K skeleton equals 2α times the RI-J skeleton (an independent code path); the exact-integral Hessian as negative control | total (RI-J + RI-K) vs PySCF ≤ 1.6e-7 Ha/Bohr² (3.3e-8 H2O, 8.2e-8 CH2O, 1.8e-8 NH3, 1.6e-7 H2O/def2-SVP); frequencies ≤ 6.9e-4 cm⁻¹; vs PySCF's FD Hessian ≤ 1.6e-6 (that FD's own floor); vs ferric's differenced DF-K gradient (RI-K alone, displaced SCFs converged to 1e-14 in energy) 1.1e-10 (STO-3G), 1.3e-10 (6-31G), 3.4e-10 (cc-pVDZ), 5.7e-10 (NH3), 4.8e-10 (def2-SVP) and 3.8e-10 for RI-J + RI-K at cc-pVDZ; K^x vs the SCF's DfK differenced ≤ 5e-7; the one-column identity holds to 5e-11; the error is flat (1.3e-10 to 4.4e-10) for cond(V) 2.5e5 to 2.5e7 and 6.7e-9 at 2e8, where the Hessian warns; the exact-integral Hessian misses by 2.7e-5 (def2-SVP) to 1.6e-4 (CH2O) (17× to 99× the bar) and its frequencies by 0.28 to 0.54 cm⁻¹, RI-J with exact K by 8.7e-5 to 1.6e-4, RI-K with exact J by 1.0e-4 to 3.2e-4; dropping K^x, its metric response, its auxiliary-centre part, the 2c second derivative or the cross terms misses by 2.0e-2 to 5.9e4; a stencil step ten times too large (6.8e-8) is seen only by the comparison with ferric's own gradient, and an explicit metric inverse is blind on well-conditioned metrics (4e-13 for water) and 7.1e-9 on benzene/def2-universal-jkfit; there is no exactly-spanning auxiliary basis for exchange (the pair densities of different atoms are two-centre products), so no exact-integral anchor exists | 1.6e-6 Ha/Bohr² (total vs PySCF), 1e-5 (vs PySCF FD), 1e-8 (vs ferric's DF-K gradient), 1e-2 cm⁻¹; control ≥ 10× the bar. Range-separated RI-K, RI with an external potential, and a metric with a mode below 1e-10 (the modes DfK drops) are refused, not validated; auto also falls back to finite differences for a mode in [1e-10, 1e-7), cond(V) above 1e8 and memory that does not fit. The PySCF comparison runs only in the weekly validation_ CI job; the per-PR tests are the finite-difference, anchor, mutation, refusal and memory tests of df_hessian_rik.rs and df_hessian_rik_memory.rs. At cond(V) = 2e8 (aug-cc-pVQZ-RIFIT) the Hessian agrees with PySCF's analytic Hessian to 2.7e-8 (2.2e-8 at cond 2.5e5) but with the differenced ferric DF-K gradient only to 6.7e-9 (the RI-J analogue 1.7e-10), which is not established as an error of the Hessian | validation_df_hessian_rik.rs, df_hessian_rik.rs, gen_df_hessian.py |
Analytic UHF Hessian for RI-J and/or RI-K (the Coulomb energy ½ dᵀV⁻¹d of the total density with the Cholesky-solved metric, and the exchange energy as one channel per spin, −½ Σ_ij L^σ_ij · V⁻¹ L^σ_ij with X_σ = C_σ,occ over the SCF's V^{-1/2}V^{-1/2} metric shared by both channels: skeleton from the summed 3c and 2c stencil weights and the per-channel cross terms, J^x of the total density and K^x per spin in the first-order Fock matrices, the SCF's DfJ on the total response density and DfK on each spin's response density in the coupled α/β CPHF), and its harmonic frequencies | NH2 (²B1), CH3 (²A₂″) and CH2 (³B1) / cc-pVDZ, NH2 / def2-SVP, all with def2-universal-jkfit; STO-3G and 6-31G (cc-pVDZ-RIFIT) for the per-term tests | PySCF's analytic density-fitted UHF Hessian (df.hessian.uhf, full auxiliary response; J and K fitted with the same auxiliary basis, a direct reference) on the lowest internally stable UHF, and finite differences of PySCF's analytic DF UHF gradient; ferric's own UHF DF gradient differenced with the SCF re-converged; a closed-shell UHF equals the RHF RI-J / RI-K / RI-JK Hessian term by term; the multi-channel RI-K terms equal the sum of the one-channel (RHF-validated) terms; exact-integral, RI-J-only and RI-K-only Hessians as negative controls | total (RI-J + RI-K) vs PySCF ≤ 1.7e-7 Ha/Bohr² (7.6e-8 NH2, 6.1e-8 CH2, 1.7e-7 CH3, 1.2e-7 NH2/def2-SVP); frequencies ≤ 3.1e-3 cm⁻¹; vs PySCF's FD Hessian ≤ 1.1e-6 (that FD's own floor, 5.6e-7 to 1.2e-6); vs ferric's differenced UHF DF gradient (SCF converged to 1e-14 in energy) 7.1e-10 (CH2), 2.8e-9 (NH2), 9.4e-10 (CH3) at cc-pVDZ, 6.6e-11 to 7.3e-10 for RI-J, RI-K and RI-JK at STO-3G and 6-31G; closed-shell limit 5.6e-17 (RI-J), 2.9e-13 (RI-K), 1.2e-13 (RI-JK); K^x of each spin vs the SCF's DfK differenced ≤ 1.2e-8; the per-spin skeleton pieces and the J + K skeleton vs fixed-density differences of the DF gradient ≤ 4.1e-7; the exact-integral Hessian misses by 5.9e-5 (NH2/def2-SVP) to 1.2e-4 (35× to 72× the bar) and its frequencies by 0.27 to 1.4 cm⁻¹, RI-J with exact K by 9.6e-5 to 1.6e-4, RI-K with exact J by 1.6e-4 to 2.9e-4; swapped spin channels (0.57 to 1.2), the closed-shell channel for each spin (0.57 to 0.87), a dropped β channel (2.0 to 2.9), the exchange of the wrong spin in the CPHF (7.8e-2 to 0.14), a dropped K^x (4.1 to 6.0), the dropped metric second derivative (0.19 to 0.29), dropped cross terms (8.7e2 to 2.6e3) all miss by more than 10⁴ bars; a stencil step ten times too large (4.8e-8 for K, 2.4e-7 for J) is seen only by the comparison with ferric's own gradient; with df_j_aux / df_k_aux unset or empty no density-fitting code runs and the Hessian is bit-identical to the exact-integral one | 1.7e-6 Ha/Bohr² (total vs PySCF), 1e-5 (vs PySCF FD), 1e-8 (vs ferric's DF gradient), 1e-10 (closed-shell limit), 1e-2 cm⁻¹; control ≥ 10× the bar. RI with an external potential, range-separated RI-K and a metric with a mode below 1e-10 are refused, not validated; auto also falls back to finite differences for a mode in [1e-10, 1e-7), cond(V) above 1e8 and memory that does not fit (the two spin channels and the CPHF phase are sized together and, with the raw three-index tensor, bound the measured peak allocation of the whole Hessian (0.86 to 0.99 of estimate plus raw on two shapes)). The PySCF comparison runs only in the weekly validation_ CI job; the per-PR tests are the finite-difference, anchor, mutation, refusal, dispatch and memory tests of df_hessian_uhf.rs, df_hessian_uhf_memory.rs and frequency_hessian_dispatch.rs | validation_df_hessian_uhf.rs, df_hessian_uhf.rs, df_hessian_uhf_memory.rs, gen_df_hessian.py |
Analytic ROHF Hessian for RI-J and/or RI-K (the ROHF energy is the UHF functional of the constrained (D_α, D_β): RI-J of the total density and one RI-K channel per spin with X_α = C[:, ..n_α], X_β = C[:, ..n_β] of the single orbital set; the skeleton, J^x and per-spin K^x are the UHF ones, and the commutator-form response uses the SCF's DfJ on the total response density and DfK on each spin's response density, with the spin Focks and W rebuilt through the same fitted builders) and its harmonic frequencies | NH2 (²B1), HO2 (²A″) and CH2 (³B1) / STO-3G, 6-31G and cc-pVDZ; singlet water / 6-31G for the closed-shell limit; def2-universal-jkfit and cc-pVDZ-RIFIT | ferric's own ROHF DF gradient differenced with the SCF re-converged (Richardson, h = 2e-3 and 1e-3, SCF to 1e-14 in energy); the RHF RI-J / RI-K / RI-JK Hessian for a closed-shell ROHF (an exactness anchor, term by term); exact-integral, RI-J-only and RI-K-only Hessians as negative controls. PySCF has no density-fitted ROHF Hessian (df.hessian covers RHF, UHF, RKS and UKS), so there is no PySCF leg: the shared per-spin RI code is validated against PySCF for UHF above | vs ferric's differenced ROHF DF gradient 5.5e-11 (NH2 RI-JK), 1.6e-11 (CH2 RI-J), 7.4e-10 (CH2 RI-K), 8.5e-10 (HO2 RI-JK) at STO-3G; 2.3e-11 (NH2) and 1.4e-11 (CH2) at 6-31G; 1.1e-10 (NH2) and 2.6e-10 (CH2) at cc-pVDZ / def2-universal-jkfit; closed-shell limit 1.0e-11 (RI-J), 1.1e-11 (RI-K), 9.8e-12 (RI-JK), the same level as the exact-integral ROHF anchor (CG tolerance); the exact-integral ROHF Hessian misses the RI-JK reference by 1.6e-4, RI-J with exact K by 1.8e-4 and RI-K with exact J by 3.4e-4 (1.6e4 to 3.4e4 bars); mutants (NH2 / 6-31G, RI-JK): J from the α density only 20, swapped spin channels 0.65, the closed-shell channel for each spin 0.61, a dropped β channel 0.53, the β occupied factor taken from α (open orbitals in the β channel) 0.32, the exchange of the other spin in the CPHF 0.16, a dropped K^x 2.4, the dropped metric second derivative 0.22 (K) and 1.3 (J), dropped cross terms 2.9e2 (K) and 1.6e3 (J), the omitted auxiliary-fit part of J^x 8.3e-2, the six ROHF response defects of the exact path 1.9e-2 to 0.64 all miss by more than 6e6 bars, the exact four-centre K inside the CPHF kernel by 1.8e-5 (5.9e3 bars, the closest), and two kernel defects (Coulomb from the α response density only, exchange of the total response density per spin) make the orbital Hessian indefinite and are caught by the solver's typed error; with df_j_aux / df_k_aux unset or empty the ROHF- and UHF-exact Hessians and the UHF RI-JK Hessian are bit-identical to the commit before this change (FNV hash of all bits, NH2 / 6-31G and CH2 / STO-3G; a one-time measurement, the committed test compares unset against empty names) | 1e-8 Ha/Bohr² (vs ferric's DF gradient), 1e-10 (closed-shell limit), 3e-9 (mutation bar: 130× the production agreement on the mutation system, 2.3e-11; the closest mutant misses by 5.9e3 bars); control ≥ 10× the bar. External potentials, range-separated RI-K and a metric with a mode below 1e-10 are refused, not validated; auto also falls back to finite differences for a mode in [1e-10, 1e-7), cond(V) above 1e8 and memory that does not fit. Not covered: bases above cc-pVDZ, molecules above 3 atoms, states other than the doublets and triplet above (a quartet or higher, a non-aufbau or internally unstable ROHF solution gets the Hessian of that solution), a run on a first-derivative libint, and an end-to-end CLI/Python run | df_hessian_rohf.rs, frequency_hessian_dispatch.rs |
Analytic closed-shell KS Hessian (LDA, GGA, and global hybrids of both) with exact or RI-J Coulomb and exact or RI-K exchange on a grid fixed in space (rks_fixed_grid_hessian, library entry point only: not reachable from auto or analytic, so no frequency run changes). The energy differentiated has its Becke grid frozen at the reference geometry (PySCF grid_response=False), so the Hessian is the XC AO-derivative skeleton (a GGA needs the third AO derivatives, ferric_integrals::ao_grid_third), the first-order XC Fock matrix and the f_xc kernel (with the σ = |∇ρ|² couplings for a GGA) in the CPHF on top of the RHF exact-J/K Hessian with the exchange scaled by the hybrid fraction a; it omits the Becke weight response that the production KS gradient carries | distorted H2O / STO-3G, 6-31G, cc-pVDZ (SCF-level anchors on a 50x110 grid; PySCF legs on a 30x50 grid) | central FD of the validated fixed-grid gradient with a fresh fixed-grid SCF at every displaced geometry (Richardson, h = 5e-4 and 2.5e-4), that gradient vs central FD of the fixed-grid energy, each XC piece vs a frozen-density difference (no SCF), and PySCF dft.RKS (LDA_X,LDA_C_VWN, HYB_LDA_XC_LDA0, PBE0, PBE, B3LYP) Hessian with grid_response=False fed ferric's own grid points and weights through mf.grids.coords / weights (gen_ks_fixed_grid_hessian.py) | gradient vs FD of the energy 3.7e-10; XC skeleton vs frozen-density gradient difference 1.9e-8 (6-31G; falls 16x per halving of h, so it is the stencil's h^4 truncation) and the first-order Fock matrix vs FD of V_xc 5.6e-12; kernel response vs FD of V_xc(D) 1.9e-12; Hessian vs FD of the fixed-grid gradient 5.7e-11 (STO-3G), 1.9e-8 (6-31G), 8.1e-9 (cc-pVDZ); Hessian from the production SCF vs the injected fixed-grid SCF 4.8e-12; vs PySCF on the same grid: energy 5.9e-12 (6-31G) and 1.2e-11 (cc-pVDZ), Hessian 4.1e-8 and 9.3e-7, frequencies 7.9e-5 and 2.8e-3 cm⁻¹ (PySCF's own analytic Hessian vs central FD of its own gradient at h = 5e-4 differs by 7.4e-7 and 4.2e-6: that is the h^4 truncation of the stencil, not reference noise (ferric's FD at that step equals PySCF's FD to 7.8e-9, and halving h takes ferric's own FD from 3.3e-6 to 2.1e-7); taking PySCF's FD to h = 2.5e-4 and 1.25e-4 the cc-pVDZ gap falls to 1.2e-6 and 9.2e-7 and stops, so about 9.2e-7 of PySCF's analytic cc-pVDZ Hessian is not the derivative of PySCF's own gradient, and that is the whole of the 9.3e-7 by which ferric's analytic Hessian differs from PySCF's analytic one (ferric's analytic Hessian matches FD of its own gradient to 8.1e-9; the cause on the PySCF side is not isolated); negative control: differencing the production gradient (grid on the atoms, with weight response) misses the fixed-grid Hessian by 1.1e-3 Ha/Bohr² (1.1e4 bars) and moves a frequency by 3.0 cm⁻¹ (water / 6-31G, default grid); production-wired mutants (XC skeleton dropped 4.8e-1, f''ρρ term dropped 1.5e2, f'ρ₍₂₎ term dropped or doubled 1.5e2, f'' term of F^x dropped 8.7e-1, f' term of F^x dropped 9.1e-1, CPHF kernel dropped 2.6e-2, doubled 3.0e-2, halved 1.4e-2) miss by 1.4e5 to 1.5e9 bars; the RHF exact-J/RI Hessian bits are unchanged (FNV hash of all bits, water STO-3G and 6-31G exact, STO-3G RI-J+RI-K and RI-J, before and after the change; a one-time measurement) | 1e-7 Ha/Bohr² (vs FD of the gradient, ~5x the measured max), 2e-9 Ha/Bohr (gradient), 1e-9 Ha (energy vs PySCF), 5e-7 and 1e-5 Ha/Bohr² (vs PySCF's analytic Hessian: 12x the measured 4.1e-8 at 6-31G and 11x the measured 9.3e-7 at cc-pVDZ, where the 9.3e-7 is PySCF's own analytic-vs-gradient inconsistency described above, so the cc-pVDZ bar tests ferric against PySCF to PySCF's own consistency, not tighter), 1e-3 and 3e-2 cm⁻¹. GGA and hybrid GGA (PBE, PBE0, B3LYP; STO-3G and 6-31G, PBE also cc-pVDZ): gradient vs FD of the energy 3.3e-10; XC skeleton vs frozen-density gradient difference 2.9e-11 (STO-3G) and 4.2e-8 / 9.1e-8 (6-31G, PBE0 / PBE: the stencil's h^4 truncation, error ratios 38, 22, 15.5 per halving of h); first-order Fock vs FD of V_xc 3.2e-10; kernel response vs FD of V_xc(D) 2.2e-12; Hessian vs FD of the fixed-grid gradient 5.4e-11 (PBE0), 7.7e-11 (PBE), 5.1e-11 (B3LYP) at STO-3G and 4.2e-8 (PBE0, 6-31G); the energy on the injected fixed-grid SCF vs the production SCF 1.7e-11; an LDA pushed through the gradient-dependent assembly equals the LDA Hessian to 2.8e-14; vs PySCF on the same grid: energy 3.4e-12 (PBE0), 7.1e-10 (B3LYP, bar 5e-9), 1.2e-11 (PBE/cc-pVDZ), Hessian 1.0e-7, 1.0e-7 and 9.9e-7 (the cc-pVDZ number matches the pure-LDA cc-pVDZ gap, 9.3e-7; its cause is not isolated: the ρ < 1e-10 density floor ferric applies and PySCF does not was tested and moves PySCF's Hessian by only 2e-10, so it is not the cause; PySCF's own analytic-vs-FD gap at that basis, 1.2e-5, is itself noise-limited by its stencil), frequencies 1.4e-4, 1.5e-4, 4.1e-3 cm⁻¹ (bars 5e-7, 5e-7, 1e-5 Ha/Bohr²; a full-Hessian FD anchor with d functions runs per PR for LDA and PBE at cc-pVDZ); the third AO derivatives match a difference of the analytic Hessian to 1e-8 relative for every shell up to g, pure and Cartesian; ten production-wired mutants (kernel part, F ρ_xy + G·g_xy, F^x parts, gradient terms in skeleton/F^x/CPHF, exchange) miss by 2.3e4 to 1.4e9 bars. A global-hybrid LDA (HYB_LDA_XC_LDA0, a = 0.25) scales the exact exchange of the skeleton, the first-order Fock matrix and the CPHF G by a: Hessian vs central FD of the fixed-grid gradient 6.4e-11 (STO-3G), 1.4e-8 (6-31G); gradient vs FD of the energy 2.8e-10; vs PySCF on the same grid (gen_ks_fixed_grid_hessian.py, _hyb file) energy 3.8e-12 Ha, Hessian 1.3e-7 Ha/Bohr², frequencies 2.4e-4 cm⁻¹ (bar 5e-7 and 1e-3); the three exact-exchange scalings dropped or the CPHF one doubled miss the FD anchor by 5.5e5 to 1.6e6 bars. RI-J (DfJ over def2-universal-jkfit, exact K; the RI-J skeleton, J^x and CPHF Coulomb of the RHF RI-J Hessian reused unchanged; ks_rij_fixed_grid_hessian.rs, water / STO-3G and 6-31G): fixed-grid DF-J gradient vs FD of the DF-J energy 2.6e-10 (PBE/STO-3G) and 3.1e-10 (PBE0/6-31G), bar 3e-9; LDA and PBE at 6-31G also tied; Hessian vs FD of the DF-J gradient (fresh DF-J SCF per geometry) 7.7e-11 (PBE/STO-3G), 7.1e-11 (PBE0/STO-3G), 1.9e-8 (LDA/6-31G), 9.1e-8 (PBE/6-31G; bar 2e-7); DF-J vs exact-J (PBE/6-31G): |E_DF-E_exact| 3.9e-5 Ha, max|H_DF-H_exact| 1.45e-4 (mixed-unit ratio 3.7, corroboration only), shrinking with the auxiliary basis (cc-pVDZ-RI 2.4e-3 / 2.9e-4 to def2-universal-jkfit); negative control: the exact-J Hessian misses the FD of the DF-J gradient by 1.45e-4 (RI-J: 9.1e-8); the production RI-J SCF (route recorded) gives the injected-SCF Hessian to 2.3e-12; vs PySCF density_fit(only_dfj=True) Hessian (auxbasis_response = 2, grid_response=False, same grid, pure functionals only since PySCF has no RI-J + exact-K Hessian; _rij / _pbe_rij files): energy 5.9e-12 / 5.8e-12, Hessian 4.2e-8 (LDA) and 7.6e-7 (PBE; PySCF's stored raw analytic PBE DF-J Hessian is 9.1e-7 asymmetric, which limits agreement), frequencies 8e-5 and 1e-3 cm⁻¹ (bars 5e-7 / 2e-6 Ha/Bohr²; the per-PR FD anchor at 2e-7 is the discriminating test, the PySCF comparison corroboration); seven production-wired RI-J mutants (2c metric second derivative dropped 2.2, 3c-2c cross terms dropped 7.6e3, aux-fit part of J^x dropped 0.15, erfc metric 3.5e3, exact four-centre Γ_J skeleton in place of the fitted one 2.0e-4, exact J^x 1.4e-4, exact J in the CPHF 7.1e-5) miss by 3.5e2 to 3.8e10 bars; hybrid RI-J + exact K has NO PySCF reference (PySCF has no RI-J + exact-K Hessian) and is anchored by ferric's own FD only (PBE0/STO-3G Hessian, PBE0/6-31G gradient). RI-K (DfK, the hybrid's exchange −(a/4) Tr[D K_DF(D)]: the one closed-shell channel of the RHF RI-K Hessian with weight −a/4, its skeleton, K^x and CPHF DfK reused unchanged; ks_rik_fixed_grid_hessian.rs, water / STO-3G and 6-31G, def2-universal-jkfit): fixed-grid RI-K gradient vs FD of the RI-K energy 1.6e-9 (PBE0/STO-3G, RI-J), 1.3e-9 (B3LYP/6-31G, RI-J), 1.7e-9 (PBE0/6-31G, exact J), bar 3e-9; Hessian vs FD of the RI-K gradient (fresh RI-K SCF per geometry) 7.3e-11 (PBE0/STO-3G, RI-J), 8.9e-11 (PBE0/STO-3G, exact J), 5.7e-11 (B3LYP/STO-3G), 1.4e-8 (hybrid LDA/6-31G), 4.2e-8 (PBE0/6-31G, exact J and RI-J; bar 5e-7, set by the h^4 FD truncation of the GGA XC gradient: B3LYP/6-31G measures 1.2e-7 and runs only against PySCF); exactness anchor: a pure functional handed an RI-K fit gives the RI-J Hessian to 0 (bar 1e-12; the RI-K weight with the exact-exchange fraction forgotten misses by 2.9); RI-K vs exact K (PBE0/6-31G, RI-J both): |dE| 1.22e-5 / 4.31e-6 / 3.33e-6 Ha and max |dH| 2.26e-5 / 1.41e-6 / 1.53e-6 for def2-universal-jkfit / cc-pVTZ-JKFIT / cc-pVQZ-JKFIT (the Hessian difference drops 16x and then sits at the fit's floor for this orbital basis, where the energy difference also stops falling); negative control: the exact-K Hessian misses the FD of the RI-K gradient by 2.3e-5 (RI-K: 4.2e-8); the production SCF with the default RI-J and RI-K (route recorded) gives the injected-SCF Hessian to 3.3e-12; vs PySCF density_fit(auxbasis) (J and K over one def2-universal-jkfit, auxbasis_response = 2, grid_response=False, same grid; _pbe0_rijk / _b3lyp_rijk files): energy 3.9e-12 / 7.1e-10, Hessian 1.0e-7 / 1.0e-7, frequencies 1.4e-4 / 1.6e-4 cm⁻¹ (bars 1e-6 Ha/Bohr² and 2e-3 cm⁻¹); PySCF's raw analytic Hessians are 4.1e-8 (PBE0) and 1.9e-7 (B3LYP) asymmetric, so the B3LYP agreement is at PySCF's own asymmetry while the PBE0 one is 2.4x above it (the cause is not isolated), and PySCF's own analytic Hessian vs central FD of its own DF gradient at h = 5e-4 differs by 3.8e-6 (PBE0) and 1.3e-6 (B3LYP), the h^4 truncation of that stencil as for the exact-J cases; a J fit and a K fit over DIFFERENT bases (def2-universal-jkfit for J, cc-pVTZ-JKFIT for K, PBE0/STO-3G) match the FD of their gradient to 5.9e-11 (bar 1e-9), and fitting the RI-K skeleton and K^x over the J basis misses by 3.4e-5, the CPHF DfK over the J basis by 3.1e-7, and at that bar the exact Γ_K skeleton, exact K^x and exact K in the CPHF by 3.2e-6, 3.5e-6 and 1.3e-6 (3.1e2 to 3.4e4 bars); thirteen production-wired RI-K mutants (2c metric second derivative 6.8e-2, cross terms 2.8e2, metric response of K^x 3.9e-2, auxiliary-centre part of K^x 2.8e-2, transposed pair in K^x 0.14, erfc metric 2.1, exact four-centre Γ_K skeleton 3.0e-5, exact K^x 2.0e-5, exact K in the CPHF 5.2e-6, RI-K weight without a 1.6, exchange dropped from the skeleton 0.17, from F^x 0.14, from the CPHF 5.5e-2) miss by 10.4 to 1.4e9 bars (PBE0/6-31G, RI-J + RI-K). The SCF must state its fits: the same RhfConfig the SCF ran with (df_j_aux / df_k_aux unset resolve to the default basis where the SCF fits, as in solve_rhf; a pure functional never fits K, so a named df_k_aux is inert there; a stated basis must equal the recorded route's); a Fock matrix rebuilt with the stated Coulomb and exchange matrices must reproduce the stored one (an exact-K SCF stated as RI-K, or the reverse, is refused). The Becke weight response is the opt-in moving-grid variant (next row); Auto is unchanged and reaches neither. meta-GGA, VV10, double hybrids (B2PLYP, DSD-PBEP86: the MP2 term is not differentiated), range-separated hybrids (and so range-separated RI-K), open-shell references, ECPs and external potentials are refused with a typed error naming the next unit of work; a first-derivative libint2 returns a typed error. Grid caveat (independent review): this Hessian is the derivative of the fixed-grid energy, and at the default 75x110 grid it is itself about 1e-3 Ha/Bohr² from the converged-grid answer (2.1e-6 at 150x590) and breaks translational invariance by 9.7e-4, because a grid frozen in space is not translation invariant; harmonic frequencies are expected to be only weakly affected because translations and rotations are projected out, but that was not measured for this surface. The 1.1e-3 gap to differencing the production gradient closes with grid refinement: it is quadrature error plus the weight response, not a defect. The negative control runs on the default grid because the plain ks_gradient_closed entry point differentiates the default grid by design (the *_on_grids variants and restricted_scf_gradient take the SCF's grid, issue #428). Pruned grids are refused. A Fock matrix rebuilt at the result's density must reproduce its stored Fock to 1e-8 (measured 0 to 3.6e-15), which refuses an HF, other-functional or missing-external-potential result handed in under an LDA configuration (residuals 2.0, 0.17 and 0.14 Ha). Not covered: bases above cc-pVDZ, systems above 3 atoms, a run on a first-derivative libint, and any CLI or Python surface | ks_fixed_grid_hessian.rs, validation_ks_fixed_grid_hessian.rs, ks_rij_fixed_grid_hessian.rs, ks_rik_fixed_grid_hessian.rs, gen_ks_fixed_grid_hessian.py |
Analytic closed-shell KS Hessian on the MOVING (production) grid (rks_moving_grid_hessian; the frequency Hessian of every closed-shell KS run under the default hessian = "auto" wherever rks_moving_grid_hessian_available accepts the system, finite differences otherwise, and of the explicit hessian = "analytic-moving-grid", CLI [frequencies] and Python run_frequencies; analytic reaches neither KS Hessian). The energy differentiated is the one the production KS SCF and ks_gradient_closed use: grid points ride their home atom and the Becke weights (original Becke, 3 iterations, Bragg radii) move with the nuclei. Per home atom h the XC skeleton is the fixed-grid AO skeleton plus the point-fixed Becke weight terms W''f + W'f'ᵀ + f'W'ᵀ (ferric_dft::becke_hessian, contracted point by point, never stored) on the atoms ≠ h, with h's rows and columns filled by translation invariance; the first-order XC Fock matrix gains V[W'_x f_ρ, 2W'_x f_σ∇ρ] and the same fill; the CPKS kernel and every non-XC term are the fixed-grid ones. LDA, GGA and global hybrids, exact or RI-J Coulomb, exact or RI-K exchange | distorted H2O / STO-3G, 6-31G, cc-pVDZ (50x110 and the default 75x110 grid); Ne / 6-31G (exactness anchor) | central FD (Richardson, h = 5e-4, 2.5e-4) of the production gradient (ks_gradient_closed_with_exchange_on_grids) with a production SCF at every displaced geometry; at frozen density, central FD of ferric_dft's moving-grid XC gradient (riding weight1, an independent construction) and of V_xc on a grid rebuilt at each displaced geometry; the Becke weight Hessian vs FD of becke_weights_and_grad; the Python prototype (prototypes/ks_hessian_grid_response, second-order forward AD, H2O/STO-3G LDA: vs FD of its gradient 5.6e-8 at h = 5e-4, falling as h², and the translation-fill reconstruction 4.9e-15) | exactness anchor: one atom gives a moving-grid XC skeleton and F^x of exactly 0 (fixed grid 9.4e-3 LDA, 4.6e-2 PBE; the anchor is blind to the weight terms); Becke weight Hessian vs FD 3.9e-12 (four atoms, 35 points; mutants 0.48 to 3.4); moving XC skeleton vs FD of the moving gradient 4.9e-11 and F^x vs FD of rebuilt V_xc 7.3e-12 (LDA, PBE × STO-3G, 6-31G), 2.4e-11 / 7.9e-12 (PBE cc-pVDZ), while the fixed-grid skeleton misses the same FD by 2.4e-3 to 9.6e-3; translation sum rule 6e-17 (skeleton and F^x, by construction) and 4e-12 to 3e-11 on the full Hessian; full Hessian vs FD of the production gradient 7.9e-11 (LDA) and 4.8e-11 (PBE) at STO-3G, 1.7e-10 (LDA / 6-31G, default grid: the system and reference of the fixed-grid negative control, which the fixed-grid Hessian misses by 1.1e-3 and 3.0 cm⁻¹), 1.05e-9 (PBE / 6-31G; 5.5e-10, 1.05e-9, 1.6e-10 at h = 1e-3, 5e-4, 2.5e-4, so noise, not truncation), 6.0e-11 / 8.2e-11 (PBE0 / STO-3G, 6-31G), 5.8e-11 / 6.7e-11 (RI-J PBE, RI-J + RI-K PBE0, STO-3G), 2.6e-10 (LDA / cc-pVDZ, default grid); harmonic frequencies from the moving-grid Hessian vs those of the symmetrized FD Hessian ≤ 5.0e-7 cm⁻¹ (fixed grid 2.8 to 6.7 cm⁻¹); seven mutants (drop W'' 1.1, drop the W'f' cross terms 2.1, drop the weight term of F^x 0.18, skip the translation fill 0.35, flip its sign 0.50, riding weight1 cross terms unfilled 1.2, batches not split at home atoms 9.5e-3) miss the frozen-density anchors by 9.5e6 to 3.6e9 bars (PBE / 6-31G); cost on H2O / cc-pVDZ, 75x110 grid (shared box): 2.86 s vs 2.59 s fixed-grid (LDA, ratio 1.10), 4.97 s vs 4.63 s (PBE, 1.07); a 3-atom ratio only: the Becke weight Hessian adds O(N^3) work per point and the translation fill a dense (3N)^3 product per batch, so the ratio grows with N and is unmeasured above 3 atoms. Same refusals as the fixed-grid row; a grid built from explicit points (no home atoms) is refused. Binding surface (HessianMethod::AnalyticMovingGrid, H2O / STO-3G, default 75x110 grid, RI-J): the CLI's Hessian, wavenumbers and energy (full-precision frequencies run-log record) equal harmonic_frequencies called in-process bit for bit (LDA), and Python's equal the CLI's bit for bit (PBE; validation tier, the weekly job builds ferric-cli for it); CLI moving-grid vs the CLI's own fd Richardson-extrapolated (h = 5e-4, 2.5e-4, density_conv 1e-11) 7.3e-8 (LDA) and 2.1e-7 (PBE) cm⁻¹, Hessian 2.7e-10 and 1.2e-10 Ha/Bohr² (plain FD at h/2: 1.8e-4 cm⁻¹); Python (run_frequencies(scf_density_conv=1e-11, scf_energy_conv=1e-13)) vs its own fd at the same h: 7.3e-8 and 2.1e-7 cm⁻¹, the CLI's numbers; the per-commit routing check is harmonic_frequencies(AnalyticMovingGrid) vs a direct rks_moving_grid_hessian call on the same SCF, bit for bit; auto gives the analytic-moving-grid result bit for bit for closed-shell KS (H2O / STO-3G, LDA and PBE: library, CLI and Python) and the fd result bit for bit where the moving-grid Hessian does not apply (H2 / STO-3G: meta-GGA SCAN, UKS and D3(BJ) dispersion in the CLI and Python; SCAN, UKS and a pruned grid in the library); hessian = "fd" still differences gradients for a supported KS reference; with a test-only cap on the response AO table (the one size check rks_moving_grid_hessian_available and the Hessian share), H2 / STO-3G LDA (264,000 bytes) is refused before the SCF by the explicit route and runs fd bit for bit under auto one byte below the cap, and the moving-grid Hessian at the cap; auto with the default RI-J (PBE) and RI-J + RI-K (B3LYP) fitting bases (H2O / STO-3G) passes the predicate and runs the moving-grid Hessian; a non-converged SCF under auto returns ScfConvergence; the size check dropped from the predicate fails the cap test; every refusal (Hartree-Fock, UKS, ROKS, meta-GGA, VV10, range-separated hybrid, ECP, point charges / field, pruned grid in the CLI, dispersion, and the RHF Hessian's configuration refusals: non-Coulomb operator, COSX, solvation, embedding, fractional occupations, cDFT, MOM) is named in both bindings and fires before the SCF (no SCF iteration in the run log); run_saddle refuses the value; mutants: the fixed-grid Hessian in its place misses by 4.63 (LDA) and 2.34 (PBE) cm⁻¹ in both bindings and fails the per-commit routing check, the route sent to FD fails the source check, a binding ignoring the knob fails the fd-stays-selectable check, auto routed back to FD for KS fails the auto = analytic-moving-grid check, auto sent to the moving-grid route without the support predicate fails the auto = fd fallback check, the predicate not called fails every pre-SCF refusal. Not covered: bases above cc-pVDZ, systems above 3 atoms in the full-Hessian anchor, pruned grids (refused), comparison with another code's grid-response Hessian, and the binding surface above STO-3G water | 1e-10 Ha/Bohr² (Becke weight Hessian); 1e-9 Ha/Bohr² (skeleton) and 1e-10 Ha/Bohr (F^x); 2e-9 Ha/Bohr² (per-commit full Hessian, STO-3G and LDA / 6-31G); 2e-8 Ha/Bohr² (validation tier: PBE / 6-31G noise, cc-pVDZ, hybrids, RI); 1e-12 (sum rule of the pieces); exactly 0 (one atom); every mutant ≥ 10 bars; bindings: bit-for-bit equality, 3e-6 cm⁻¹ and 3e-9 Ha/Bohr² (CLI vs FD), 3e-6 cm⁻¹ (Python vs FD) | ks_moving_grid_frequencies.rs (CLI), validation_ks_moving_grid_frequencies.rs, test_ks_moving_grid_frequencies.py, ks_moving_grid_frequencies.rs (library), ks_moving_grid_hessian.rs, validation_ks_moving_grid_hessian.rs, becke_hessian.rs |
| Analytic UHF Hessian (skeleton one- and two-electron, overlap/W and coupled α/β CPHF response terms) and its harmonic frequencies | OH (²Π), NH2 (²B1), CH2 (³B1) / cc-pVDZ; tilted OH and off-C2v CH2 / STO-3G, 6-31G | PySCF hessian.uhf on the lowest internally stable UHF (analytic, and its skeleton partial_hess_elec + hess_nuc); PySCF finite differences of its analytic gradient; ferric's own UHF gradient differenced; ferric's RHF Hessian for a closed-shell UHF | total Hessian ≤ 3.8e-7 Ha/Bohr² vs PySCF analytic (OH; ≤ 7.7e-8 for NH2 and CH2); skeleton ≤ 1.4e-10; frequencies ≤ 1.4e-4 cm⁻¹; on closed-shell water the UHF Hessian equals the RHF one term by term (response 2.8e-17) | 2e-6 Ha/Bohr² (total), 1e-8 (skeleton), 2e-3 cm⁻¹, 1e-12 (vs RHF) | validation_uhf_hessian.rs, uhf_hessian_fd.rs, gen_uhf_hessian.py |
Analytic ROHF Hessian (skeleton with the ROHF energy-weighted density W = sym(D_α F_α D_α + D_α F_β D_β), plus the closed-virtual / open-virtual / closed-open orbital response in commutator form) and its harmonic frequencies; a semicanonicalized result is mapped back to ROHF orbitals | NH2 (²B1), CH2 (³B1), HO2 (²A″) / cc-pVDZ; distorted NH2, CH2, HO2 and singlet water / STO-3G, 6-31G | central FD of PySCF's analytic ROHF gradient (PySCF has no ROHF Hessian), h and 2h; ferric's own ROHF gradient differenced with the SCF re-converged; ferric's RHF Hessian for a closed-shell ROHF; the skeleton alone and the UHF Hessian at ROHF orbitals as negative controls | total Hessian vs PySCF FD 6.6e-7 (NH2), 5.6e-7 (CH2), 1.0e-6 (HO2) Ha/Bohr² against PySCF's own h-vs-2h gap of 0.7e-6 to 2.6e-6; frequencies ≤ 0.0032 cm⁻¹; vs FD of ferric's gradient ≤ 3.2e-10; singlet water equals the RHF Hessian to 1.1e-11 (a real ROHF solve and a relabelled RHF result); against PySCF's FD the Hessian without the response misses by 0.35 (NH2), 0.47 (CH2), 0.83 (HO2) (frequencies by 1.3e3 to 2.5e3 cm⁻¹) and the UHF Hessian at ROHF orbitals by 7.8e-2 (NH2) and 6.0e-2 (CH2), while on HO2 that UHF Hessian refuses with a typed error (non-positive-definite CPHF); against ferric's own FD (NH2, CH2 / 6-31G, HO2 / STO-3G) the misses are 0.30, 0.36, 1.1 (no response) and 5.9e-2, 4.8e-2, 3.9e-2 (UHF at ROHF orbitals); eight response mutants each miss by ≥ 1e6 × the bar. External potentials and COSX are refused, not validated (ECPs: see the ECP Hessian row) | 3e-6 Ha/Bohr² (vs PySCF FD; about 3× the largest measured 1.0e-6, because PySCF's own h-vs-2h gap reaches 2.6e-6), 1e-8 (vs ferric FD), 1e-10 (singlet anchor), 0.03 cm⁻¹; control ≥ 10× the bar | validation_rohf_hessian.rs, rohf_hessian_response.rs, rohf_hessian_skeleton.rs, gen_rohf_hessian.py |
Analytic RHF/UHF Hessian with external point and Gaussian-smeared charges (QM/MM, QM–QM block, charges fixed; hessian.rs, hessian_smeared.rs): charge–nucleus repulsion Hessian, charge-attraction second derivatives with the charge-centre blocks discarded, ∂V_ext/∂x in the CPHF Fock derivative; smeared charge-attraction second derivatives by a fourth-order rigid-atom stencil of the first-derivative three-centre blocks | H2O + 10 charges / cc-pVDZ (RHF), CH3OH + 20 charges / def2-SVP (RHF), H2O⁺ + 10 charges / cc-pVDZ (UHF, doublet); H2O and H2O⁺ + 10 smeared charges (widths 0.7/1.1/1.6 Bohr) / cc-pVDZ | central FD (1e-3 Bohr) of PySCF's analytic qmmm.mm_charge gradient (radii= for the smeared rows), QM atoms only (PySCF has no QM/MM Hessian); the same FD without the charges as negative control | max |analytic − FD| 3.4e-7 (H2O), 8.0e-7 (CH3OH), 5.5e-7 (H2O⁺), 3.3e-7 (H2O smeared), 5.5e-7 (H2O⁺ smeared) Ha/Bohr²; the gas-phase Hessian misses by 7.7e-3 to 1.6e-2; vs FD of ferric's own embedded gradient 5.5e-7 (RHF), 3.4e-7 (UHF); translational invariance including the QM–MM cross block 3.6e-9; smeared: vs FD of ferric's own smeared gradient 5.5e-7 (RHF), 3.4e-7 (UHF), width → 1e-3 Bohr vs the point-charge Hessian 6.3e-9 (a 1.0 Bohr width misses by 2.3e-2), cross-block row sums 1.4e-8; an empty potential is bit-identical | 1e-5 Ha/Bohr²; control ≥ 10× the bar | validation_qmmm_hessian.rs, qmmm_hessian_fd.rs, gen_qmmm_hessian.py |
Analytic RHF/UHF Hessian in a uniform external field (hessian_field.rs; the field–nuclear energy is linear in R, so only the electronic E·r term enters: skeleton Σ D ∂²(E·r) and ∂(E·r)/∂x in the CPHF Fock derivative; libint2 has no emultipole1 derivatives, so the dipole integrals are differentiated by a fourth-order stencil on the integrals, on one- and two-atom sub-molecules) | H2O (RHF) and OH (UHF, doublet) / STO-3G, field (0.02, −0.03, 0.025) a.u. | fifth-order second differences of ferric's converged SCF energy (no gradient involved), and central FD of ferric's analytic gradient; zero-field Hessian as negative control | max |analytic − energy FD| 1.0e-7 on 8 elements; max |analytic − FD(gradient)| 5.4e-7 (RHF), 3.5e-7 (UHF); zero-field Hessian misses by 1.8e-2; neutral row sums 4e-12; zero field is bit-identical | 1e-6 (energy FD), 5e-6 (gradient FD); control ≥ 10× the bar | field_hessian.rs |
Analytic RHF/UHF/ROHF Hessian with ECPs (hessian_ecp.rs: skeleton Σ D ∂²V_ECP as a masked fourth-order stencil of the first-derivative ECP blocks, on the default quadrature backend, and ∂V_ECP/∂x in the CPHF Fock derivative; shells up to f) | HI, CH3I / def2-SVP (RHF); CH2I (UHF, doublet) / def2-SVP; Ag2 / aug-cc-pVDZ-PP (RHF) | PySCF hessian.rhf/uhf (analytic, with ECPscalar_ipipnuc, ipnucip, ipiprinv, iprinvip), its skeleton, the ECP-only skeleton rebuilt from those integrals, a fixed-density finite difference of PySCF's analytic ECP gradient term, and a finite difference of PySCF's analytic gradient; ferric's own analytic gradient differenced; the Hessian without the ECP skeleton as negative control | ECP skeleton vs the fixed-density FD of PySCF's ECP gradient term ≤ 5.95e-8 Ha/Bohr² (CH2I; HI 2.6e-10, CH3I 8.2e-9, Ag2 3.5e-10); total Hessian vs FD of PySCF's analytic gradient ≤ 4.4e-7 (Ag2 6.5e-8); vs PySCF's analytic Hessian Ag2 4.9e-9, HI 9.2e-9; at worst 3.7e-6 (CH2I), which is PySCF's own ECP second-derivative roughness (its analytic ECP skeleton misses the FD of its own gradient term by 2.5e-7 CH3I and 3.7e-6 CH2I); frequencies ≤ 7.2e-3 cm⁻¹; vs ferric's own FD of the analytic ECP gradient ≤ 3.8e-7 (RHF), 1.6e-7 (UHF); the Hessian without the ECP skeleton misses by 1.9e-2 to 3.6e-2 (frequencies by 36 to 178 cm⁻¹); a stencil step sweep |S(h) − S(2h)| 9e-12 (4.5e-9 on the libecpint backend); the Ag2 case takes about 30 minutes on a loaded box (four-centre second derivatives with f functions); two different ECP elements (H–Br–I cation / def2-SVP with a second, scaled ECP table on Br; H–Ag–I doublet / aug-cc-pVDZ-PP under --ignored, about 29 minutes): masked vs unmasked stencil 1.6e-13 and 6.3e-13, vs FD of ferric's analytic gradient 2.7e-8 and 9.2e-8, the Hessian without the skeleton misses by 3.5e-2 and 4.5e-2; ECP with point charges, Gaussian-smeared charges and a uniform field (HOI RHF; H–I–H doublet with all three): vs FD of the analytic gradient ≤ 2.5e-7, the environment terms removed misses by 1.4e-2 to 2.2e-2, an unscreened nuclear charge in the charge–nucleus Hessian by 1.3e-1 to 1.4e-1 (one-time measurement; the committed test asserts the screened-vs-bare-Z difference), an empty environment is bit-identical to none and zero-valued charges agree to 1e-10; dropping ∂V_ECP/∂x from F^x misses FD by 6.2e-2 (RHF) and 4.4e-1 (UHF); the Hessian bits of all-electron water (6-31G, def2-SVP) and NH2 are identical before and after the ECP change (FNV hash, a one-time measurement); libecpint backend, measured before the refusal existed (the entry points now refuse it, so these cannot be re-run): HOI full Hessian vs FD of its own gradient 2.3e-7 and HI, CH3I, CH2I within every PySCF bar, but Ag2 misses the ECP-skeleton bar (2.76e-6 against 5e-7; noise-dominated, roughly 1/h at small h with sign changes, plus a real libecpint second-derivative bias of about 1.5e-8 from h = 8e-3 up), so the probe refuses it; libecpint's Ag2 gradient misses PySCF by 8.0e-8 Ha/Bohr (quadrature 5.3e-10), inside the existing libecpint gradient floor, but no committed gradient anchor covers libecpint for Ag or any aug-cc-pVDZ-PP element and the finite-difference fallback under FERRIC_ECP_BACKEND=libecpint is not validated on Ag2 (estimated ~5e-7, unmeasured); the RHF Hessian bits of the all-electron systems drift between the ECP change and HEAD only because #417's incremental-Fock gate changes the SCF at tight energy_conv (6-31G water 15 to 14 iterations, E moves 1.9e-12); with FERRIC_SCF_INCREMENTAL=1 the Hessian hashes match the ECP-change commit bit for bit; ECP with density fitting and ROHF with an ECP (HOI RHF, H–I–H doublet UHF and ROHF / def2-SVP; per-commit ecp_df_hessian.rs, validation tier validation_ecp_df_hessian.rs, 264 s on two threads): vs FD of ferric's analytic fitted gradient 1.0e-7 to 3.7e-7 for RHF RI-J, RI-K and RI-JK, UHF RI-J, RI-K and RI-JK, ROHF exact, RI-J, RI-K and RI-JK (bar 1e-6, derived as 3× the floor and 10× below the smallest defect, the 1.0e-5 fitting signal); the fitted ECP gradient vs a 5-point FD of the fitted energy 3.7e-10; vs PySCF's density-fitted analytic Hessian (RHF HI, CH3I; UHF CH2I) 9.6e-9 to 2.8e-7 (bar 1e-6) and 3.7e-6 for CH2I UHF, which is PySCF's own analytic-vs-FD roughness (3.7e-6; bar twice that), and vs PySCF's FD (the only PySCF reference for ROHF) ≤ 4.4e-7; the exact-integral Hessian misses these references by 1.0e-5 (HI) to 1.1e-3 (rifit), so the fitting signal is present; the Hessian without the ECP skeleton misses FD by 1.2e-2 to 6.6e-2 and without ∂V_ECP/∂x in F^x by 8.3e-2 to 1.9, on every route; dropping the ECP skeleton from the shared RHF or the UHF-DF assembly fails the matching tests (mutation, one-time); the ROHF Fock-trust check rebuilt h without V_ECP (25 Ha deviation, typed refusal) until hcore_ecp replaced it. CONDITIONING: the ordinary def2-universal-jkfit on iodine has an RI-K metric of cond 4.9e8 (HI) to 1.4e9 (CH3I), above the code's 1e8 limit, so the probe refuses it for Auto (tested: Auto runs finite differences, 12 gradients for HI) and the jkfit comparisons are evidence AT that limit, labelled as such in the tests; the within-range evidence uses def2-svp-rifit (probe-accepted for HI, HOI, CH3I). An ECP with an external potential on the fitted routes stays refused | 5e-7 (ECP skeleton vs FD), 1e-5 (vs PySCF analytic), 2e-6 (vs PySCF FD), 5e-2 cm⁻¹ (5e-6 for the environment and two-element FD checks); control ≥ 10× the bar. Refused, not validated: shells above f (probe, before any SCF), the libecpint backend. Not covered: the synthetic Br table is iodine's scaled (same shells, n_core 28; the real H–Ag–I also has 28 on both), so table-structure defects and per-element n_core mix-ups are untested. A first-derivative libint is refused by the probe before any SCF; the ECP route needs only the one-body and four-centre second derivatives up to f, which the wheel's export carries, but a wheel build has not been run | validation_ecp_hessian.rs, ecp_hessian_combinations.rs, ecp_hessian_libecpint.rs, ecp_hessian.rs, ecp_df_hessian.rs, validation_ecp_df_hessian.rs, gen_ecp_hessian.py, gen_ecp_df_hessian.py, validation_ecp_hessian_combinations.rs |
| Harmonic frequencies (FD of analytic gradients; Cartesian Hessian and cm⁻¹) | H2O, NH3 × RHF, PBE, B3LYP / 6-31G, cc-pVDZ; UHF OH, CH3, HO2, UKS-PBE and ROHF CH3 / 6-31G | PySCF same-step FD of analytic gradients (KS with grid response); PySCF analytic hessian.rhf/uhf/rks/uks; thermo.harmonic_analysis with ferric's masses | same-step FD: 2.4e-7 Ha/Bohr², 7.5e-4 cm⁻¹; HF vs analytic 2.75e-5 Ha/Bohr², 0.10 cm⁻¹ (the 5e-3 Bohr step's truncation); KS vs PySCF's analytic Hessian differs by 5–35 cm⁻¹ because that Hessian has no grid response | 2e-6 Ha/Bohr², 5e-3 cm⁻¹ (same-step); 1e-4 Ha/Bohr², 0.5 cm⁻¹ (HF analytic) | validation_frequencies.rs, gen_frequencies.py |
| Meta-GGA gradient, closed shell (SCAN, r2SCAN) | H2O, NH3 / 6-31G, def2-SVP; RI-J (default) and exact J | PySCF RKS grid_response=True, same grid and density fitting; FD of ferric's own energy | ≤ 1.3e-9 Ha/Bohr (def2-SVP 5.0e-10); analytic vs own FD 1.0e-9 | 1e-8 Ha/Bohr | validation_mgga_gradients.rs, gen_mgga_gradients.py |
| Meta-GGA gradient, open shell (SCAN, r2SCAN) | UKS: HO2, NH2 / 6-31G; ROKS: NH2 / 6-31G | PySCF UKS grid_response=True + stability(); ROKS: central FD of PySCF ROKS energy; FD of ferric's own energy | UKS ≤ 6.2e-9 Ha/Bohr; ROKS 2.2e-10 vs the FD; energies ≤ 5.7e-13 Ha | 3e-8 Ha/Bohr (UKS); 1e-7 (ROKS) | validation_mgga_gradients.rs, gen_mgga_gradients.py |
Meta-GGA (τ-only) fxc response (ferric_dft::fxc::MggaFxcKernel): RKS/UKS internal stability, RKS/UKS Newton, RKS/UKS/ROKS KS Z-vector | Stability: NH2 (UKS), water (RKS) / 6-31G, r2SCAN, exact J, flat (75,110) Becke grid. Z-vector: water (RKS), NH2 (UKS), HCO and CH2 triplet (ROKS) / STO-3G, r2SCAN, through the MBD@rsSCS exact gradient. Kernel: closed shell, r2SCAN and SCAN | PySCF newton_ah.gen_g_hop_uhf / gen_g_hop_rhf dense orbital Hessians on the same grid; Newton: ferric's DIIS energy; Z-vector: central FD of the full SCF + MBD pipeline; kernel: FD of the production Vxc | dense spectrum and Davidson λ_min ≤ 1.5e-10 Ha; SCF energy 5.7e-14 Ha; Newton vs DIIS ≤ 1.4e-14 Ha; Z-vector exact gradient 8.0e-10 (RKS), 1.1e-11 (UKS), 2.0e-11 (ROKS) Ha/Bohr; kernel 5.4e-9 (r2SCAN), 3.6e-7 (SCAN) relative. ROKS Newton/AH and TRAH stay on DIIS for a meta-GGA; the analytic KS Hessian refuses it | 1e-8 Ha (eigenvalues); 1e-9 Ha (energy, Newton); 5e-9 (RKS), 5e-10 (UKS, ROKS) Ha/Bohr | mgga_response_vs_pyscf.rs, gen_mgga_response.py, mbd_scf_gradient.rs, mbd_scf_gradient_uks.rs, mbd_scf_gradient_roks.rs, unit tests in fxc.rs |
| COSX exchange, dense-grid limit | water / cc-pVDZ | direct K | 3.3e-7 | — | cosx_k_anchors.rs; see SCF: choosing how exchange is built |
| COSX SCF energy, (50,110)+fit | water / cc-pVDZ | direct K | 4.9e-6 Ha | — | ″ |
| COSX SCF energy, (50,110)+fit | butane / def2-SVP | direct K | 1.7e-4 Ha | — | ″ |
| COSX SCF energy, (50,110)+fit | butane / def2-TZVP | direct K | 1.2e-4 Ha | — | ″ |
| COSX, open shell | CH3 doublet / cc-pVDZ | direct K | 1.96e-5 Ha (UHF), 1.97e-5 Ha (ROHF) | — | k_builder_open_shell.rs |
| COSX analytic gradient (RHF, RKS, UHF; default overlap fit for RHF/UHF) | water / STO-3G, 6-31G; HO2 / STO-3G | finite differences of the COSX energy | 1.6e-9 to 4.3e-9 Ha/Bohr | 1e-6 / 3e-8 Ha/Bohr | cosx_gradient.rs |
COSX analytic gradient, open shell (UKS-B3LYP, ROKS-B3LYP, ROHF; fit off; flat (50,110) and pruned sgx (35,194) grids) | HO2 / STO-3G, NH2 / STO-3G | central FD of the COSX energy on the same grid (exchange-isolated against the direct-K run) | 1.7e-10 to 2.0e-9 Ha/Bohr; the exact-K gradient paired with the COSX energy misses by 6.1e-6 to 2.4e-4 | 1e-7 Ha/Bohr | cosx_gradient_open_shell.rs |
| MBD@rsSCS gradient on a UKS-PBE0 reference with COSX exchange (fit off) | NH2 / STO-3G | central FD of the full UKS(COSX) + MBD pipeline | 2.3e-11 Ha/Bohr; the exact-K Z-vector contraction misses by 4.6e-10 | 1e-10 Ha/Bohr | mbd_scf_gradient_uks.rs |
| COSX exchange against PySCF and against exact K: fit off with no screening on the identical grid; angular-grid convergence (75,110)→(75,590) with production knobs; analytic gradient with fit on (RHF) and off (B3LYP) | water / aug-cc-pVDZ (RHF, B3LYP); butane / def2-SVP (RHF); distorted water, NH3 for gradients | PySCF sgx on ferric's grid recipe (exact J, fit off, no screening); ferric exact-K energy; central FD of the COSX energy | same grid ≤ 1.2e-12 Ha at every grid; error shrinks 93x (butane) to 2576x (water) from 110 to 590 points; exact-K vs PySCF ≤ 2.1e-11 Ha; gradient ≤ 1.6e-8 Ha/Bohr | 1e-10 Ha; ≥ 30x; 1e-9 Ha; 2e-7 Ha/Bohr | validation_cosx.rs, gen_cosx.py |
| RIJCOSX energy (RI-J + COSX K): separation into RI-J error + COSX error | water / 6-31G (HF, B3LYP); HO2 / 6-31G (UHF) | the three other corners of (exact or RI) J × (exact or COSX) K, same grid | second-order cross term, 2.8–5.8 × e_cosx·e_rij (7.8e-10 Ha at (50,110), 2.3e-11 Ha at (75,302)) | 30 × e_cosx·e_rij, or 1e-10 Ha | cosx_rijcosx.rs |
| RIJCOSX analytic gradient (RI-J derivative + COSX derivative; flat and pruned grids; fit on and off) | water / STO-3G (RHF, B3LYP); HO2 / STO-3G (UHF) | central FD of the RIJCOSX energy | 1.7e-9 Ha/Bohr (RHF), 4.9e-10 (B3LYP, exchange-isolated), 3.6e-9 (UHF) | 1e-7 / 3e-8 Ha/Bohr | ″ |
Pruned COSX grid (prune = "sgx", peaks 194 and 302) against PySCF SGX with sgx_prune on the same radial grid and Becke partition, fit off, no screening | water / aug-cc-pVDZ; butane / def2-SVP (RHF) | PySCF 2.13.1 | ≤ 1.8e-12 Ha, identical point counts | 1e-10 Ha | validation_cosx.rs, gen_cosx_pruned.py |
| COSX final-grid pass | water / STO-3G, 6-31G; HO2 / STO-3G | the SCF-grid energy (final grid = SCF grid); SCF converged on the final grid | bit-identical; within 1.5e-7 Ha on eight molecules (site/src/methods/scf.md) | exact; — | cosx_rijcosx.rs, cosx_grid_sweep.py |
| Lebedev 194-point rule | unit sphere | exact monomial integrals; PySCF's rule | exact through degree 23; nodes and weights identical to PySCF's | 1e-12 relative | lebedev.rs |
| Periodic closed-shell range-separated hybrids at the Gamma point (HSE06, CAM-B3LYP; energy only), dense AFT and RS-GDF | H2 / STO-3G in a 4 Bohr cube and a triclinic cell, exxdiv ewald and none | PySCF 2.13.1 Gamma pbc.dft.RKS + AFTDF, UniformGrids 41³, cell.precision 1e-11 (8 pins) | ≤ 6.2e-13 Ha vs PySCF; Gamma = 1×1×1 k-mesh to 2.7e-15; RS-GDF − dense equals the plain-Coulomb fit error × 1.00–1.03; the attenuated-K fit as a matrix: 4.4e-14 / 2.1e-13 (cc-pVDZ-RI / def2-universal-jkfit) | 1e-10; 1e-10; 0.4 × fit error; 1e-11. Mutants moved E by ≥ 3.1e-4 (ω ×1.01, attenuated K dropped, c_sr/c_lr swapped, c_sr ×0.99, wrong exxdiv); a 1e-3 relative ω error in the fit alone moves the K matrix by 7.1e-6. Limits: the attenuated K is the k = 0 point of the k-point exchange, so the 1×1×1 agreement is not independent of the kernel (PySCF is); at a = 4 Bohr HSE06's erf piece is empty (ω = 0.11 < the smallest G), so only CAM-B3LYP exercises the attenuated fit; no range_split, and the nuclear force and the stress are the dense-AFT validation rows below (closed-shell force and stress, also reachable from the CLI and Python, then the open-shell UKS and ROKS force rows and the open-shell stress row) and, on k-point RS-GDF J/K, the closed-shell k-point RS-GDF row after them (the Gamma routes on an RS-GDF exchange have their own Gamma RS-GDF row); closed shell only (open-shell UKS is the next row); fixtures are H2/STO-3G only | pbc_grsh.rs, gen_pyscf_pbc_grsh_refs.py |
| Periodic closed-shell range-separated hybrids on a k-point mesh (HSE06, CAM-B3LYP, wB97X; energy only), dense AFT and RS-GDF | H2 / STO-3G, cubic and triclinic cells, meshes up to 2×2×2, exxdiv ewald and none | PySCF 2.13 pbc.dft.KRKS + AFTDF; k-mesh against the explicit supercell | ≤ 5e-13 Ha vs the PySCF pins; k-mesh = supercell / N to 4.4e-14 | 1e-10; 1e-8 (RS-GDF) | pbc_krsh_more.rs, pbc_krsh_rsgdf.rs, validation_pbc_krsh_rsgdf.rs |
Periodic closed-shell range-separated hybrid nuclear forces (HSE06, CAM-B3LYP; dense-AFT J/K; kxcgrad::kpoint_rks_gradient on a k-mesh, gamma_rsh::gamma_rks_rsh_gradient at the Gamma point through the 1×1×1 mesh) | H2 / STO-3G in a 4 Bohr cube, meshes 1×1×1 and 1×1×3 (non-TRIM), exxdiv ewald and none, an explicit 3-cell supercell | central FD of ferric's own energy (fresh SCF per displacement, h = 1e-4); c_sr = c_lr = c against the global hybrid with fraction c (two SCFs, zero XC); 1×1×3 mesh against the explicit supercell; Gamma against the 1×1×1 mesh. No PySCF force pin | analytic − FD ≤ 2.9e-9 Ha/Bohr (the h² floor: 1.16e-8 → 2.89e-9 → 7.14e-10 for h = 2e-4 → 1e-4 → 5e-5); ewald − none force ≤ 7.6e-13; equal fractions − global hybrid 5.6e-17; mesh − supercell ≤ 1.1e-14; Gamma − 1×1×1 ≤ 1.1e-16 | 1e-7 (FD); 1e-9 (anchors). Mutants (1×1×3 ewald, CAM-B3LYP / HSE06) miss the FD-validated force by 1.48e-1 / 1.64e-1 (kernel factor dropped), 1.01e-1 / 9.0e-2 (factor on J too), 3.0e-2 / 5.4e-2 (c_sr/c_lr swapped), 3.4e-2 / 5.3e-2 (plain instead of mixed Madelung in the M-term), 5.2e-4 / 1.45e-5 (ω × 1.01), 3.8e-2 / 1.2e-4 (erf piece dropped), 2.8e-2 / 5.1e-3 (Madelung M-term dropped). Limits: the largest erf weight on the 1×1×3 K set is 0.245 for CAM-B3LYP and 8.7e-4 for HSE06, but HSE06's derivative still resolves its erf piece (dropping it misses by 1.2e-4, 1200 FD bars; ω × 1.01 by 145 bars); wB97X is accepted but not exercised by a force test by the library (the Python and CLI derivative gate refuses it by name); the Gamma check is glue only (the kernel is shared with the k code); the stress is the next row, the open-shell UKS and ROKS forces the two rows after it, closed-shell RS-GDF J/K the row after those; H/STO-3G fixtures only (no p or d shells). Bindings (#498): the CLI task = "optimize" (k-mesh HSE06, Gamma CAM-B3LYP) logs the returned geometry and gradient in run_end, equal to the library at that geometry bit for bit (energy and force); Python run_rks_kpts / run_rks_gamma with_gradient vs the same library numbers: energy 0, force ≤ 5.6e-17 (bar 1e-12); Python k HSE06 force vs FD of its own energies 2.8e-9 (bar 2e-8); Python Gamma vs 1×1×1 force 1.1e-16, stress 1.7e-17 (bar 1e-10) | periodic_rsh_open_mgga_derivs.rs, test_pbc_rsh_open_mgga_derivs.py, pbc_krsh_force.rs, validation_krsh_force.rs, validation_pbc_kxcgrad_hybrid.rs |
Periodic closed-shell range-separated hybrid stress (HSE06, CAM-B3LYP; dense-AFT J/K; kxcstress::kpoint_rks_stress on a k-mesh, gamma_rsh::gamma_rks_rsh_stress at the Gamma point through the 1×1×1 mesh) | H2 / STO-3G in a 4 Bohr cube, meshes 1×1×1 and 1×1×3 (non-TRIM), exxdiv ewald and none, an explicit 3-cell supercell; the Madelung strains also on a triclinic lattice | central FD of ferric's own energy under each of the nine strain components (fresh SCF per strained cell, fixed fractional coordinates, h = 2.5e-5, shared grid cutoff); c_sr = c_lr = c against the global hybrid with fraction c (two SCFs, zero XC); 1×1×3 mesh against the explicit supercell; Gamma against the 1×1×1 mesh; ewald − none against −dv_M/dε from FD of the mixed Madelung constant on strained supercells (the density does not depend on the exxdiv, so E_ewald − E_none = −v_M per occupied orbital); dv_M^LR/dε and the mixed dv_M/dε against FD of the constants (prototyped in Python first). No PySCF pin (PySCF has no hybrid stress) | analytic − FD ≤ 5.6e-9 Ha per cell over all nine components, both functionals, both exxdiv (the worst is always ε_xx; every other component ≤ 1.3e-9); ε_zz residual 1.06e-8 → 2.40e-9 → 7.2e-10 for h = 1e-4 → 5e-5 → 2.5e-5 (h²); equal fractions − global hybrid 2.2e-16; mesh − supercell σ ≤ 3.5e-15; Gamma − 1×1×1 ≤ 7.8e-16; ewald − none vs −dv_M/dε 2.4e-9; Madelung strains vs FD 2.4e-9 (LR, h = 1e-4) and ≤ 6.3e-10 (mixed) | 3e-8 (FD); 1e-9 / 1e-10 (anchors); 1e-8 (exxdiv); 1e-7 (Madelung). Mutants (1×1×3 ewald, CAM-B3LYP / HSE06) miss the FD-validated stress by 1.17e-1 / 3.45e-3 (f′(K²) slope term dropped), 6.0e-2 / 5.8e-2 (kernel on J too), 1.03e-1 / 1.52e-1 (c_sr/c_lr swapped), 3.44e-1 / 5.94e-1 (plain instead of mixed Madelung strain), 2.92e-1 / 5.10e-3 (v_M^LR strain dropped); the primitive-cell Madelung strain misses the supercell by 6.2e-3. Limits: ε_xx has a discrete energy step at h ≥ 1e-4 (2.1e-5 at h = 2e-4) from the atom grid's hard neighbour_cutoff (#495), which the global hybrid PBE0 shows identically, so FD runs at 2.5e-5 (where the ε_xx residual is FD-floor noise, not h²); wB97X is accepted but not exercised by the library (the Python and CLI derivative gate refuses it by name); open shell (UKS, ROKS) is the open-shell RSH stress row four rows below (closed-shell RS-GDF J/K: three rows below); bindings (#498): the CLI [cell] stress = true HSE06 tensor (H2, 1×1×2 Gamma-centred and Monkhorst-Pack) equals the library bit for bit in periodic_kpoint_stress.rs, Python with_stress runs the same library call; H/STO-3G fixtures only (no p or d shells); the Gamma check is glue only (the kernel is shared with the k code) | pbc_krsh_stress.rs, validation_krsh_stress.rs |
Periodic open-shell (UKS) range-separated hybrid nuclear forces (HSE06, CAM-B3LYP; dense-AFT J/K; kuxcgrad::kpoint_uks_gradient on a k-mesh, gamma_rsh::gamma_uks_rsh_gradient at the Gamma point through the 1×1×1 mesh): K_σ = K[D_σ] with exchange scale 1, both spin exchange walks weighted by the kernel factor, J bare, the mixed Madelung constant in the per-spin M-term Σ_σ D_σ S D_σ | H3 doublet and H4 triplet / STO-3G in the triclinic cell of the UKS energy row (polarized), meshes 1×1×1 and 1×1×2, exxdiv ewald and none; H2 singlet (4 Bohr cube, 1×1×3); an explicit 2-cell supercell (multiplicity 3) | singlet k-UKS against the k-RKS RSH force (separate SCFs, per part); central FD of ferric's own polarized energy (fresh SCF per displacement, every component of both cells, both functionals, h sweep); c_sr = c_lr = c against the global-hybrid UKS force with fraction c (two SCFs, zero XC, polarized H3); 1×1×2 mesh against the supercell; Gamma against the 1×1×1 mesh; ewald against none. No PySCF force pin | singlet UKS − RKS ≤ 2.3e-13 per part; analytic − FD ≤ 3.8e-9 (H3) / 4.7e-9 (H4 triplet) Ha/Bohr at h = 1e-4 (CAM-B3LYP H3 (0,2): 1.50e-8 → 3.82e-9 → 9.16e-10 for h = 2e-4 → 1e-4 → 5e-5, h²); equal fractions − global hybrid 1.7e-16; mesh − supercell ≤ 7.2e-15; Gamma − 1×1×1 ≤ 8.5e-14; ewald − none ≤ 5.6e-14 | 1e-7 (FD); 1e-9 (anchors). Mutants on the polarized H3 doublet (1×1×2 ewald, CAM-B3LYP / HSE06) miss the FD-validated force by 2.6e-3 / 2.8e-3 (α density in the β exchange walk), 2.0e-2 / 1.6e-2 (β exchange dropped), 1.2e-2 / 3.9e-3 (M-term on the total density), 2.7e-2 / 1.1e-2 (α K in the β Fock), 1.3e-1 / 1.2e-1 (kernel factor on J), 4.3e-2 / 7.2e-2 (plain instead of mixed Madelung), 3.6e-2 / 3.3e-2 (c_sr/c_lr swapped), 9.6e-2 / 1.0e-1 (kernel factor dropped), 1.3e-2 / 2.7e-6 (erf piece dropped), 2.7e-4 / 5.1e-7 (ω × 1.01); the first four (spin bookkeeping) are 0 on the singlet. Limits: the equal-fraction anchor shares the M-term density sandwich Σ_σ D_σ S D_σ with its global-hybrid side, so it cannot see an M-term spin error (only FD does: a cross-spin M-term mutant misses FD by 2.3e-2); the largest erf weight on the H3 1×1×2 K set is 0.172 for CAM-B3LYP and 3.6e-5 for HSE06, so HSE06's erf and ω defects are resolved only at 27 and 5 FD bars on this cell (CAM-B3LYP carries the erf assertion); wB97X accepted, not force-tested; RS-GDF is the open-shell RS-GDF row below; the open-shell stress is its own row below (ROKS force: the next row); the bindings of all of them are the open-shell RSH bindings row below; bindings (#498): the CLI task = "optimize" (k-mesh HSE06 H3 1×1×2, Gamma CAM-B3LYP H3) logs the returned geometry and gradient in run_end, equal to the library at that geometry bit for bit (energy and force; PBE0 / HSE06 siblings differ by 4.2e-4 / 3.6e-3 Ha/Bohr); Python run_uks_kpts / run_uks_gamma with_gradient vs the same library numbers: energy ≤ 8.9e-16, force ≤ 1.0e-15 (bar 1e-12); Python k HSE06 UKS force vs FD of its own energies 4.1e-10 (bar 2e-8); Python Gamma vs 1×1×1 UKS CAM-B3LYP force 3.7e-12 (bar 1e-10); the binding gate (kxcgrad::check_deriv_functional with Deriv::Force / Deriv::Stress, dft::check_gamma_uks_request) refuses by name wB97X (the UKS stress, the UKS force on RS-GDF and the ROKS range-separated derivatives refused here at the time are wired since, the open-shell RSH bindings row below) (periodic_rsh_open_mgga_derivs.rs, test_pbc_rsh_open_mgga_derivs.py); H/STO-3G fixtures only (no p or d shells) | pbc_kuks_rsh_force.rs, validation_kuks_rsh_force.rs, validation_periodic_rsh_open_mgga_derivs.rs, validation_pbc_kuxcgrad.rs |
Periodic restricted open-shell (ROKS) range-separated hybrid nuclear forces (HSE06, CAM-B3LYP; dense-AFT J/K; kuxcgrad::kpoint_roks_gradient on a k-mesh, gamma_rsh::gamma_roks_rsh_gradient at the Gamma point through the 1×1×1 mesh): the UKS RSH assembly of the row above on the ROHF spin densities, with W_RO and the ROHF orbital-gradient gate; the routed Gamma force's Fock guard compares the rebuilt spin Focks with the Gamma result's stored spin Focks (rohf_spin_focks; the Roothaan F_eff only as a fallback for a result without them) | H3 doublet and H4 triplet / STO-3G in the triclinic cell of the UKS row, meshes 1×1×1 and 1×1×2, exxdiv ewald and none; H2 singlet (4 Bohr cube, 1×1×3); an explicit 2-cell supercell (high-spin triplet) | singlet k-ROKS against the k-RKS RSH force (separate SCFs, per part); central FD of ferric's own ROKS energy (fresh SCF per displacement, every component of both cells, both functionals, h sweep; PySCF has no periodic ROKS gradient); c_sr = c_lr = c against the global-hybrid ROKS force with fraction c (two zero-XC ROKS SCFs); 1×1×2 mesh against the supercell; Gamma against the 1×1×1 mesh; ewald against none | singlet ROKS − RKS ≤ 1.2e-13 per part; analytic − FD ≤ 4.5e-9 (H3) / 4.6e-9 (H4 triplet) Ha/Bohr at h = 1e-4 (CAM-B3LYP H3 (0,2): 1.79e-8 → 4.51e-9 → 1.11e-9 for h = 2e-4 → 1e-4 → 5e-5, h²); equal fractions − global hybrid ≤ 3.4e-16; mesh − supercell ≤ 4.2e-15; Gamma − 1×1×1 ≤ 5.1e-15 (spin-Fock guard ≤ 1.0e-15); the Gamma guard refuses another grid, exxdiv or functional and an equal-and-opposite spin-Fock tamper (whose diagonal-block part F_eff cannot see); the F_eff fallback gives the identical force; ewald − none ≤ 5.8e-16 | 1e-7 (FD); 1e-9 (anchors). Mutants on the H3 doublet (1×1×2 ewald, CAM-B3LYP / HSE06) miss the FD-validated force by 3.1e-3 / 2.6e-3 (α density in the β exchange walk), 2.2e-2 / 1.8e-2 (β exchange dropped), 1.2e-2 / 3.8e-3 (M-term on the total density), 2.8e-2 / 1.2e-2 (α K in the β Fock), 1.3e-1 / 1.2e-1 (kernel factor on J), 4.4e-2 / 7.3e-2 (plain Madelung), 3.7e-2 / 3.5e-2 (c_sr/c_lr swapped), 9.9e-2 / 1.0e-1 (kernel factor dropped), 1.4e-2 / 2.8e-6 (erf piece dropped), 2.8e-4 / 5.3e-7 (ω × 1.01), 8.5e-2 / 7.2e-2 (W_RO cross term dropped); the first four are 0 on the singlet. The unrestricted W = Σ_σ D_σ F_σ D_σ is an identity at convergence (1.1e-14, H4 triplet); on a loose H4 triplet state (orbital gradient 3.6e-5) the gate refuses it; with the gate off neither form is right there (both miss the converged force, by 1.0e-5 and 1.5e-5) and the two differ by 4.9e-6, so the gate's refusal is the protection. Limits: the H3 doublet is inversion-symmetric, so its closed-open block (and the W_RO − unrestricted-W difference) vanishes for any state, hence the H4 triplet for that test; the equal-fraction anchor shares the M-term sandwich and W_RO with its global-hybrid side (spin errors in them are seen by FD only); HSE06's erf and ω defects are resolved at only 28 and 5 FD bars on this cell (asserted instead on the singlet, 1.2e-4 / 1.5e-5; CAM-B3LYP carries the open-shell erf assertion); wB97X accepted, not force-tested; RS-GDF is the open-shell RS-GDF row below; the open-shell stress is its own row below; a Gamma ROKS on a caller-supplied grid is not covered; wired to Python and the CLI by #498 (the open-shell RSH bindings row below); H/STO-3G fixtures only | pbc_kroks_rsh_force.rs, validation_kroks_rsh_force.rs |
Periodic closed-shell range-separated hybrid nuclear forces and stress on k-point RS-GDF J/K (HSE06, CAM-B3LYP; kxcgrad::kpoint_rks_gradient and kxcstress::kpoint_rks_stress on a KRsGdf::build_rsh source). The plain fit's exchange pieces are scaled by c_sr, the attenuated fit of erf(ωr)/r is differentiated by the plain fit's LR and metric passes at ω on |K| ≤ 2ω√ln(1/ε) (no SR walks, no c0 G = 0 terms; a q class the build left empty contributes zero) scaled by c_lr − c_sr, and the M-term and Madelung strain carry the SCF's mixed constant (prototyped in Python first) | H2 / STO-3G with an even-tempered s,p aux on the atoms, 1×1×2 mesh, RS-GDF split ω₀ = 1: a triclinic cell (CAM-type ω = 0.33) and a 6.5 Bohr cube (HSE-type ω = 0.11, where q = 0 carries K vectors); KS rows in a 4 Bohr cube | exactness anchor: the attenuated fit at ω = 1e7 (cut 24) against the plain fit, fixed density; the attenuated fit alone against central FD of its fixed-density energy; the zero-XC range-separated exchange energy (no grid) and the KS energy, central FD with fresh build and SCF per displacement (forces) and per strained cell (nine stress components); RS-GDF against the dense-AFT RSH force on the same cell, scaled by the plain-Coulomb (PBE0) fit gap. No PySCF force pin | anchor: energy 1.4e-15, force 6.6e-14; attenuated alone (lindep 1e-6) 5.8e-9 / 5.2e-11 / 9.0e-12 at h = 1e-3 / 1e-4 / 1e-5; zero-XC force 1.11e-8 / 2.78e-9 / 6.6e-10 (CAM-type) and 9.7e-9 / 2.44e-9 / 6.25e-10 (HSE-type) at h = 2e-4 / 1e-4 / 5e-5 (h²); KS force 2.15e-9 / 5.8e-10 at h = 1e-4 / 5e-5 (both functionals, the same as dense AFT); zero-XC stress 1.26e-8 / 3.2e-9 (CAM-type) and 8.1e-9 / 2.1e-9 (HSE-type) at h = 1e-4 / 5e-5; Σ F ≤ 1.2e-15; RS-GDF − dense force 1.60e-5 to 1.79e-5, within 5% of the PBE0 gap of the same aux and mesh | 1e-11 (anchor); 1e-9 (attenuated alone, h = 1e-4); 1e-8 (zero-XC force, h = 5e-5) and 2e-8 (KS force); 3e-8 (stress); 1.5 × the PBE0 gap. Mutants (CAM-type / HSE-type) miss the FD-validated force by 2.8e-2 / 6.1e-2 (c0 kept in the attenuated derivative), 2.5e-2 / 8.4e-4 (c_lr − c_sr dropped), 4.8e-2 / 1.3e-2 (c_sr v_M only), 2.2e-2 / 1.6e-2 (c_lr v_M), 6.3e-2 / 1.2e-2 (mixed v_M scaled again by c_sr), 7.6e-2 / 9.9e-2 (plain v_M), 7.7e-2 / 1.6e-2 (no Madelung M-term), and the stress by 1.3e-1 / 1.6e-2 (scale dropped), 1.1e-1 / 3.2e-3 (attenuated strain dropped), 2.5e-1 / 2.5e-1 (plain Madelung strain), 1.6e-1 / 4.2e-3 (LR Madelung strain dropped); a derivative at the Ewald split ω₀ is refused by the rebuilt-fit check. Conditioning: the fit derivative applies the metric inverse in its eigenbasis, so kept eigenvalues just above the default lindep 1e-10 do not degrade the force: at fixed density a rigid translation of 1e-3 moves the CAM-type attenuated force by 3.6e-11 (lindep 1e-10; the energy by ≤ 1.1e-16), the attenuated fit alone matches FD at 5.8e-9 / 6.8e-11 / 7.8e-12 for h = 1e-3 / 1e-4 / 1e-5 at lindep 1e-10, the CAM-type zero-XC force at lindep 1e-10 shows the same h² truncation as at 1e-6 (1.11e-8 / 2.74e-9 / 6.2e-10), and with the #512 control (a near-duplicate aux shell whose 1.4e-11 eigenvalue is dropped at 1e-10) the attenuated fit's translation drift falls from 2.1e-8 to 4.9e-11 and its flat 3.9e-8 FD miss becomes the h² truncation (5.7e-9 / 1.9e-11 at h = 1e-3 / 1e-4), while its exchange-only plain fit was already clean (4.8e-14; the report's ~4e-6 plain-fit miss is not reproduced on that path). The ≤ 1e-10 translation target of #512 is not met when a near-duplicate eigenvalue is kept just above the cut (1.3e-10): the plain and attenuated forces still move by 1.29e-10 / 1.79e-10 (per commit, bar 2e-9; 9.2e-7 / 1.05e-7 with the explicit metric inverse). The energy itself moves by 5.4e-11 under that translation and FD of the plain fit grows as 1/h (6.1e-8 / 5.5e-7 / 4.9e-6 at h = 1e-3 / 1e-4 / 1e-5), so the residual is attributed, provisionally, to integral roundoff in the near-singular fit (shown only in an exact-integral Python model). The HSE06 KS row on the 4 Bohr cube is wiring only (erf weights ~3e-6, q = 0 empty). The atom grid adds FD steps on the triclinic and 6.5 Bohr cells that are identical on dense AFT, hence the zero-XC FD rows; the Gamma route (gamma_rks_rsh_gradient) differentiates an RS-GDF exchange too (the Gamma RS-GDF row below); open shell (the UKS and ROKS forces on RS-GDF) is the next row (the open-shell stress is the row after it; both wired, the open-shell RSH bindings row); bindings (#498): the CLI task = "optimize" CAM-B3LYP force (H2, 1×1×2, cc-pVDZ-RI) and [cell] stress = true CAM-B3LYP tensor equal the library bit for bit (B3LYP sibling on the same fit 5.7e-4 Ha/Bohr force, 5.7e-4 stress; the dense-AFT CAM-B3LYP stress differs by 2.8e-6), Python run_rks_kpts(jk="rsgdf") with_gradient / with_stress match the CLI values (differences 0 on the measuring machine, not a cross-platform guarantee: the Python test bar for the RS-GDF force and stress is 1e-6 because a different OpenBLAS kernel moves them by up to 1.25e-8 and 1.65e-9; the energy and the dense rows keep 1e-12); the RS-GDF range-separated stress is roundoff-limited: a ~1e-17 Å change in the xyz digits of the same geometry moves σ_zz by 2.8e-9, so the Python anchor reads the same xyz text as the CLI run (periodic_kpoint_stress.rs, test_pbc_rsh_open_mgga_derivs.py); H/STO-3G fixtures only | pbc_krsh_rsgdf_force.rs, pbc_kfit_force_conditioning.rs, validation_krsh_rsgdf_force.rs, rsgdf_rsh_force_proto.md |
Periodic open-shell (UKS, ROKS) range-separated hybrid nuclear forces on k-point RS-GDF J/K (HSE06, CAM-B3LYP; kuxcgrad::kpoint_uks_gradient / kpoint_roks_gradient on a KRsGdf::build_rsh source). A composition of the closed-shell RS-GDF RSH force (plain fit × c_sr, attenuated fit × (c_lr − c_sr), mixed M-term) with the open-shell exchange terms (1, D_α), (1, D_β) (twice the closed-shell (½, D) per spin); no new derivative | H3 doublet / STO-3G, ET-sp aux, 1×1×2: triclinic TRI_A (CAM-type ω = 0.33, CAM-B3LYP, HSE06) and a 6.5 Bohr cube (HSE-type ω = 0.11); H2 singlet TRI2 | Singlet UKS ≡ #514's RKS RS-GDF force (separate SCFs) per part; c_sr = c_lr ≡ the global hybrid on the plain fit; central FD of ferric's own polarized energy (fresh build + SCF per point); RS-GDF − dense-AFT UKS force gap vs the PBE0 (plain-fit) gap. No PySCF oracle: PySCF 2.13 periodic KS gradients are FFTDF-only | Singlet: exactly 0 (bitwise D_σ = D/2; mutants move it 3.1e-2). Equal fractions: ≤ 3.6e-14 (UKS, ROKS; ewald and none). Zero-XC FD, all 9 components: 9.7e-10 / 1.0e-9 (CAM-type UKS / ROKS), 7.1e-10 (HSE-type) at h = 5e-5, 3.9× per halving. KS FD (3 components): ≤ 1.1e-9 at h = 5e-5. Gap: CAM-B3LYP 1.26e-5, HSE06 1.08e-5 vs PBE0 1.08e-5 | 1e-10; 1e-10; 1e-8 (zero XC) / 2e-8 (KS) at h = 5e-5 with a 3–6 h² ratio; 1.5 × the PBE0 gap. Mutants (spin factor, dropped / swapped β term, total-density M-term, Pulay K swap, attenuated scale and c0, Madelung constants, ROKS W cross term) miss by 3.5e-4 – 4.3e-2; source mutants of KSpins::exch_terms (½ per spin, β dropped) fail singlet and FD. Limits: HSE06's attenuated piece is nearly dead on TRI_A (2.7e-6), covered by the HSE-type cube rows; the open-shell stress is the next row; Python / CLI wire the RS-GDF open-shell RSH force (#498, the open-shell RSH bindings row); H / STO-3G only | pbc_kuks_rsh_rsgdf_force.rs, validation_kuks_rsh_rsgdf_force.rs |
Periodic open-shell (UKS, ROKS) range-separated hybrid stress (HSE06, CAM-B3LYP; dense-AFT and k-point RS-GDF J/K; kuxcstress::kpoint_uks_stress / kpoint_roks_stress on a k-mesh, gamma_rsh::gamma_uks_rsh_stress at the Gamma point through the 1×1×1 mesh). A composition, no new derivative algebra: the open-shell stress assembly (exchange terms (1, D_α), (1, D_β), M-term Σ_σ D_σ S D_σ, W or W_RO) with the closed-shell RSH stress's attenuated kernel slope (dense), the plain fit × c_sr plus the attenuated fit's LR strain × (c_lr − c_sr) (RS-GDF), and the mixed Madelung constant and strain; exchange scale 1 | H3 doublet / STO-3G in the triclinic TRI_A (polarized) and a 6.5 Bohr cube (HSE-type ω = 0.11), H2 singlet in TRI_A; 1×1×2 mesh, RS-GDF ET-sp aux with ω₀ = 1 and lindep 1e-6 (dense on the same basis, mesh and hcore); exxdiv ewald and none; an explicit 2-cell supercell (triplet); KS on an SSF (20, 50) atom grid with an explicit neighbour cutoff | singlet UKS against the RKS RSH stress (independent SCFs and entries, per part; zero XC and KS); c_sr = c_lr = c against the global-hybrid open-shell stress with fraction c (zero XC, polarized, UKS and ROKS, both J/K, both exxdiv); central FD of ferric's own polarized energy under strain (fresh build and SCF per strained cell, h = 1e-4 and 5e-5 and the Richardson combination (4 FD(h/2) − FD(h))/3): zero XC on all nine components (CAM-type ω = 0.33, both J/K, UKS and ROKS, ewald; UKS also under none) and three components of the HSE-type cube, and the KS HSE06 / CAM-B3LYP energy on three components (UKS and ROKS, both J/K); Gamma against the 1×1×1 mesh; 1×1×2 mesh against the supercell. No PySCF pin: PySCF 2.13.1 pbc/grad/krks_stress.py / kuks_stress.py raise NotImplementedError for hybrids, and it has no RS-GDF derivative | singlet UKS − RKS: exactly 0 per part (zero XC, both J/K; audited: the singlet UKS SCF lands on D_σ = D/2 and the two term lists differ by power-of-two scalings), KS ≤ 2.8e-16 (dense) and ≤ 1.2e-12 (RS-GDF ROKS CAM-B3LYP); equal fractions − global hybrid ≤ 4.8e-14; zero-XC FD all nine: worst 3.07e-8 / 7.0e-9 at h = 1e-4 / 5e-5 (the ε_zz row, ratio 4.4, h²), Richardson ≤ 8.9e-10 (dense) and ≤ 4.1e-10 (RS-GDF); HSE-type cube Richardson ≤ 3.2e-10 with the attenuated piece 4.5e-3 – 5.0e-3 (resolved ~1e7×); KS FD ≤ 2.7e-8 / 6.2e-9 at h = 1e-4 / 5e-5, Richardson ≤ 8.6e-10; Gamma − 1×1×1 ≤ 3.2e-15; mesh − supercell/2 ≤ 8.3e-14 | 1e-10 (anchors); 1e-6 at h = 1e-4 and 2e-8 Richardson (#553's stress bars); 1e-9 (Gamma, supercell). Mutation ledger on the polarized CAM-type cell, UKS and ROKS, dense and RS-GDF: β exchange term dropped 6.5e-2 – 6.6e-2, closed-shell factor ½ per spin 1.5e-1 – 1.6e-1, M-term on the total density 6.0e-2, α K in the β Fock 3.3e-1, f′ slope dropped 1.1e-1 (dense), kernel on J 2.6e-1 (dense), c_sr/c_lr swapped 1.4e-1 – 1.7e-1, plain Madelung strain 3.7e-1, v_M^LR strain dropped 2.5e-1, attenuated fit strain dropped 1.9e-1 (RS-GDF), its scale dropped 2.2e-1 (RS-GDF), W_RO cross term dropped 1.6e-1 (ROKS); smallest 6.0e-2 (≥ 3e6 Richardson bars). On the singlet the β-dropped and ½-factor defects move the stress by 7.5e-2 and the M-term spin defect by exactly 0; the equal-fraction anchor sees the spin defects (7.2e-2, 1.3e-1, 4.8e-2, 3.3e-1). Source mutants of KSpins::exch_terms (½ per spin; β dropped) fail the singlet and FD tests and pass the equal-fraction one (it shares the term list); a plain instead of mixed Madelung shift in the Fock rebuild is refused by the Fock guard in all 8 per-commit tests. Limits: H/STO-3G only (no p or d shells); the singlet anchor and the equal-fraction anchor share the term list / sandwich with their reference side, so FD is the spin-bookkeeping oracle; the HSE06 erf piece is nearly empty on TRI_A, hence the HSE-type cube rows; KS FD on three components (the atom grid's hard neighbour cutoff can step under strain, #495; none seen on these); wB97X accepted, not exercised; the Gamma ROKS RSH stress has no routed entry (kpoint_roks_stress on a 1×1×1 mesh); the Gamma routes on an RS-GDF exchange are the Gamma RS-GDF row below; wired to Python (k-point and Gamma UKS) and the CLI (k-point) by #498, the open-shell RSH bindings row | pbc_kuks_rsh_stress.rs, validation_kuks_rsh_stress.rs, validation_pbc_kuxcstress_ro_rsgdf.rs |
Periodic Gamma-point range-separated hybrid nuclear forces (RKS, UKS, ROKS) and stress (RKS, UKS) on RS-GDF J/K (CAM-B3LYP; gamma_rsh::gamma_rks_rsh_gradient / gamma_uks_rsh_gradient / gamma_roks_rsh_gradient / gamma_rks_rsh_stress / gamma_uks_rsh_stress handed a GammaRshExchange::build_rsgdf exchange). A routing change, no new derivative: the Gamma result goes to the 1x1x1 k-point force / stress with the k = 0 KRsGdf::build_rsh fit the SCF's exchange ran on (its config and aux are now kept with it); the routed Fock guard requires the Gamma J to be that fit's J | H2 (closed shell) and H3 doublet (open shell) / STO-3G in TRI_A, ET-sp aux, RS-GDF split ω₀ = 1, metric cut 1e-6, SSF (20, 50) atom grid | Gamma == an INDEPENDENT 1x1x1 k SCF + force / stress (own hcore, J, grid, SCF); central FD of ferric's own Gamma RS-GDF energy (fresh fits + SCF per point, forces and strained cells); Gamma RS-GDF − Gamma dense-AFT RSH force against the PBE0 1x1x1 RS-GDF − dense force gap; a dense Gamma J under an RS-GDF exchange (and the reverse) must be refused. No PySCF oracle (no RS-GDF derivatives, no hybrid stress) | Gamma − 1x1x1: force 4.4e-16 (RKS), 1.9e-14 (UKS), 1.1e-14 (ROKS) under ewald, 0 / 1.0e-13 / 1.2e-14 under none; dE/dε 1.8e-15 / 0 (RKS), 1.4e-14 (UKS, H3 doublet, ewald); the routed Fock guard ≤ 5.6e-16 (the two SCFs reach the same density to roundoff on these cells, so this is a GLUE check). FD force (per commit, two components): RKS 2.9e-9 / 5.5e-11 at h = 1e-4; UKS / ROKS (three components) ≤ 3.9e-9 at h = 1e-4 → ≤ 7.5e-10 at 5e-5, Richardson ≤ 3.1e-10. FD stress (ε_zz, ε_xy, ε_yx): RKS (ewald and none) 7.0e-8 / 1.57e-8 at h = 4e-4 / 2e-4 (h²), Richardson ≤ 5.0e-9; UKS (ewald; | dE/dε_zz | ≈ 1.3) 4.0e-7 / 1.0e-7 on ε_zz (ratio 4.0), Richardson ≤ 1.6e-10; below h = 2e-4 the atom grid adds a ~7e-9 non-monotone floor that the dense-AFT Gamma route shows identically. Fit gap: CAM-B3LYP 1.77e-5 / 7.57e-5 / 7.58e-5 vs PBE0 1.71e-5 / 6.92e-5 / 6.93e-5 (ratios 1.03–1.09). Foreign J refused at a Fock mismatch of 4.5e-5–5.1e-5. An RS-GDF Gamma J on another fit than the exchange's (only the 1e-8 Fock guard ties them): metric cut 1e-8 is the same J (every plain-metric eigenvalue ≥ 5.3e-3; ΔE 0, force Δ 0, accepted), ω₀ = 0.9 is the same J to the integral precision (ΔE 6.7e-15, force Δ 2.8e-16, accepted), metric cut 1e-2 (drops 2 of 20; ΔE 1.5e-7, Fock Δ 1.26e-6) and an extra aux s shell (ΔE 4.1e-6, Fock Δ 5.4e-6) are refused; a fit change below the 1e-8 Fock bar would pass with a force error of that order (known limit, not constructed); an aux prepared on other centres is refused by the rebuilt-B check (‖B‖ mismatch 1.95e-4) |
Bindings of the open-shell range-separated hybrid derivatives and the Gamma RS-GDF ones (#498; HSE06, CAM-B3LYP): Python run_uks_kpts / run_roks_kpts with_gradient / with_stress and the CLI k-point task = "optimize" / [cell] stress = true for UKS and ROKS on dense-AFT and RS-GDF J/K; the Gamma ROKS force (gamma_rsh::gamma_roks_any_keep + gamma_roks_rsh_gradient; Python run_roks_gamma, CLI Gamma optimize) and the Gamma RKS / UKS force and stress on RS-GDF (Python run_rks_gamma / run_uks_gamma; the CLI Gamma optimize, no CLI Gamma stress by design); the Gamma UKS stress on either J/K (Python). The gate (kxcgrad::check_deriv_functional, dft::check_gamma_{rks,uks,roks}_request) accepts every validated RSH derivative and refuses by name wB97X and the Gamma ROKS stress (no library entry) | H3 doublet (UKS, ROKS) and H2 (RKS) / STO-3G, 4 Bohr cube, 1×1×2 Gamma-centred and the Gamma point, omega 0.8, XC 20×50, exxdiv ewald; RS-GDF cc-pVDZ-RI; a p-shell cell (STO-3G + one p shell, ζ = 1, 12 functions for H3, basis size asserted on both sides) for the k ROKS HSE06 force, the k UKS HSE06 stress and the k UKS CAM-B3LYP RS-GDF force; a three-step Gamma ROKS HSE06 optimization | the library at the same settings (CLI run_end record, bit for bit; Python against those CLI numbers, or for the Gamma UKS and RKS stress the library values printed by the validation file); central FD of the CLI's own energy (k ROKS HSE06 force, k UKS HSE06 σ_zz from a uniaxial strain); Python Gamma against its own 1×1×1 mesh | CLI = library bit for bit on all 15 CLI anchors (11 routes on H/STO-3G: k ROKS HSE06 / CAM-B3LYP-RS-GDF force, k UKS CAM-B3LYP RS-GDF force, Gamma ROKS CAM-B3LYP / HSE06-RS-GDF force, Gamma RKS HSE06 RS-GDF and UKS CAM-B3LYP RS-GDF force, k UKS HSE06 / CAM-B3LYP-RS-GDF and ROKS HSE06 / CAM-B3LYP-RS-GDF stress; 3 on the p-cell; the moved-geometry Gamma ROKS optimize); FD 6.6e-10 Ha/Bohr (force) and 7.5e-10 Ha/Bohr³ (σ_zz); Python − library on 7 force and 7 stress pins (Gamma RKS HSE06 RS-GDF stress included): energy ≤ 3.8e-15, dense force ≤ 2.3e-15, dense stress ≤ 7.5e-17, Gamma RS-GDF force ≤ 9.1e-15 / stress ≤ 2.4e-15, k RS-GDF force ≤ 3.8e-9 and stress ≤ 2.0e-10 (RS-GDF roundoff on the Python repr-Å vs the CLI 12-decimal xyz, as for the closed-shell RS-GDF row), Gamma − 1×1×1 1.2e-14 (ROKS force) / 1.7e-13 (UKS stress); siblings: HSE06 vs CAM-B3LYP 3.6e-3–5.2e-3 force, 7.6e-4–8.0e-4 stress; RS-GDF vs dense 6.0e-6–3.8e-5 force, 1.1e-7–3.7e-6 stress | bit-equal (CLI); 1e-7 (FD force), 1e-8 (FD stress); Python 1e-12 on every dense and Gamma pin, 1e-7 (k RS-GDF force) and 1e-8 (k RS-GDF stress), both below the RS-GDF − dense gaps; 1e-10 (Gamma − 1×1×1). Mutants (all killed): ROKS force handed a state with β = α density (Fock guard 1.27e-1), force × (1 + 1e-6) (FD alone: miss 3.7e-7), transposed or dropped CLI UKS stress, the Gamma ROKS route ignoring its kept exchange, the gate accepting every RSH (wB97X runs), the Python Gamma UKS / RKS stress transposed (2.7e-4 / 1.4e-4). Limits: the fixtures are H only (s and p shells; no d shells or heavy atoms for these routes, #561 covers those for the earlier ones); no Gamma ROKS RSH stress | periodic_open_rsh_derivs.rs, validation_periodic_open_rsh_derivs.rs, test_pbc_rsh_open_mgga_derivs.py |
| Periodic derivative BINDINGS with p, d and Li shells (CLI and Python vs the library): closed-shell RSH force (k-point HSE06, Gamma CAM-B3LYP), k-point RKS HSE06 stress, k-point UKS SCAN force and SCAN/r2SCAN stress, k-point UKS HSE06 force, Gamma UKS CAM-B3LYP force | H2 / H3 cells with STO-3G + one p shell (ζ = 1), the same + one pure d shell, LiH and the LiH2 doublet / STO-3G; dense AFT, exxdiv ewald | The library at the same settings (CLI and Python must be bit-equal), and a central FD of the code's own energy along a generic direction (force) or per strain component (stress) | CLI = library bit for bit on all 14 rows; FD misses 3.2e-11 to 2.0e-8 on p, d and Li (the H-cell floor); Python binding − CLI ≤ 1.6e-15 on the seven p-shell rows it compares (five force, two stress); the d-shell and Li Python tests are FD-only. Mutation: dropping the p lowering term of the x-derivative (pair_ft/residues.rs) misses FD by 8.5e-6 to 2.6e-4 (stress 6.3e-6 to 1.1e-4), which the s-only H anchors and the Gamma-vs-1×1×1 check cannot see | Bit-equal; FD 5e-8 (Rust per commit, Gamma RKS CAM-B3LYP force), Python force 1e-8, stress 1e-7. Limits: the per-commit gate is 2 bit-equal anchors and 1 FD anchor; the rest is the validation tier (~70 min CI) and the nightly Python job. No d shell on a heavy atom (dense-AFT cost) | periodic_heavy_anchors.rs, validation_periodic_heavy_anchors.rs, test_pbc_heavy_anchors.py |
Periodic open-shell k-point UKS with the pure meta-GGAs SCAN and r2SCAN (energy only; dense-AFT J/K; library solve_kuks, Python run_uks_kpts and the CLI UKS route) | H3 doublet (cubic, 4 Bohr) and H4 triplet (triclinic) / STO-3G, meshes 1×1×1 and 1×1×2 (singlet anchors also 1×1×3, 2×2×2) | PySCF 2.13.1 pbc.dft.KUKS + AFTDF, UniformGrids 61³, cell.precision 1e-12 (8 polarized pins); singlet k-UKS against k-RKS and gamma_rks; polarized k-mesh against the explicit supercell; V_σ against a finite difference of E_xc per spin | ≤ 7.4e-13 Ha vs PySCF; singlet k-UKS = k-RKS exactly (0 on every case), 1×1×1 = gamma_rks to 2.7e-15; k-mesh = supercell / N to 8e-14; V_σ vs FD ≤ 1.2e-8 relative | 1e-9; 1e-10; 1e-8; 2e-7 relative. Tau mutants (swapped τ_α/τ_β, dropped β V^τ, total τ in both channels, spin-summed evaluator) miss the pins by ≥ 2.0e-5 Ha (the energy is only second order in a dropped β V^τ); the FD check fails under swapped and dropped-β V^τ by ≥ 5.5e-4 relative. CLI: the UKS energy (H3 doublet, Gamma-centred and Monkhorst-Pack 1×1×2) equals solve_kuks to 1e-12 (measured 0). Limits: forces and stress are the "k-point UKS analytic forces and stress" row further down, k-ROKS in its own row below, RS-GDF in its own row below, no meta-GGA hybrids or TPSS; the Gamma-point UKS / ROKS meta-GGA energy is the next row (library only); no level shift was needed, but only on these 3 to 4 orbital minimal-basis cells; the singlet anchor shares chunk_tau between both sides | validation_pbc_kuks_mgga.rs, pbc_kuks_mgga.rs, gen_pyscf_kuks_mgga_refs.py, periodic_kpoint_open_shell.rs, validation_periodic_kpoint_open_shell.rs, validation_pbc_kuks.rs |
Periodic Gamma-point open-shell meta-GGA energy, UKS and ROKS, SCAN and r2SCAN (library dft::gamma_uks / rohf::gamma_roks, dense-AFT J; per-spin τ_σ from D_σ via ferric-dft's eval_tau_uks into the unchanged polarized kernel, wiring only). Wired to Python run_uks_gamma / run_roks_gamma and the CLI Gamma UKS / ROKS routes by #498 (dense-AFT J/K only; the RS-GDF J/K refused by name before any integral; CLI energy equals the library bit for bit, crates/ferric-cli/tests/periodic_open_mgga_energy.rs, UKS SCAN and ROKS r2SCAN with a p shell on every H); its force and stress refuse it by name | H3 doublet (cubic, 4 Bohr) / STO-3G (⟨S²⟩ 0.7527); singlets H2 (cubic, 4 Bohr) and H4 (triclinic) | the k-point UKS on a 1×1×1 mesh (complex Bloch AOs, independent τ construction, same atom grid); Gamma RKS for the singlets; PySCF 2.13.1 Gamma pbc.dft.UKS / pbc.dft.ROKS + AFTDF, UniformGrids 61³, cell.precision 1e-12 (4 pins; the PySCF Gamma UKS SCAN reproduces the existing KUKS 1×1×1 pin to 1.1e-13); V_σ against a central FD of E_xc along each spin's HOMO→LUMO rotation | Gamma UKS = 1×1×1 k-UKS to 2.0e-15 Ha (E_xc 6.2e-12); singlet UKS / ROKS = RKS to 1.8e-15; ≤ 2.9e-13 Ha vs PySCF (UKS and ROKS, SCAN and r2SCAN); V_σ vs FD ≤ 6.1e-9 relative (h = 2e-5, scales as h²) | 1e-10; 1e-10; 1e-9; 1e-7 relative. Tau mutants (τ_β from D_α, τ omitted, swapped τ, dropped β V^τ) miss the 1×1×1 anchor by ≥ 2.0e-5 Ha and the PySCF UKS / ROKS pins by ≥ 1.2e-5 Ha (dropped β V^τ is second order in the energy); the FD check fails under swapped τ and dropped β V^τ by ≥ 0.26 relative; the singlet anchors are blind to all of them by construction. Limits: energy only (no Gamma open-shell meta-GGA force or stress), dense-AFT J only (RS-GDF J/K refused by name), ROKS with the DIIS solver only (the second-order solver, whose XC Hessian is a finite difference along an arbitrary ΔD, refused by name), SCAN / r2SCAN only (TPSS refused), one 3-orbital minimal-basis cell. The β channel holds ONE orbital, so τ_β = τ_W,β exactly and an arbitrary ΔD_β meets SCAN's clamped iso-orbital kink (measured 7.95e-2 relative FD miss); the FD therefore uses an idempotent rotation | pbc_gamma_open_mgga.rs, validation_pbc_gamma_open_mgga.rs, gen_pyscf_gamma_open_mgga_refs.py, validation_pbc_rohf.rs |
| Periodic k-point RKS (PBE, PBE0) on an all-electron cell with a 1s core (LiH, no ECP) and on a 2×2×1 mesh | LiH (triclinic-ish cell, a = 5, 5, 6 Bohr with a 0.4/0.3 tilt) / PySCF STO-3G, Gamma PBE; H2 (cubic, 4 Bohr) / STO-3G, 2×2×1 Gamma-centred and shifted, PBE and PBE0, plus an orthorhombic 4.0 × 4.4 × 4.0 cell (PBE) | PySCF pbc.dft.KRKS + AFTDF, cell.precision 1e-10; LiH on a 35³ XC grid with an 80³ J mesh, H2 on 31³ | LiH Gamma PBE: ferric − PySCF = −6.5e-9 Ha; H2 2×2×1: ≤ 2.1e-12 Ha (4 cubic rows; orthorhombic rows see the run) | LiH bar 1e-7, 2×2×1 bar 1e-7. Sensitivities (ferric against ferric; no PySCF pin behind the LiH ones): dropping exxdiv moves LiH PBE0 by 2.6e-1 Ha and H2 2×2×1 PBE0 by 9.2e-2 Ha; dropping the mesh shift moves LiH PBE by 3.3e-3 Ha (thresholds 1e-3). Limits: PySCF's default AFT J mesh (35³) is 4.8e-3 Ha off for the Li 1s density (55³ 2.2e-5, 80³ 6.5e-9 from ferric), so the LiH pin requires the 80³ J mesh and only one LiH row exists (no shifted or PBE0 pin); no cell heavier than Li; the cubic H2 cell is a↔b symmetric, so an a↔b swap is seen only by the orthorhombic 4.0 × 4.4 × 4.0 PBE rows; the open-shell UKS pins in pbc_kuks.rs stay at 61³ (issue #356 item not met: ferric at 31³ misses the 61³ PBE triplet pin by 3.8e-8 Ha, over its 1e-8 bar; the 3.8e-8 at 31³ does not fit the earlier record that 40³ was 1.2e-5 off (non-monotone in mesh size; not reconciled: the 40³ run is not on record and the two may differ in system and functional); a same-grid PySCF 31³ LDA re-pin converged to another SCF state) | validation_pbc_kks_core.rs, pbc_krks_2x2x1.rs, gen_pyscf_kks_core_refs.py, gen_pyscf_kks_h2_31_refs.py |
Periodic open-shell k-point UKS analytic forces and stress with the pure meta-GGAs SCAN and r2SCAN (library kpoint_uks_gradient / kpoint_uks_stress, dense-AFT J/K only; wired to Python run_uks_kpts and the CLI by #498: CLI force and stress equal the library bit for bit (SCAN / r2SCAN optimize, H3 1×1×2; stress SCAN Gamma-centred, r2SCAN Monkhorst-Pack), Python vs library force ≤ 5.6e-17, Python force vs FD of its own energies 7.6e-10 / 3.8e-10): the per-spin tau terms (v_τσ with D_σ in the AO-derivative and strain moments, the closed-shell tau kernels reused per spin; V^τ_σ in the Pulay Fock and the Fock guard) | H3 doublet (cubic, 4 Bohr; 1×1×3 non-TRIM and 1×1×2) and H4 triplet (triclinic, 1×1×2) / STO-3G; H2 singlet 1×1×3; atom grid 20×50 (neighbour cutoff 14 Bohr) and uniform 61³ | singlet k-UKS vs k-RKS per part; fixed-density XC part vs central FD of the polarized E_xc (no SCF) on every component with an h sweep; FD of ferric's own converged energy (every force component, all nine strain components, h sweep); 1×1×3 vs the explicit 3-cell supercell (multiplicity 4); PySCF 2.13.1 pbc.grad.kuks_stress (FFTDF + UniformGrids 61³, its k-point UKS force refuses meta-GGA, so the force has no external pin) | singlet = RKS to 8.9e-16; PBE through the tau path = PBE exactly; fixed-D XC force 6.5e-10 (h 1e-4) → 7.8e-11 (h 2.5e-5, falling to the roundoff floor of the fixed-density energy, not h²-limited), XC stress 5.5e-8 → 3.5e-9 (the h² stencil, 4x per halving); force vs SCF FD (9 components, H3) 8.4e-9 / 2.0e-9 / 7.7e-10 at h = 2e-4 / 1e-4 / 5e-5, H4 triplet (12) 8.9e-9; dE/dε vs SCF FD (9, H3) 6.4e-8 / 1.5e-8 / 5.3e-9 at h = 1e-4 / 5e-5 / 2.5e-5, H4 triplet 3.5e-8; supercell force per part ≤ 1.1e-13, σ ≤ 1.8e-14; σ vs PySCF 5.8e-11 / 7.7e-11 Ha/Bohr³ (SCAN / r2SCAN; 3.7e-9 / 4.9e-9 Ha per 64 Bohr³ cell), of which the fixed-density XC part accounts for essentially all (XC part vs PySCF get_vxc 3.7e-9 / 5.1e-9 Ha); PySCF's own analytic σ vs central FD of its own strained energy (h = 1e-4, --fd) 1.3e-9 / 1.4e-9 Ha/Bohr³, run-to-run PySCF reproducibility ≤ 7e-13 | 1e-11; exact; 1e-7; 1e-7 (stress asserted at the smallest h, plus a > 2.5x fall per halving from h = 1e-4); 1e-9 / 1e-10; 1e-9 Ha/Bohr³ (σ), 1e-7 Ha (XC part). Spin/tau mutants on the polarized cell (swapped τ_α/τ_β, dropped β tau term, total τ in both libxc channels, dropped β V^τ, all spin kernels swapped, spin-averaged form, tau term dropped, doubled or with transposed strain indices) miss the FD anchors by 6.8e-4 to 9.9e-2 and PySCF by ≥ 1.9e-4; every spin mutant is invisible in the singlet anchor. Limits: H-only minimal-basis cells, no p/d shells, no ECP or heavy atom, SCAN's α ≈ 1 region not reached, RS-GDF J/K in the next row, the ROKS meta-GGA energy, force and stress are their own row below, the (75, 302) production grid not FD-checked | validation_pbc_kuxc_mgga.rs, pbc_kuxc_mgga.rs, gen_pyscf_kuks_mgga_stress_refs.py, validation_periodic_rsh_open_mgga_derivs.rs, validation_pbc_kuxcstress.rs |
Periodic open-shell k-point UKS SCAN / r2SCAN on the RS-GDF J/K: energy, analytic force and stress (library solve_kuks with jk = rsgdf, kpoint_uks_gradient / kpoint_uks_stress with KGradJk::RsGdf / KStressJk::RsGdf; issue #492; the energy is wired to Python run_uks_kpts(jk="rsgdf") and the CLI UKS route by #498, CLI equal to the library bit for bit, periodic_open_mgga_energy.rs; the force and stress are not wired, the bindings' derivative gate refuses them on RS-GDF) | H3 doublet in the cubic 4 Bohr cell: one s per H (alpha 0.5) with the exact pair-midpoint aux (energy), STO-3G with an even-tempered s+p aux (derivatives); H2 singlet; 1×1×1 and 1×1×3; uniform 32³ / 24³ and atom 20×50 (cutoff 14 Bohr) grids | exactness anchor: exact-aux RS-GDF energy vs dense-AFT (incomplete-aux negative control); PySCF 2.13.1 pbc.dft.KUKS FFTDF + UniformGrids 32³ at that exact-aux limit; singlet UKS vs RKS on RS-GDF (energy, force, stress); FD of the converged RS-GDF SCF energy on all 9 force and all 9 strain components (weekly; one polarized strain component plus the translation sum per commit) | anchor ≤ 2.1e-13 Ha; vs PySCF ≤ 1.5e-13 Ha (4 pins); singlet ≤ 2.6e-15; force vs FD 2.0e-9 / 1.9e-9 (SCAN / r2SCAN, h = 1e-4); dE/dε vs FD 7.8e-8 / 5.8e-8 (h = 1e-4, the h² stencil) | 1e-10; 1e-9; 1e-10; 1e-7 (force), 5e-7 (stress). Spin/tau mutants and a one-spin Coulomb in the (route-independent) Pulay Fock miss the pin by ≥ 3.0e-5 Ha and the FD by ≥ 2.1e-3; the singlet anchor catches every asymmetric derivative defect (≥ 2.4e-3) but not the α/β swap (1.4e-15); a source mutant (τ_β from D_α) misses the pin by 4.1e-2 while the anchor and the singlet stay green. Limits: no PySCF force/stress pin (PySCF has no k-UKS meta-GGA force, and the k-point RS-GDF derivative needs atom-centred aux, so the exact-aux construction is energy-only); H-only minimal-basis cells; the closed-shell "RS-GDF − dense transfers from PBE" check holds only to ~12% on the polarized cell and is not used | validation_pbc_kuks_mgga_rsgdf.rs, pbc_kuks_mgga_rsgdf.rs, gen_pyscf_kuks_mgga_rsgdf_refs.py |
Periodic restricted open-shell k-point ROKS with the pure meta-GGAs SCAN and r2SCAN: energy, analytic force and stress (dense-AFT J/K, the RS-GDF J/K refused by name in the SCF; library solve_kroks, kpoint_roks_gradient, kpoint_roks_stress, issue #492; the energy is wired to Python run_roks_kpts and the CLI ROKS route by #498, CLI equal to the library bit for bit for SCAN with a p shell on every H and r2SCAN / STO-3G, crates/ferric-cli/tests/periodic_open_mgga_energy.rs; the force and stress are not wired, the bindings' derivative gate refuses them by name). The k-ROKS SCF runs on the k-UKS per-spin-tau evaluator KPeriodicXcPolarized (its own tau-less duplicate deleted); the force and stress are the k-UKS meta-GGA assembly on the ROHF spin densities with W_RO = sym(D_α F_α D_α + D_α F_β D_β) from the rebuilt spin Focks (which carry V^τ_σ). No new formula: wiring, plus lifting the derivative refusal | H3 doublet (N_α = 2, N_β = 1) in the cubic 4 Bohr cell, one s per H (α 0.5), uniform 32³; H2 singlet (one s per H) and H2 triplet (two s per H, exponents 0.8 / 0.3, N_β = 0); meshes 1×1×1 and 1×1×3 (complex Bloch AOs) | Energy: singlet k-ROKS against k-RKS (unpolarized kernel, total τ); polarized H3 doublet (STO-3G, atom grid 40×110) 1×1×1 k-ROKS against Gamma ROKS (eval_tau_uks on real AOs vs chunk_tau on Bloch AOs, pbc_gamma_open_mgga.rs); fully polarized (N_β = 0) k-ROKS against k-UKS (the ROHF and UHF spaces coincide); PySCF 2.13.1 pbc.dft.KROKS (its veff is its KUKS one on the ROHF occupations) + FFTDF 40³, UniformGrids 32³, nelec = (2 N_k, N_k). Force and stress (no external pin: PySCF has no k-point ROKS gradient and its KUKS force refuses meta-GGA): singlet k-ROKS vs k-RKS and fully polarized (N_β = 0) k-ROKS vs k-UKS per part (independent SCFs); every force and strain component on the H3 doublet 1×1×3 against the central FD of ferric's own converged k-ROKS energy (force h = 1e-4 / 5e-5; stress Richardson-extrapolated from h = 5e-5 and 2.5e-5, the diagonal strains carrying an h² stencil error of ~3e-8 at 5e-5, its ≥ 2.5× fall per halving asserted); the 1×1×1 k-ROKS SCAN force and stress against the central FD of the Gamma-point ROKS energy (real AOs, eval_tau_uks, its own SCF; the two energies are asserted equal to 1e-10 at the base geometry and at the 18 strained geometries of h = 5e-5; measured 2.2e-16 and ≤ 1.6e-14) | singlet ≤ 2.2e-16 (E_xc ≤ 1.1e-16); 1×1×1 vs Gamma ROKS 3.6e-15 / 5.6e-15 (SCAN / r2SCAN; E_xc ≤ 8.2e-15), Gamma-side τ mutants miss it by ≥ 1.2e-5 and k-side τ_β-from-D_α / swapped V^xc by 4.3e-2 / 2.3e-4; fully polarized ≤ 8.8e-15 (E_xc ≤ 2.6e-13); vs PySCF ≤ 5.4e-14 Ha on 4 pins, ⟨S²⟩ = 3.75 at 1×1×3; ROKS lies 1.4e-4 to 1.2e-3 Ha above PySCF KUKS on the same setup. Force / stress: singlet per part ≤ 4.4e-16 / 7.8e-16 (SCAN / r2SCAN), fully polarized ≤ 1.9e-12 / 5.5e-14; vs FD of the own energy (9 + 9 components, orbital gradient ≤ 1.5e-11) force 2.3e-9 → 8.5e-10 (SCAN, h = 1e-4 → 5e-5), 7.4e-10 (r2SCAN), dE/dε 7.3e-10 / 8.4e-10 (Richardson; raw 3.2e-8 / 2.7e-8 at h = 5e-5); vs FD of the Gamma ROKS SCAN energy force 7.4e-10, dE/dε 6.4e-10; per commit, one diagonal strain (1,1) raw at h = 5e-5: 3.2e-8 (bar 1e-7; the grid-weight volume term dropped misses it by 1.2) | 1e-10; 1e-9; 1e-9 (energy); 1e-11 (anchors), 1e-8 (FD). Derivative mutants (test hooks, against the polarized FD, SCAN / r2SCAN): v_τα ↔ v_τβ swapped 5.1e-3 / 4.9e-3 (force), 3.4e-2 / 3.5e-2 (stress); β tau term dropped 6.8e-3 / 7.3e-3, 3.3e-2 / 3.5e-2; total τ in both libxc channels 6.0e-3 / 5.3e-3, 3.3e-2 / 3.4e-2; W_RO cross term dropped 5.6e-2, 3.5e-1; tau term dropped or doubled 1.4e-2 / 1.5e-2, 7.1e-2 / 7.4e-2; V^τ dropped from the Pulay Fock with the guard and the ROHF gate off 2.0e-2 / 2.2e-2, 3.4e-2 / 3.7e-2; β V^τ dropped (guard off, gate on) is REFUSED by the ROHF orbital-gradient gate (g = 4.5e-3 / 4.6e-3, evaluated on the rebuilt Focks); the unrestricted-form W is an identity at convergence (≤ 8.5e-10); transposed tau strain indices are invisible on the symmetric uniform-grid stress (≤ 8.4e-10; caught on the atom grid of the UKS row). Reach: the singlet anchor is blind to the τ swap only, the fully polarized one to the β tau term, β V^τ and the cross term. Energy mutants (test hooks): τ_β from D_α misses the pins by ≥ 3.3e-2 (singlet blind, 2.2e-16; fully polarized: SCF does not converge); τ dropped from the kernel input ≥ 3.1e-2 and fails both anchors (≥ 1.5e-2); V^xc_α / V^xc_β swapped between the Roothaan spin Focks ≥ 1.6e-4 (singlet blind; fully polarized anchor 1.8e-2); bare α Fock diagonalised ≥ 9.7e-4 (both anchors blind). Source mutants (edited, run, reverted): τ_β from D_α in the shared evaluator misses the SCAN 1×1×3 pin by 3.3e-2 (singlet green); a Roothaan coupling term P_o†F_βP_c → P_o†F_αP_c misses it by 1.3e-3 (both anchors green); widening the ROKS gate to TPSS fails kroks_refuses_unvalidated_meta_gga. Limits: the derivatives are FD-checked on the uniform 32³ grid only (no grid response; the atom-grid response is the k-UKS one, validated in the UKS row); no external derivative pin; the Gamma-point ROKS meta-GGA force and stress still refuse; RS-GDF J/K refused by name in the SCF (no pin; removing the refusal lets the library run it, mutation-tested) and, defensively, in the ROKS meta-GGA force and stress (kroks_meta_gga_derivatives_refuse_rsgdf, mutation-tested); TPSS refused; H-only minimal-basis cells | validation_pbc_kroks_mgga.rs, pbc_kroks_mgga.rs, gen_pyscf_kroks_mgga_refs.py, pbc_gamma_open_mgga.rs |
| Periodic closed-shell meta-GGA energy, TPSS (k-point RKS and Gamma-point RKS; its forces and stress are the next row), and SCAN / r2SCAN / TPSS on the RS-GDF J/K | H4 / STO-3G triclinic cell (two occupied orbitals, so SCAN, r2SCAN and TPSS all differ), meshes 1×1×1 and 1×1×2 and the single Gamma point; RS-GDF: H2 / STO-3G (4 Bohr cube) at 1×1×1 and 1×1×3, aux cc-pVDZ-RI and def2-universal-jkfit, and H2 with one s per H plus the 24 pair-midpoint aux s functions (the exact-fit anchor) | PySCF 2.13.1 pbc.dft.KRKS and pbc.dft.RKS (TPSS = MGGA_X_TPSS + MGGA_C_TPSS) + AFTDF, UniformGrids 61³, exxdiv ewald, cell.precision 1e-13; RS-GDF: ferric's dense-AFT J/K on the same grid, with the fixed-density Coulomb fit error E_J^fit(D) − E_J^dense(D) at the dense SCF density as the oracle | TPSS ≤ 2.5e-13 Ha vs PySCF (Gamma 2.4e-13, 1×1×1 2.5e-13, 1×1×2 1.6e-14); 1×1×1 = gamma_rks to 4.9e-15; V_xc vs FD of E_xc 2.5e-7 (1.1e-7 relative). RS-GDF: exact-fit anchor 3.4e-14 Ha; gap minus fixed-density fit error ≤ 1.7e-15 at 1×1×1, −8.8e-8 (1.1e-3 of the fit) at 1×1×3 cc-pVDZ-RI, −3.5e-10 with def2-universal-jkfit | 1e-9; 1e-8; 1e-6 relative; RS-GDF anchor 1e-10, relaxation term non-positive and < 1e-2 of the fit. TPSS is 1.4e-2 Ha from SCAN on this cell (asserted). The incomplete-aux anchor control misses by ≥ 2.3e-4 Ha. Mutants: TPSS mapped to the SCAN pair misses the pins by 1.4e-2 Ha; V^tau zeroed misses by 2.4e-5 Ha (1×1×1); V^tau zeroed on the RS-GDF route only moves the exact-fit anchor by 6.5e-5 Ha (the symmetric 1×1×1 H2 fit cases are blind to it). Limits: open-shell TPSS not validated; no meta-GGA hybrids; minimal-basis cells only. The PBE (plain-functional) RS-GDF gap matches the meta-GGA gap exactly only at 1×1×1, where the density is fixed by symmetry; at 1×1×3 it is 4 to 10 % off (the fit error of a different density) | pbc_krks.rs, pbc_krks_mgga_rsgdf.rs, gen_pyscf_pbc_tpss_refs.py, validation_pbc_krks.rs |
Periodic closed-shell meta-GGA forces and stress: TPSS on a k-point mesh (kpoint_rks_gradient / kpoint_rks_stress, dense-AFT J; Python run_rks_kpts with_gradient / with_stress, CLI k-point optimize and [cell] stress), and SCAN / r2SCAN / TPSS at the Gamma point routed through the 1×1×1 mesh (library gamma_mgga::gamma_rks_mgga_gradient / gamma_rks_mgga_stress, dense-AFT J; Python run_rks_gamma with_gradient / with_stress, CLI Gamma optimize) | H2 / STO-3G in the 4 Bohr cube ((20, 50) atom grid, 1×1×3 k-mesh and the Gamma point; uniform 24³ and 61³ grids at 1×1×2 / 1×1×3 for the stress); weekly: the two-orbital H4 / STO-3G triclinic cell at the Gamma point (SCAN, r2SCAN, TPSS) and at 1×1×2 (TPSS, 1.4e-2 Ha from SCAN), and the 3-cell supercell | PySCF 2.13.1 pbc.grad.krks_stress with xc = TPSS (FFTDF, UniformGrids 61³, 1×1×2, exxdiv ewald; PySCF's own analytic-vs-FD agreement 2.3e-10; PySCF's KRKS nuclear gradient raises NotImplementedError for every meta-GGA, so there is no PySCF force pin); central FD of ferric's own SCF energy (k-point TPSS; the Gamma SCF energy for the routed Gamma derivatives, an independent construction); the native Gamma force / stress for PBE through the same route; Gamma = 1×1×1; k-mesh = supercell | TPSS stress vs PySCF 7.5e-11 Ha/Bohr³; k-point TPSS force vs FD 2.7e-9 Ha/Bohr, dE/dε vs FD 1.1e-8; Gamma routed force vs FD of the Gamma energy 2.3e-9 (SCAN, r2SCAN, TPSS alike: the h² truncation of the bond-direction third derivative, 9.2e-9 at h = 2e-4), dE/dε 3.0e-8; routed PBE vs native Gamma force 1.3e-15, dE/dε 2.1e-14; Gamma vs 1×1×1 force ≤ 1.4e-16 (Fock guard ≤ 8.9e-16); weekly: H4 triclinic Gamma force vs FD 1.6e-10 / 5.1e-10 / 1.1e-9 (SCAN / r2SCAN / TPSS), k-point TPSS 3.0e-9, dE/dε 1.6e-8; TPSS 1×1×3 vs supercell force 1.2e-14, dE/dε 6.9e-13 | PySCF 1e-9; force FD 1e-7; k stress FD 5e-7; Gamma stress FD 3e-7; glue 1e-9. Mutants (miss vs the FD or pin): TPSS mapped to the SCAN pair in the libxc name table 7.8e-5 vs the PySCF stress pin (FD of ferric's own energy is BLIND to it, 2.5e-9; the per-commit force tests also fail it through the Fock guard and a SCAN-vs-TPSS gap of 1.6e-3 / 8.2e-3); tau AO term dropped / doubled ≥ 1.7e-2; tau left out of the point motion 3.5e-3 (k) / 4.1e-3 (Gamma); V^tau zeroed in the Pulay Fock 5.8e-3 (k) / 1.4e-3 (Gamma) force, 2.3e-2 / 3.0e-2 stress (with the guard on it is refused); grid weight response dropped ≥ 1.1e-1; tau strain dropped / doubled ≥ 3.0e-2; StressTauPath is an equivalent mutant on a meta-GGA (0, asserted). Refused (typed, asserted): an RS-GDF Gamma SCF (Fock guard, 9.5e-6 > 1e-8; the bindings refuse jk = rsgdf before the SCF), another grid or functional in the config, an open-shell result, range-separated functionals or kernels. Limits: closed shell only (open-shell and Gamma UKS/ROKS meta-GGA refused); on the one-orbital H2 cell SCAN and r2SCAN coincide exactly (α = 0 everywhere, 5.6e-17, asserted), so only the H4 rows separate them; TPSS and the Gamma route on the dense-AFT J only (the bindings refuse a TPSS force / stress and a Gamma meta-GGA force / stress on jk = "rsgdf" by name, before the SCF); minimal-basis H cells; the 1×1×1 kernels cost 32 nao⁴ bytes on top of the Gamma ERI | pbc_gamma_mgga_derivs.rs, validation_pbc_mgga_derivs.rs, pbc_kxcgrad_mgga.rs, pbc_kxcstress_mgga.rs, gen_pyscf_kks_stress_refs.py, periodic_kpoint_ks_optimize.rs, periodic_kpoint_stress.rs, validation_periodic_kpoint_ks_optimize.rs, validation_pbc_kxcstress_mgga.rs |
Periodic XC grid neighbour switch (PeriodicGridConfig::neighbour_switch W, CLI [cell] neighbour_switch; default 0 = the hard image cutoff, bit-identical): a quintic taper of each image atom's presence over [D − W, D] in the SSF/Becke partition, with its derivative in the Gamma and k-point KS force and stress | H2/STO-3G, cubic 4 Bohr, PBE, atom grid (20, 50), D = 10 Bohr, W = 2 Bohr, dense AFT, Gamma and 1×1×3; kernel: a mixed Li/H/C cluster (SSF and Becke); grid level: Li–H cell, (12, 26), D = 6.5, W = 1.5 (SSF and Becke), plus a sparse 9 Bohr Li–H cell at D = bound + W (Becke) | central FD of ferric's own SCF energy at h = 1e-4 and 5e-5 (6 force, 9 strain components), hard vs switched; dense scans (61 points, step 1e-4) of ε_11 and an H x-coordinate, fourth differences; kernel vs FD and vs the unswitched kernel; grid functional Σ W F vs fourth-order FD under displacement and strain | switched: force vs FD 2.7e-9 (k) / 2.3e-9 (Gamma), stress 2.5e-8 / 2.9e-8 at h = 1e-4, 5.9e-9 / 7.1e-9 at 5e-5 (h²); hard on the same cells: stress 2.0e-6 / 2.9e-6 at h = 1e-4 (a straddled jump). Scans: hard max | Δ⁴E | 6.7e-7 (strain) / 4.8e-8 (displacement), largest single-step jump ~2.2e-7 / 1.6e-8 Ha; switched 2.4e-13 / 7.6e-14. Energy vs hard D = 20 (Gamma): hard D = 10 +3.9e-6, D = 12 −4.8e-8; switched (D, W = 2) = (10) +1.1e-5, (12) +1.7e-7, (14) −3.8e-9, each between the hard energies at D − W and D (asserted). Grid build (Li–H, (75, 302), 3 threads): hard D = 10 0.29 s, switched D = 10 / W = 2 0.46 s, automatic D = 12 / W = 2 0.87 s. Kernel: all-present limit = unswitched to 1e-14; derivative vs FD 2.6e-10; grid functional force / stress vs FD 2.3e-10 |
Periodic XC grid neighbour switch on the open-shell, meta-GGA and RSH derivative paths (#495), and the Python neighbour_switch keyword | Gamma UKS / ROKS PBE (native grad.rs / stress.rs), k UKS / ROKS PBE 1×1×2 (kuxcgrad / kuxcstress), Gamma RKS SCAN (1×1×1 route), k UKS SCAN 1×1×1, Gamma RKS CAM-B3LYP force + stress, Gamma UKS / ROKS CAM-B3LYP force (1×1×1 route); H2 / H3 doublet STO-3G, cubic 4 Bohr, (20, 50), D = 10, W = 2 Bohr, exxdiv none, dense AFT. Python: the six KS bindings on H2 / H3 | W = 1e-9 against the hard cutoff (exactness anchor, against the unswitched kernel); central FD of ferric's own switched SCF energy (all force and nine strain components) at h = 1e-4, 5e-5 and their Richardson combination. Python: automatic cutoff with W = explicit 10 Bohr + W (the library adds W, so the Å → Bohr conversion is visible), the Gamma energy shift E(W) − E(hard) against the library's, Gamma = 1×1×1 mesh with the switch, refusals | anchor ≤ 7.9e-15 on every path; force vs FD ≤ 4.8e-9 (h = 1e-4), Richardson ≤ 9.9e-10 (the force sits at the ~1e-9 SCF noise floor, not h²-limited); stress vs FD ≤ 3.3e-7 at h = 1e-4 (k UKS SCAN), falling ≈3.7–4.4× per halving on every row, Richardson ≤ 2.5e-9. Python: cutoff identity < 1e-12, shift +7.237e-6 vs library +7.236e-6, Gamma − 1×1×1 < 1e-10 | anchor 1e-12; force 1e-7 (h = 1e-4); stress 1e-6 (h = 1e-4; the H3 cells' h² truncation is 3× #504's); Richardson 2e-8; Python shift 2e-8. Mutants: dropped image presence derivative misses on all nine paths by 1.7e-6–4.0e-6 (force) and 2.7e-5–5.5e-5 (stress), the same at every h; 1 − f s cell factor fails every anchor (≥ 0.37 Ha); binding unit slip and dropped W fail 7 and 10 of the 36 Python tests. Limits: H-only cells, minimal basis, one W, (20, 50) only; the open-shell RSH stress was not a library path when this row was measured (it landed later, library only, with its own row; the binding gates still refuse it by name); ROKS meta-GGA has no SCF; Python is compared with the library through the shift and the cutoff identity, not bit for bit (cdylib, no Rust harness) | validation_pbc_grid_switch_paths.rs, test_pbc_neighbour_switch.py |
Periodic restricted open-shell range-separated hybrids (ROKS: HSE06, CAM-B3LYP; energy only) at the Gamma point (gamma_roks_rsh) and on a k-mesh (solve_kroks), dense AFT and RS-GDF | The UKS row's cells: H3 doublet and H4 triplet / STO-3G, triclinic, Gamma and 1×1×2 (and 1×1×1), exxdiv ewald and none | PySCF 2.13.1 pbc.dft.ROKS / KROKS + AFTDF (mf.nelec = (N_a N_k, N_b N_k); every row converged in PySCF), 11 energies read from the committed JSON; closed-shell limit against RKS (dense: H2 and an H4 singlet with SCF freedom; RS-GDF: only H2, cubic a = 4 Bohr, HSE06, 1×1×1, where HSE06's erf part is empty, pbc_krsh_rsgdf.rs); 1×1×1 = Gamma; 1×1×2 mesh = 6-atom supercell / 2; E(ROKS) ≥ E(UKS) on the 9 rows with both PySCF pins (sanity, not a bar) | ≤ 4.4e-13 Ha vs PySCF; ROKS − RKS ≤ 4.0e-15; 1×1×1 − Gamma 0.0; mesh − supercell/2 ≤ 1.7e-14; ROKS − UKS +5.1e-6 to +3.1e-3; RS-GDF − dense 0.92–1.84 × the PBE0 UKS plain-Coulomb fit error | 1e-11; 1e-11; 1e-11; 1e-10; ROKS − UKS sign only; RS-GDF < 5 × the fit error. Mutants on the polarized CAM-B3LYP H3 cell moved E by ≥ 7.4e-4: α K on the β Fock 1.2e-2, β K dropped 1.5e-1, halved Madelung 2.2e-1, plain instead of mixed Madelung 5.0e-1, attenuated K scaled by c_sr 3.9e-1, bare α Fock instead of Roothaan 7.4e-4 (α-on-β and bare-α are 0.0 in the closed-shell limit); source mutants (plain Madelung at Gamma, unattenuated K at Gamma, k-point dense J/K built without the attenuation) moved the pins by 0.21–0.75. Limits: as the UKS row (the G ≠ 0 erf kernel is live only for CAM-B3LYP on this cell; the kernel is shared with RKS/UKS, so only PySCF is independent of it; H/STO-3G only; wB97X is accepted but no test runs ROKS with it); bindings (#498): Python run_roks_kpts / run_roks_gamma and the CLI ROKS route (gamma_rsh::gamma_roks_any, solve_kroks); the CLI energy equals the library bit for bit (k-mesh HSE06 and Gamma CAM-B3LYP, H3 doublet, cubic 4 Bohr), Python vs library 4.8e-14 / 7.1e-14 (bar 1e-12), PBE0 / B3LYP siblings 2.5e-4 / 2.5e-2 away; no range_split (the ROKS force and the open-shell stress have their own rows, wired by #498) | pbc_roks_rsh.rs, validation_roks_rsh.rs, gen_pyscf_roks_rsh_refs.py |
| Periodic open-shell range-separated hybrids (UKS: HSE06, CAM-B3LYP; energy only) at the Gamma point and on a k-mesh, dense AFT and RS-GDF | H3 doublet and H4 triplet / STO-3G in a triclinic cell (polarized, non-degenerate: ⟨S²⟩ 0.753 and 2.000), Gamma and 1×1×2 (and 1×1×1), exxdiv ewald and none | PySCF 2.13.1 pbc.dft.UKS / KUKS + AFTDF (mf.nelec = (N_a N_k, N_b N_k)), 16 energies read from the committed JSON; closed-shell limit against RKS (H2 and an H4 singlet with SCF freedom); 1×1×1 = Gamma; 1×1×2 mesh = 6-atom supercell / 2 | ≤ 4.4e-13 Ha vs PySCF (PBE0 on the same cell 3.7e-13); UKS − RKS ≤ 4e-15 (H4 singlet) and 0.0 (H2, symmetry-fixed: tests the energy assembly only); 1×1×1 − Gamma 3.3e-15; mesh − supercell/2 ≤ 4.7e-15; RS-GDF − dense equals the plain-Coulomb fit error × 1.000 | 1e-11; 1e-11; 1e-11; 1e-10. Mutants on the polarized CAM-B3LYP cell at Gamma moved E by ≥ 1.1e-2 (α K on the β Fock, β K dropped, halved Madelung) and by 1.3e-3 to 2.5e-1 (ω ×1.01, ω ×0.01, c_lr := c_sr, c_sr ×0.99); on the 1×1×2 mesh by ≥ 1.9e-2 (also spin swap, unmixed Madelung, K from the total density). Only α-on-β and the spin swap are invisible in the closed-shell limit (2.2e-16). Limits: the attenuated G ≠ 0 kernel is exercised only by CAM-B3LYP (ω 0.33; for HSE06, ω 0.11, the largest erf weight on this cell is 4.2e-16 at Gamma and 1.4e-4 at 1×1×2, so its erf piece acts through the mixed Madelung constant and the semilocal ω); no open-shell wB97X pin; the bindings (Python run_uks_gamma / run_uks_kpts, the CLI UKS route at Gamma and on a mesh) call gamma_rsh::gamma_uks_any and solve_kuks, and the CLI energy equals the library to 1e-12 (HSE06, Gamma and 1×1×2, dense; the run log holds exactly the library value, and the 1-ulp residual the test sees at 1×1×2 is serde_json's float parse; RS-GDF measured 0 against a 1e-8 bar); open-shell wB97X (HYB_GGA_XC_WB97X) and any other libxc range-separated (CAM) GGA hybrid are accepted, not pinned; no range_split (the dense-AFT UKS force and the open-shell stress have their own rows; ROKS: previous row); the attenuated K is shared with the closed-shell code, so only PySCF is independent of the kernel; H/STO-3G fixtures only (no p or d shells) | pbc_oshell_rsh.rs, validation_oshell_rsh.rs, gen_pyscf_oshell_rsh_refs.py, periodic_kpoint_open_shell.rs |
Periodic k-point forces and stress (Hartree-Fock, library kpoint_rhf_gradient/kpoint_uhf_gradient/kpoint_rhf_stress/kpoint_uhf_stress): open-shell s+p on the fitted (RS-GDF) path, the dense H4-triplet supercell, and with a LANL2DZ ECP plus a rotating basis the range-split RS-GDF, the fit-acting force mutants and a shifted (Monkhorst-Pack) mesh | H2 triplet (2α/0β) and H4 triplet (3α/1β), H STO-3G s + one p, cubic cells, Gamma-centred 1×1×1 and 1×1×3, exxdiv none and ewald; HI (H cc-pVDZ, I s/p general contractions, LANL2DZ ECP) in diag(6, 6, 7), Gamma-centred 1×1×3 and MP 1×1×2, exxdiv none | 1×1×1 = Gamma (the Gamma code; independent in the LR part and the phase / residue binning, the SR derivative walks are shared); k-mesh = explicit 3-cell supercell / 3; central finite differences (h = 1e-4) of ferric's own k energy; range-split = unsplit fit; rotated = unrotated walk | RS-GDF open shell: 1×1×1 − Gamma total ≤ 8.8e-13 (stress), 3.1e-13 (force), per part ≤ 9.9e-12; 1×1×3 − supercell/3 ≤ 5.0e-12 (H2), 8.2e-11 (H4) stress, ≤ 3.0e-11 force; FD (H2, all nine strains) 2.5e-8 stress, 2.5e-9 force, FD(2h)/FD(h) 4.04. Dense H4 1×1×3 − 12-atom supercell/3: 5.5e-13 (stress). HI: range-split − unsplit 5.2e-14 force, 1.3e-12 stress; FD of the split energy 3.4e-9 / 2.7e-8; RS-GDF FD force 3.5e-9; MP mesh FD 3.2e-9 / 1.2e-8, rotated − unrotated 1.5e-14 / 5.6e-13 | 1e-11 (1×1×1 total), 1e-10 (part), 1e-9 (supercell), FD 3e-8 force / 3e-7 stress (H) and 4e-8 / 3e-7 (HI), 2e-11 (split), 1e-11 (rotation), 6e-12 (dense H4). Every mutant that can act misses its anchor by ≥ 1e-4 (H supercell / Gamma anchors, smallest 8.7e-3) or moves the HI analytic total (all components) by ≥ 1e-5 (smallest 2.1e-4, SplitGammaKernel); the smallest overall is NoAuxFt 3.4e-5 (bar 1e-5, visible to the FD only); EcpMeshCountModuli, WrongQ and GammaMadelung are identities on the C2 system (0). Newly reachable: FitCrossSpin on a p-shell / empty-β density (≥ 1.98e-1 at 1×1×1, ≥ 6.2e-1 at 1×1×3), the fit-acting force mutants with an ECP (RotFitWrongResidue 1.5e-1, RotSwapPair 2.5e-2, FitAuxPhase 1.7e-3), and the shifted-mesh ECP residue mutants (EcpMeshCountModuli 2.0e-1 force, 8.0e-1 stress; identities on Gamma-centred meshes). Limits: the k RS-GDF derivative imports the Gamma SR walks (sr2_force, sr3_force, sr2_strain_with, sr3_strain_with, aux_ft_strain_shells), so 1×1×1 = Gamma and supercell anchors check only the LR part and the binning independently; that shared SR kernel is anchored by FD on the H2 triplet (both exxdiv), the H4 triplet (exxdiv none: all nine strains 7.2e-8, force 7.5e-10, FD(2h)/FD(h) 3.78–4.28, bar 1e-6 / 3e-8) and the H3 s+p quartet (3α/0β, exxdiv none: zz, xx, xy, xz 4.5e-8, force 2.6e-9, ratio 3.86; its 1×1×1 − Gamma 1.1e-12 stress, 4.2e-13 force); the HI mutant movers are measured on the analytic total, while the FD anchors cover a subset of components; orthorhombic cells only for the split ECP anchor; the H4 RS-GDF supercell floor is 16× the H2 one, attributed to the 4-H aux metric but not tested. Open-shell ECP, several ECP elements, other multiplicities, the 1×1×3 triclinic ECP mesh, other shifted meshes and the external (PySCF) force comparison are in the next row | validation_kstress_followups.rs, pbc_kstress.rs, pbc_kpoint_ecp_rotation.rs, validation_pbc_kstress.rs, validation_pbc_kgrad.rs, validation_periodic_kpoint_optimize.rs |
| Periodic k-point forces and stress (Hartree-Fock): an open-shell septet with two ECP elements, the 1×1×3 triclinic ECP mesh, shifted meshes beyond 1×1×2, and k-point forces against PySCF | AsSb septet (8α/2β, As and Sb LANL2DZ ECPs, rotating s/p general contractions, s/p/d aux) in diag(6, 6, 10), Gamma-centred 1×1×1 and 1×1×3, k-UHF RS-GDF; HI (H cc-pVDZ, I LANL2DZ) triclinic rows (6,0,0), (1,6,0), (1.2,−0.8,7) at Gamma-centred 1×1×3, MP 2×2×1 on rows (8,0,0), (1.3,8,0), (1.2,−0.8,7), MP 1×1×4 and MP 1×1×3 on diag(6, 6, 7), k-RHF RS-GDF, rotation on; H2 STO-3G and s+p triplet, cubic 4 Bohr, dense AFT, Gamma-centred 1×1×3 (exxdiv none and ewald) and MP 1×1×2 | 1×1×1 = Gamma; 1×1×3 = explicit 3-cell supercell / 3; central FD (h = 1e-4) of ferric's own k energy; rotated = unrotated walk; MP 1×1×3 = Gamma-centred 1×1×3 (the same k set: an odd MP axis is not shifted); PySCF 2.13.1 pbc.grad.krhf / pbc.grad.kuhf forces (FFTDF 41³, all-electron gate lifted, per-k aufbau pinned for KUHF; the lifted gate checked against FD of PySCF's own energy, 7e-11..3e-9) and PySCF AFTDF energies with lanl2dz | AsSb: 1×1×1 − Gamma 2.4e-14 force, 2.9e-13 stress; 1×1×3 − supercell/3 9.6e-14 force, 1.5e-12 stress; FD (all nine strains) 5.6e-8 stress, 7.8e-10 force. Triclinic HI 1×1×3: supercell 2.8e-13 / 8.1e-13, FD 2.9e-9 / 2.3e-8. MP 2×2×1: FD 1.2e-9 / 3.4e-8, rotated − unrotated 2.6e-14 / 1.3e-12; MP 1×1×4: FD 3.5e-9 / 2.6e-8, rotated − unrotated 5.3e-14 / 4.7e-13; MP 1×1×3 − Gamma-centred 1.9e-13 / 1.1e-12. vs PySCF: energies ≤ 6.1e-13, forces ≤ 2.5e-11 (RHF none/ewald, MP 1×1×2, s+p triplet UHF); ECP-cell energies 6.4e-6 (HI) and 3.1e-5 (AsSb septet) | 5e-12 (1×1×1), 3e-11 (supercell), FD 1e-8 / 1e-6 (AsSb) and 4e-8 / 3e-7–4e-7 (HI), 2e-11 (rotation, MP identity), PySCF 1e-11 energy / 3e-10 force, 3e-4 ECP energy. Every listed production-wired mutant misses its anchor or moves the total by > 1e-5, except WrongQ on MP 1×1×2, asserted as an identity (all q ≡ −q there); smallest EcpWrongResidue 2.6e-5 (AsSb force, supercell) and 3.1e-5 (MP 2×2×1 force); EcpCentreWrongAtom (centre derivative folded onto the next atom: here the other ECP atom; it also fires on single-ECP cells by folding onto H, so no mutant is specific to several ECP centres) 2.7e-3–6.9e-3; FitCrossSpin ≥ 7.9e-1; EcpMeshCountModuli 1.8e-3–2.1e-1 (force) and 2.5e-2–8.3e-1 (stress) on the shifted meshes, exactly 0 on MP 1×1×3. Limits: no external stress anchor exists (PySCF 2.13.1 has no k-point HF stress; its krks_stress is FFTDF pure-DFT only); no external force with an ECP (PySCF's k-point HF gradient takes GTH pseudopotentials only, ferric has none), so the ECP derivatives are anchored internally and the ECP cells only by energy; the external force pins rest on a one-line gate lift in PySCF (its own pseudo branch run for an all-electron cell); the AsSb−PySCF energy gap (3.1e-5, 5× the HI one) is not separated; the RS-GDF energies of the ECP cells carry a fit error vs dense of 2.9e-2 (HI) and 9.6e-3 Ha (AsSb), recorded by ecp_cell_dense_energies_match_pyscf (the anchors differentiate the fitted energy); with ECPs the high multiplicity is the closed-subshell septet (an IBr quartet/quintet with partly filled degenerate p shells did not converge in k-UHF); the all-electron H3 s+p quartet is in the previous row; the MP 2×2×1 k-RHF limit-cycles on the 6 Bohr triclinic rows, so it runs on 8 Bohr rows | validation_kstress_coverage.rs, gen_pyscf_kforce_pins.py |
| Periodic k-point Kohn-Sham (RKS: LDA, PBE, PBE0, SCAN, r2SCAN; UKS: LDA, PBE, PBE0; ROKS: PBE, PBE0) and ROHF analytic forces and stress on a cell whose basis carries an ECP, dense AFT and RS-GDF | HI (closed shell) and the H2I doublet in diag(6, 6, 7) Bohr, H STO-3G + compact I s/p, LANL2DZ ECP on I; Gamma-centred 1×1×3 (non-TRIM), atom grid (20, 50), shared 16 Bohr neighbour cutoff | central finite difference of ferric's own k-point energy (fresh SCF per displaced or strained cell): every force component, all nine strains for RKS LDA/PBE, UKS PBE and ROHF on dense J/K, three strains (zz, xy, xz) for the rest; the Python bindings (all four routes, 1×1×2) against FD of their own energies; ten production-wired ECP mutants (ECP term dropped, centre derivative dropped / sign-flipped / on the wrong atom, image weight at the transposed residue, home ECP image only, ket image weight) against the same FD | force ≤ 4.2e-10 Ha/Bohr, dE/dε ≤ 2.1e-9 Ha over all routes (the ECP parts are 6e-2 to 1.6e-1 and 1.5e-1 to 3.9e-1); every mutant misses by ≥ 3.1e-3 (force) and ≥ 2.1e-2 (stress) on RKS PBE (dense and RS-GDF), UKS PBE and ROHF (dense); Python bindings force ≤ 3.0e-10, two strains ≤ 6.6e-9. The strain FD uses h = 1.25e-5: the atom grid's hard neighbour cutoff puts one-step energy jumps (1e-11 to 1e-9 Ha) inside ±2.5e-5 on some components at 14, 16 and 20 Bohr cutoffs (FD misses of 6e-7 to 1e-5 that scale as 1/h, not h²); at 1.25e-5 every probed component is ≤ 2.1e-9, and a straddled jump would fail the anchor, not pass it | 3e-9 Ha/Bohr; 3e-8 Ha; mutants ≥ 1e3 × the bar. Not covered: a triclinic cell or shifted mesh with KS and an ECP (covered for HF in pbc_kpoint_ecp.rs / pbc_kpoint_ecp_rotation.rs, the same ECP walk), d/f shells on the ECP atom, more than one ECP atom, an external reference, B3LYP, SCAN/r2SCAN stress on RS-GDF with an ECP (accepted, not anchored: the ECP and RS-GDF SCAN stress anchors are separate), CLI numerics (the CLI tests check only that ECP cells pass the gate and reach the SCF) | validation_kks_ecp_derivs.rs, pbc_kks_ecp_derivs.rs, test_pbc_kpoint_open_shell_and_stress.py |
Periodic parallel, column-rotated and pair-symmetry-reduced walks are BITWISE their reference walks: RS-GDF SR/LR sums and k residue bins, Gamma and k-point SR nuclear attraction, the RS-GDF force and stress walks (Gamma RHF/UHF, k-point RHF, split), the overlap/kinetic and ECP force terms and the LR force pass across rayon thread counts and against frozen serial walks; the s2 (-r_L) k-pair bins against the ordered walk; the SR column rotation against the unrotated build | H2 / H3 / H4 cells, STO-3G to cc-pVDZ with ET and cc-pVDZ-RI aux, Gamma and 1×1×2 to 2×2×2 meshes, 1/2/6 threads (weekly); shrunk fixtures at 1/2 threads per commit | frozen serial walks and ferric's own unrotated / unsymmetrised builds (independent constructions of the same sums); the s2 and rotation mutants against the same builds | bit-for-bit (0 differing bits) | 0 bits; mutants must move the result. Per commit runs one shrunk canary per walk family (*_canary tests in the fast files); the full thread sets, larger cells and every mutant run weekly. Not covered: thread counts above 6, MPI ranks | validation_pbc_parallel_bitwise.rs, pbc_parallel_bitwise.rs, validation_pbc_lr_force_bitwise.rs, pbc_lr_force_bitwise.rs, validation_pbc_kpair_symmetry.rs, pbc_kpair_symmetry.rs, validation_pbc_sr_rotation.rs, pbc_sr_rotation.rs |
A "—" means the repository states no number for that cell. It is left empty on purpose rather than filled with an estimate.
Benchmark sweeps (GW100 and others) are kept in the project's working notes and are not reproduced here. Quoting a benchmark statistic from memory rather than from the record is the kind of unchecked claim this page exists to prevent.
Mixed-precision GPU kernels
[precision] mode = "mixed" (deprecated alias: [gpu] precision = "mixed") is opt-in (the default is f64) and applies only to
the kernels in mixed_kernels. A mixed result is not Proven: it is not
compared with an independent code, and it is not an f64 result. It is graded as
a measured error map: a deterministic bound derived from the operation
count, and the errors measured against the same run's f64 CPU energy on the
systems below. Whether that error is acceptable for a given use is not decided
here.
rimp2-energy (shipped). B_ov is stored on the device as f32 (half the
bytes of the f64 tensor); each block G_i = B_iᵀ·B_tail is formed by f32
panel products of width b = 64 (the shipped default) summed into an f64
accumulator; the pair arithmetic, denominators and all sums are f64. A finite
B_ov element beyond the f32 range, or one above sqrt(f32::MAX / b) (an f32
panel sum of products could overflow), or an unavailable flush kernel, runs the
f64 device path instead and is counted (mixed_fallback_f64); a NaN B_ov
passes through to a NaN energy as on the CPU; a pool too small for the f32
tensor runs the CPU path unchanged.
| Column | Value |
|---|---|
| Accumulation depth | n = naux per element, panels of b = 64 |
| κ_sum | measured per system (table): the energy-level κ_E = Σ fac|g|S/|D| / |E_os| and the p99 of the element κ = S_ab/|g_ab| on the first block (the element maximum is unbounded because g_ab crosses zero) |
| Bound | per element ε_G·S_ab + η with ε_G = (1+u₃₂)²(1+γ_b(u₃₂))(1+γ_⌈naux/b⌉(u₆₄)) − 1 + γ_naux(u₆₄) (u₃₂ = 2⁻²⁴, u₆₄ = 2⁻⁵³; the last term is the f64 reference's own rounding) and η the f32 underflow term; summed into an energy bound through the OS and SS terms |
| Mitigation | f64 panel accumulation, f64 pair arithmetic, f64 everything else |
| Precision | f32 storage, f32 panel products, f64 sums |
The measured error against the f64 CPU energy of the same B_ov at b = 64 (E_corr is the f64 RI-MP2 correlation energy; every reference is an RI-JK RHF with loose thresholds, the same orbitals on both sides of each comparison). OS and SS are signed and partly cancel in the total, so all three are given:
| System (frozen core) | nocc / nvir / naux | E_corr (Eh) | ΔE_OS (Eh) | ΔE_SS (Eh) | ΔE total (Eh) | total (kcal/mol) | bound OS / SS (Eh) | κ_E | p99 κ |
|---|---|---|---|---|---|---|---|---|---|
| H2O / cc-pVDZ | 5 / 19 / 84 | −0.204009 | −4.9e-9 | −2.1e-9 | −7.0e-9 | −4.4e-6 | 1.6e-6 / 2.8e-6 | 1.30 | 4.8e11 |
| n-butane / cc-pVDZ | 17 / 89 / 364 | −0.599582 | −2.8e-10 | −3.7e-10 | −6.5e-10 | −4.1e-7 | 7.2e-6 / 1.4e-5 | 1.95 | 4.6e11 |
| n-octane / cc-pVDZ | 33 / 169 / 700 | −1.183770 | +1.1e-10 | −8.3e-11 | +2.6e-11 | +1.6e-8 | 1.7e-5 / 3.3e-5 | 2.40 | 2.0e11 |
| n-dodecane / cc-pVDZ | 49 / 249 / 1036 | −1.767936 | −1.7e-10 | −9.1e-11 | −2.6e-10 | −1.6e-7 | 2.9e-5 / 5.6e-5 | 2.76 | 1.2e11 |
| H2O / aug-cc-pVTZ | 5 / 87 / 198 | −0.283553 | −6.1e-10 | +3.7e-10 | −2.4e-10 | −1.5e-7 | 2.5e-6 / 4.6e-6 | 1.50 | 1.2e11 |
| benzene / aug-cc-pVDZ (6) | 15 / 171 / 570 | −0.810690 | +5.1e-10 | +4.7e-10 | +9.7e-10 | +6.1e-7 | 7.8e-6 / 1.4e-5 | 1.65 | 2.1e12 |
| benzene / aug-cc-pVTZ (6) | 15 / 393 / 912 | −0.963520 | −8.7e-10 | −1.0e-10 | −9.7e-10 | −6.1e-7 | 1.0e-5 / 2.0e-5 | 1.84 | 3.0e12 |
Every component is inside its bound. The error splits into an f32-storage part (B_ov rounded to nearest through f32, recomputed in f64) and an accumulation part (the device minus that), each inside its own bound; at benzene / aug-cc-pVTZ the accumulation part (OS −9.4e-10) is the larger.
What the bound can and cannot catch. The energy bound is a worst case over
rounding signs, three to six decades above the measured energy errors (at the
worst single element the error reaches 7.1e-2 of its per-element bound at
benzene / aug-cc-pVTZ and up to 1.2e-1 at dodecane, but those elements carry
little of the energy). It catches gross defects, such as a wrong operand offset,
a dropped panel or a dropped pair weight (1e-1 relative error). It does not
catch a subtle degradation of the kernel: a plain SGEMM without the f64 flush,
an f32 B_ov with an f64 GEMM, a truncating instead of round-to-nearest upload,
or f32 accumulation across panels all stay inside it. They are pinned by other
checks:
- The rounding mode is guaranteed by a bit-exact test: the device f32
B_ovequalsas f32(round to nearest, ties to even) element for element. - The f64 flush across panels is guaranteed by a deterministic construction (panel sums +2²⁰, 2⁻⁹, −2²⁰ give exactly 2⁻⁹ on the device; summing the panels in f32 gives 0).
- The panel structure is checked by a measurement over every G block of
benzene / aug-cc-pVTZ (18.3 million elements): the per-element RMS of err/S is
1.80e-8 for the device and 1.78e-8 for the host twin of the same algorithm
(ratio 1.007), against 2.79× the twin for a plain SGEMM, 0.24× for an f32
B_ovwith an f64 GEMM, 1.29× for a truncating upload and 1.30× for f32 accumulation across panels. The accepted device/twin ratio lies between 0.49 and 1.13 (the geometric midpoints to the nearest measured defect on each side). This measurement is supplementary and device and system dependent: its margin (about 13%) is of the size of the device/twin spread between systems (0.87 at water / cc-pVDZ, 1.007 at benzene / aug-cc-pVTZ), so it is not a guarantee on another device or build. Measured against the shipped b = 64, a panel width of 96, 128 or 256 reads 1.27, 1.51 or 2.39 (above the band); a width of 32 reads 0.70 (inside it: a more accurate kernel, a performance difference that is not pinned).
How the error depends on size. The per-element RMS of err/S falls with the
auxiliary depth over the four cc-pVDZ systems: 4.9e-8, 2.5e-8, 2.1e-8, 1.8e-8
at naux 84, 364, 700, 1036; the fitted slope of ln RMS against ln naux is
−0.40 ± 0.03 (2 degrees of freedom; one-sided 95% upper limit −0.32; the
random-sign model predicts −0.5). This describes the shipped kernel; it is not a
law and not a defect gate: naux is confounded with the molecule (without water
the slope is −0.31), and a plain-SGEMM or truncating-upload emulation on the
same blocks also falls with naux. No size dependence is claimed for the total
energy error: its signed OS and SS parts scatter by two decades across systems
through cancellation. Test files:
crates/ferric-mp2/tests/rimp2_f32_storage_error_law.rs (no device; the name
predates this wording) and crates/ferric-mp2/tests/gpu_rimp2_mixed.rs
(device).
rimp2-energy, unrestricted (shipped, same kernel). The unrestricted
(open-shell) Coulomb RI-MP2 energy keeps one f32 B_ov per spin on the device
and forms every block of E_αα, E_ββ and E_αβ with the same f32 panel products of
width b = 64 and f64 accumulation; the antisymmetrised same-spin
K = g_ab − g_ba, the opposite-spin g², the denominators and all sums are f64.
The refusals and the mixed_fallback_f64 counter are the closed-shell ones.
The erfc and terfc unrestricted energies use the same kernel (next
paragraph); every other caller of the unrestricted pair kernels (the erf
operator, composite fitted operators, and direct calls of the pair kernels)
runs the f64 device kernel.
| Column | Value |
|---|---|
| Accumulation depth | n = naux per element, panels of b = 64 |
| Bound | the closed-shell per-element factor ε_G·S_ab + η, propagated through the SS term (K = g_ab − g_ba, perturbation δ_ab + δ_ba) and the OS term (g²), plus the f64 summation of the terms |
| Acceptance | |ΔE| ≤ 1.0e-3 Eh per heavy atom and per electron; the derived bound itself is below it on every system below |
| Mitigation | f64 panel accumulation, f64 pair arithmetic, f64 everything else |
| Precision | f32 storage, f32 panel products, f64 sums |
The measured error against the f64 CPU energy of the same B_ov at b = 64
(cc-pVDZ / cc-pVDZ-RI, all electrons correlated; every reference is an RI-JK UHF
with loose thresholds, the same orbitals on both sides):
| System | nocc α/β | nvir α/β | naux | E_corr (Eh) | ΔE_αα (Eh) | ΔE_ββ (Eh) | ΔE_αβ (Eh) | ΔE total (Eh) | per heavy atom | per electron | bound (Eh) | bound per heavy atom |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| O2 triplet | 9 / 7 | 19 / 21 | 112 | −0.348888 | −2.4e-9 | +1.1e-8 | +5.5e-9 | +1.4e-8 | 7.0e-9 | 8.7e-10 | 3.9e-6 | 2.0e-6 |
| CH3 doublet | 5 / 4 | 24 / 25 | 98 | −0.129040 | +1.5e-10 | +2.3e-10 | +1.3e-10 | +5.0e-10 | 5.0e-10 | 5.5e-11 | 1.6e-6 | 1.6e-6 |
Every block is inside its bound (largest error/bound 1.2e-2, O2 E_ββ). As in the
closed-shell case the energy bound is blind to a subtle kernel degradation: a
build that accumulates the whole contraction in f32 (one panel) stays inside it
on both systems (O2 ΔE +9.2e-9 Eh). That degradation is caught by a
deterministic construction through both the same-spin and the opposite-spin
blocks (an element of exact value 1 + 2⁻³⁰ split over two panels: the device
returns the f64 energy exactly; an f32 sum loses 2⁻²⁹ Eh, against an accepted
error of 2⁻³⁰) and by the panel counter (⌈naux/b⌉ panels per block). Test files:
crates/ferric-mp2/tests/gpu_u_rimp2_mixed.rs and
crates/ferric-mp2/tests/gpu_u_rimp2_mixed_pin.rs (which callers may use the
kernel).
rimp2-energy, erfc and terfc operators (shipped, same kernel). The RI-MP2
energy under the primitive erfc and terfc operators, closed-shell and
unrestricted, runs the same kernel: plain and attenuated RI-MP2
(att-rimp2, dense and QQR-screened), SCS-MP2 with two terfc operators and the
MP2 half of att-MP2+VV10. The per-element factor is the Coulomb one (a property
of the arithmetic), but S_ab = Σ_P |B_P,ia||B_P,jb| and the underflow term are
read from that operator's own dressed B_ov, whose metric is the attenuated
(P|Q); a worse-conditioned attenuated metric would appear as larger |B| and
larger S_ab / |g_ab| and is carried element by element. The bound assumes the
reference is the f64 energy of the same f64 B_ov: the attenuated RI fitting
error is common to both and is not part of it. The erf operator, composite
fitted operators (terfc_fit), SR-MP2 inside RS-MP2+RPA and OO-MP2 (the energy
kernel inside a larger algorithm whose sensitivity to this error was not
analysed) and kappa-regularised runs stay on the f64 device kernel.
Measured at the repository defaults (erfc ω = 0.420 Å⁻¹, terfc r₀ = 1.05 Å),
cc-pVDZ / cc-pVDZ-RI, all electrons correlated, against the f64 CPU energy of
the same B_ov (RI-JK RHF / UHF references). At these parameters the dressed
B_ov is as well scaled as the Coulomb one (water: max|B| 0.209 erfc, 0.211
terfc, 0.201 Coulomb; κ_E 1.306, 1.305, 1.304):
| System | Operator | naux | E_corr (Eh) | ΔE total (Eh) | per heavy atom | per electron | bound (Eh) | bound per heavy atom |
|---|---|---|---|---|---|---|---|---|
| H2O | erfc | 84 | −0.198624 | −1.7e-9 | 1.7e-9 | 1.7e-10 | 4.3e-6 | 4.3e-6 |
| H2O | terfc | 84 | −0.203297 | +6.1e-9 | 6.1e-9 | 6.1e-10 | 4.3e-6 | 4.3e-6 |
| O2 triplet | erfc | 112 | −0.337446 | −2.2e-9 | 1.1e-9 | 1.4e-10 | 3.8e-6 | 1.9e-6 |
| O2 triplet | terfc | 112 | −0.346018 | −4.5e-9 | 2.3e-9 | 2.8e-10 | 3.9e-6 | 2.0e-6 |
| CH3 doublet | erfc | 98 | −0.122053 | −6.5e-11 | 6.5e-11 | 7.2e-12 | 1.5e-6 | 1.5e-6 |
| CH3 doublet | terfc | 98 | −0.126625 | −1.8e-9 | 1.8e-9 | 2.1e-10 | 1.6e-6 | 1.6e-6 |
Every component (OS and SS, or αα, ββ and αβ) is inside its bound, and the
f32-storage part of the error is above the f64 device gate on every one, so a
caller that must stay f64 is told apart from a mixed one. These are small
systems at moderate attenuation; a strongly attenuated or poorly conditioned
metric is not measured here. Test files:
crates/ferric-mp2/tests/gpu_rimp2_mixed_attenuated.rs (needs
FERRIC_TERF_TABLE_DIR for the terfc rows) and
crates/ferric-mp2/tests/gpu_u_rimp2_mixed_pin.rs.
xc-vxc (opt-in, not in the default mixed set: it runs only when
mixed_kernels names it, under mode = "on"; on a GTX 1080 the device XC
path, f64 or mixed, was slower than the CPU, so there is no reason to run it
by default). It has run on hardware: on a GTX 1080 (Pascal, sm_61)
gpu_xc_mixed.rs passes (device error in the twin's class, no f64
fallback), with 2 extra SCF iterations on benzene and |ΔE| ≤ 3.4e-13 Eh. The Kohn-Sham XC
potential matrix of LDA and GGA functionals (closed- and open-shell; hybrids
included, their exact exchange is untouched): each grid batch's V_b = A·Xᵀ
is formed on the device from f32 A (weighted potential factors) and f32 X
(basis-function values and gradients, stored once per grid as f32 next to the
f64 copy) by f32 panel products of width b = 64 summed into an f64
accumulator. The density pass, the functional, E_xc and the V accumulation are
f64. Meta-GGAs never use it (meta-GGA τ is on the never-f32 list; the device
pass refuses mixed whenever τ is present, independently of the caller). A
precision ladder decides per Fock build: a build is mixed only when the
RMS change of some spin density since the previous build of the same SCF
exceeds τ = 1e-5; the first build of every SCF (the ladder is reset when an
SCF starts) and any one-shot V_xc are f64. At a converged exit whose last
build was mixed, that build's V_xc is replaced by an f64 rebuild at the same
density before the Fock matrix is diagonalised, so the Fock matrix and
orbitals a converged SCF returns come from f64 builds whatever density_conv
is and whichever exit accepted it (the energy needs no rebuild: E_xc comes
from the f64 density pass and functional). A wave whose panel sums could leave
the f32 range, or whose A does not round to f32, runs f64, and a missing
flush kernel, an AO value beyond the f32 range or a pool too small for the f32
copies keep the grid f64 on the device; all are counted (mixed_fallback_f64).
| Column | Value |
|---|---|
| Accumulation depth | k = ncols per element (the batch's point count, ≤ 128 by default), panels of b = 64 |
| Bound | per element |ΔV_ij| ≤ (2u₃₂ + γ_b(u₃₂) + γ_⌈k/b⌉(u₆₄))·(|A||X|ᵀ)_ij, plus the f64 reference's own γ_k(u₆₄); worst measured element 0.10 of it (water / cc-pVDZ, every 7th batch, with synthetic sine-wave potential factors in A, not functional output) |
| Energy | second order: the SCF energy is variational in the density, and only the Fock matrix of unconverged iterations carries the error |
| Mitigation | f64 panel accumulation, f64 density pass and functional, f64 closing iterations (the ladder), and an f64 V_xc rebuild at a converged exit whose last build was mixed |
| Precision | f32 operands, f32 panel products, f64 sums |
Why the ladder. With every build mixed, the f32 panel sums act as rounding noise
that changes with the density, and a tight SCF stalls on it: benzene /
cc-pVDZ PBE took 77 instead of 12 iterations at density_conv = 1e-9 and did not
converge in 200 at 1e-10. Rounding only the basis-function values (a fixed
perturbation) costs nothing; rounding only A costs 2 to 6 iterations; the
panel accumulation is the rest. τ = 1e-3, 1e-4 and 1e-5 kept 3-4, 4-5 and 6 of
about 10 builds mixed for at most 3, 3 and 2 extra iterations.
The measured effect on converged SCF energies (host twin of the kernel, the same algorithm on OpenBLAS, against the f64 SCF of the same input; default SCF and grid settings; measured before the f64 rebuild at a converged exit existed, which by construction changes neither: it runs after the exit decision and E_xc never depends on the V_xc precision; not re-measured):
| System | basis | functional | density_conv | iterations f64 / mixed | mixed builds | ΔE (Eh) |
|---|---|---|---|---|---|---|
| H2O | cc-pVDZ | PBE | 1e-6 | 9 / 9 | 6 | −2.8e-14 |
| H2O | cc-pVDZ | PBE | 1e-10 | 12 / 12 | 6 | +1.4e-14 |
| H2O | aug-cc-pVTZ | PBE | 1e-6 | 9 / 9 | 6 | +2.1e-13 |
| H2O | aug-cc-pVTZ | PBE | 1e-10 | 13 / 13 | 6 | +9.9e-14 |
| H2O | cc-pVDZ | r2SCAN (meta-GGA: f64) | 1e-10 | 13 / 13 | 0 | 0 |
| H2O⁺ (UKS) | cc-pVDZ | PBE | 1e-6 | 9 / 9 | 6 | +1.4e-14 |
| H2O⁺ (UKS) | cc-pVDZ | PBE | 1e-10 | 12 / 13 | 6 | 0 |
| benzene | cc-pVDZ | PBE | 1e-6 | 10 / 10 | 6 | −6.3e-13 |
| benzene | cc-pVDZ | PBE | 1e-10 | 13 / 15 | 6 | −5.1e-13 |
| benzene | cc-pVDZ | B3LYP | 1e-6 | 9 / 9 | 6 | +4.5e-13 |
| benzene | cc-pVDZ | B3LYP | 1e-10 | 13 / 15 | 6 | −2.8e-13 |
| n-octane | cc-pVDZ | PBE | 1e-6 | 11 / 11 | 7 | +9.1e-13 |
| n-octane | cc-pVDZ | PBE | 1e-10 | 18 / 18 | 7 | −9.1e-13 |
These are host-twin figures: the device kernel's own agreement with the twin
(same error class, within a factor 10 on max|ΔV|) and a device SCF against the
f64 host SCF are checked by crates/ferric-dft/tests/gpu_xc_mixed.rs, which
needs a device; it passes on a GTX 1080 (sm_61). Test
files: crates/ferric-dft/src/xc_batch.rs (element bound, no device),
crates/ferric-scf/tests/xc_mixed_vxc_error_map.rs (this table, and the
converged-exit Fock matrix against an independent f64 rebuild at a loose
density_conv, RKS and UKS, no device).
dfk-occ (opt-in, not in the default mixed set: it runs only when
mixed_kernels names it, under mode = "on"; on a GTX 1080 a mixed SCF saved
about 0.7 s (4%) of the wall time against the f64 device DF-K at def2-TZVP, nothing
measurable at def2-SVP, and was 3-6% slower with diffuse basis sets, so there is
no reason to run it by default). The DF-K occupied path with the dressed B
resident on the device as f32 and C_occ rounded to f32 on every build: each
Y_P = C_occᵀ·B_P is a k-panelled f32 product of width b = 64 flushed into f64,
and the SYRK and everything after it are f64. It runs behind the SCF precision
ladder (crates/ferric-scf/src/jk_ladder.rs), shared with dfj-pack: a build is
mixed only while the density moves by more than τ = 1e-5 and still contracts
(one way: once it settles or stops contracting the SCF stays f64), a build the ladder keeps f64 runs
the f64 device path on an f64 copy of B held beside the f32 one (rounded from
it on the device, bit-identical to rounding on the host; when the pool cannot
hold both copies, the f32 copy alone and the host f64 path), and a converged exit whose last build was mixed is refused
and the iteration redone in f64. The energy is first-order in the K error, so
that f64 exit, not a Fock-matrix swap, is what makes the returned energy and
density f64 builds. A B element beyond the f32 range or a flush kernel that
will not load runs the f64 device upload instead, counted (mixed_fallback_f64).
| Column | Value |
|---|---|
| Accumulation depth | stage 1: k = nbf per element, panels of b = 64; stage 2 (f64): k_chunk + nchunks |
| Bound | |K̂ − K| ≤ ε·S, S = Σ_{P,i} (|B_P||C|)(|B_P||C|)ᵀ, ε = k_error_factor_mixed (two f32 operand roundings, f32 panel sums, f64 flush), plus the f64 reference's own factor (crates/ferric-scf/src/df_k_gpu.rs) |
| Energy | first order in K, so a converged SCF's energy comes from f64 builds (the ladder's f64 exit); only unconverged iterations carry the mixed error |
| Mitigation | f64 panel flush, f64 SYRK, the precision ladder and its f64 exit |
| Precision | f32 B and C_occ, f32 panel products, f64 sums |
The measured effect on converged SCF energies: the device SCF with dfk-occ
mixed against the f64 device SCF of the same input (RI-JK, def2-universal-jkfit,
[gpu] mode = "on", default SCF settings, GTX 1080, the release CLI).
"f64 exit |dE|" is the f64 run's energy change at its last iteration, the
scale of its own termination noise:
| System | basis | method | atoms | nbf | iterations f64 / mixed | mixed K builds / total | |ΔE| (Eh) | |ΔE| per atom (Eh) | f64 exit |dE| (Eh) |
|---|---|---|---|---|---|---|---|---|---|
| H2O | cc-pVDZ | RHF | 3 | 24 | 10 / 10 | 7 / 22 | 4.3e-14 | 1.4e-14 | 1.1e-11 |
| n-butane | def2-SVP | RHF | 14 | 106 | 10 / 10 | 6 / 21 | 1.1e-13 | 8.1e-15 | 2.2e-11 |
| n-octane | def2-SVP | RHF | 26 | 202 | 10 / 10 | 5 / 21 | 0 (bit-identical) | 0 | 6.5e-11 |
| n-dodecane | def2-SVP | RHF | 38 | 298 | 10 / 10 | 5 / 21 | 1.4e-12 | 3.6e-14 | 5.9e-11 |
| n-hexadecane | def2-SVP | RHF | 50 | 394 | 10 / 10 | 5 / 21 | 2.3e-12 | 4.5e-14 | 9.0e-11 |
| n-icosane | def2-SVP | RHF | 62 | 490 | 10 / 10 | 5 / 21 | 3.2e-12 | 5.1e-14 | 1.1e-10 |
| benzene | aug-cc-pVDZ | RHF | 12 | 192 | 11 / 12 | 6 / 23 | 6.8e-13 | 5.7e-14 | 2.8e-13 |
| benzene | aug-cc-pVTZ | RHF | 12 | 414 | 10 / 12 | 6 / 25 | 3.4e-13 | 2.8e-14 | 7.5e-12 |
| OH (UHF) | cc-pVDZ | UHF | 2 | 19 | 10 / 10 | 7 / 22 | 2.8e-14 | 1.4e-14 | 2.2e-10 |
| OH (UKS) | cc-pVDZ | B3LYP | 2 | 19 | 24 / 23 | 6 / 35 | 5.7e-14 | 2.8e-14 | 5.7e-14 |
| benzene | def2-SVP | ωB97X (RSH) | 12 | 114 | 9 / 9 | 6 / 20 | 1.1e-13 | 9.5e-15 | 5.0e-10 |
The largest |ΔE| is 3.2e-12 Eh, against the 1.0e-3 Eh shipping bar, with no f64 fallback in any run. It is at or below the f64 run's own exit |dE| in every row but benzene / aug-cc-pVDZ (6.8e-13 against 2.8e-13, both at the 1e-12 scale of termination noise), so what it measures is the two runs' termination noise, not the kernel's error. The slope of ln |ΔE| against ln N is 2.29 ± 0.13 (standard error, 2 degrees of freedom) over the four alkanes with a nonzero |ΔE| and 1.27 ± 0.17 (8 degrees of freedom) over the ten such systems; it is the slope of that noise floor (the f64 exit |dE| grows with N too), not a growth law of the mixed error, which the ladder's f64 exit removes from the converged energy. With diffuse basis sets the mixed builds' own error holds the density change between builds at 5e-5 to 1e-4, above τ, while the DIIS error keeps falling. The ladder is therefore one way: the first build after a mixed one that finds the density settled (changed by at most τ) or not contracting (a change at least the previous build's) latches the SCF to f64 for good. Before the latch the ladder kept returning to mixed and DIIS stalled near τ: benzene / aug-cc-pVDZ took 44 to 103 iterations (the count depended on the last bits of the f64 K), and aug-cc-pVTZ 20, against 11 and 10 in f64; with it, 12 and 12.
Speed, n-dodecane RHF (RI-JK, the same card, 6 Rayon threads, two interleaved repeats each, whole-run wall time):
| basis | nbf | CPU | device f64 | device mixed dfk-occ |
|---|---|---|---|---|
| def2-SVP | 298 | 8.5, 7.2 s | 8.7, 7.5 s | 7.4, 7.5 s |
| def2-TZVP | 528 | 22.2, 22.1 s | 18.5, 18.3 s | 17.5, 17.8 s |
The def2-TZVP run spends 8.4-8.6 s in setup (the 3-index integrals and the
V^-1/2 dressing of the DF-K tensor), the same in every arm, and 6.6 s (f64)
against 6.0 s (mixed) building J and K over its 10 iterations. The first
build, before there are occupied orbitals, factors the guess density's
eigenvalues (314 of 528 kept) through the same occupied path.
A mixed iteration took 0.47-0.48 s against 0.60 s, the iterations the ladder
keeps f64 0.60-0.61 s (the f64 device path), and the first device build, which
uploads the f64 B and rounds its f32 copy on the device, 1.02 s against
1.12 s. Holding both copies costs device memory: 4.58 GB of dressed B at
def2-TZVP against 1.53 GB for the f32 copy alone and 3.05 GB in f64. On the
benzene rows above the mixed SCF took 1.76-1.82 s against 1.66-1.75 s
(aug-cc-pVDZ) and 4.9-5.0 s against 4.7-4.8 s (aug-cc-pVTZ).
The kernel itself (the derived K bound, the exact cross-panel flush and C_occ
rounding pins, the multi-chunk build, the operand-class twin gate, every
fallback) is checked by crates/ferric-scf/tests/gpu_dfk_mixed_kernel.rs, and
the laddered SCF energy against a bar derived from the f64 floor by
crates/ferric-scf/tests/gpu_jk_ladder.rs; both need a device and pass on a GTX
1080 (sm_61).
Known limits and negatives
- Analytic Hessians: closed-shell RHF, UHF and ROHF only (exact J/K, basis up to f functions, no solvent, no polarizable embedding; ECPs for RHF, UHF and ROHF (also with RI-J and/or RI-K) and external potentials for RHF and UHF but not ROHF; RI-J and/or RI-K for RHF, UHF and ROHF without an external potential). UHF states are not checked for internal stability or for being the lowest state: an unstable or excited UHF solution gets the Hessian of that solution. PySCF has no ROHF Hessian, so the ROHF reference is a finite difference of PySCF's analytic gradient. ROKS and every other method's frequencies take central finite differences of the analytic gradient.
- Local MP2: the integral-direct local MP2 (
rimp2with[local] integral_direct = true) has its correlation stage measured at about N1.24 (erfc) and N1.4 (Coulomb) on n-alkanes C20–C48 (6-31G / cc-pVDZ-RI, ε = 1e-4, frozen carbon cores, a calibrated pair gate; fitted to three points). That is one family of molecules in one basis: not shown to be linear, and not measured on 3-D or diffuse systems. Local MP2 withoutintegral_directstill builds the global 3-index tensor and makes no scaling claim. See The MP2 family. - DLPNO-MP2 PNO truncation is canonical and not compared like for like:
ferric's pair-driven DLPNO-MP2 with PNO truncation builds PNOs per
canonical occupied pair (
dlpno_mp2_from_b_ovdivides by a diagonaleps). A separate localized-occupied path (dlpno_mp2_localized_from_b_ov) does Boys-localized, Fock-coupled pair screening only, with no PNO or PAO truncation; ORCA localizes the occupieds and truncates PAO domains. The recoveries above are therefore reported side by side and never ranked. There is no DLPNO-CCSD or DLPNO-CCSD(T) energy driver, so ORCA's DLPNO-CCSD(T) figure is context only. The canonical pair screen is uninformative for n-butane to n-octane; with Boys-localized occupieds ferric's pair screen drops pairs (retention 0.585 frozen-core and 0.41 all-electron at C8,t_cut_pairs= 1e-4; the all-electron figure includes core pairs that the canonical screen also drops), measured only for these chains and below the locality onset. Library only. - Exact dRPA by the Riccati solve is a small-system path: its ring-product
plan holds no³·nv² numbers,
notimes the amplitudes themselves (C12 thrashed, then was killed for memory). The CLI andrun_drparefuse a run that cannot fit before the SCF; full-rankpdep-rpagives the same energy at far lower memory. - Laplace SOS-MP2, AO-sparse variant: the domain truncation is accurate,
and the radius it needs grows far more slowly than the molecule (chemical
accuracy at 3 to 5 Bohr on n-alkanes C2 to C12, radius/diameter falling from
0.52 to 0.17; a 71-atom drug molecule is within 0.05% at 4 Bohr, about 13%
of its diameter). The algebra is still dense, so
no speedup is claimed. The regression test
sos_ao_sparse_truncation_radius_is_transferable_across_sizespins the STO-3G butane/octane comparison (12 Bohr exact on both; octane worse at 3 Bohr). The C2-C12 sweep and the drug-molecule figure are measurements, not regression tests. - TDHF/RPAx C6: ~63% low regardless of gap. Do not use it for dispersion. Its static α is implemented as specified (it matches an independent build of the same kernel, see anchors) but is not physically established: water/cc-pVDZ at PBE with a 0.36 Ha scissor gives 5.20 a.u. against DOSD 9.64 (−46%). A matching static α says nothing about the dynamic response that C6 needs.
- TDDFT / TDA: closed-shell references only. Functionals without an fxc kernel (VV10, range-separated) are refused rather than run without it. B3LYP at aug-cc-pVDZ agrees with PySCF to 8.1e-4 eV on the default pruned grid and to 2.8e-6 eV on the reference's flat grid: the remainder is pruned-grid error. Meta-GGA excitations carry XC-grid error, so meta-GGA TDA/TDDFT defaults to a 150 × 434 grid: water r2SCAN TDA roots sit within 9.2e-5 eV (6-31G) and 5.5e-6 eV (aug-cc-pVDZ) of a flat 150 × 590 grid there, against 2.1e-3 eV on the 75 × 110 production grid (PBE: 4.4e-4 eV). SCAN is not grid-converged to 1e-4 eV on any grid tested: 3.6e-3 eV on the default, and flat 150 × 590 itself is 1.2e-3 eV from flat 200 × 590. See TDDFT.
- MP2 analytic polarizability (library only): one analytic path,
mp2_polarizability_analytic→analytic_alpha_relaxed(see anchors);frozen_mp2_c6_molecularand the attenuation sweeps use it. It and the relaxed dipole (static_relaxed_density_ao) refuse a frozen core. The frozen-amplitude C6 takes its frequency shape from HF α(iω), not from an MP2 dynamic response. - Periodic open-shell forces and stress refuse a non-stationary SCF
state: a ROHF/ROKS orbital gradient or a k-point UKS spin commutator above
1e-5 Ha, a stored Fock more than 1e-8 Ha from the rebuilt one, or SCF
k-points that are not the mesh's. Each tolerance and its provenance
(measured, round-off or arbitrary) is in section 6 of
crates/ferric-pbc/theory.md. - COSX gains at high angular momentum and does not gain with system size.
Measured on one thread at the flat
(50,110)grid with the overlap fit:- Against LinK on n-alkanes at def2-SVP it is slower at every size measured: 1.59× (C20), 1.09× (C32) and 1.22× (C48), with no trend toward parity. At def2-TZVP on C20 it is faster (0.67×); that is the only triple-zeta size measured.
- Against exact direct exchange on butane it is 3.7× slower at def2-TZVP (full SCF). At def2-QZVP its K build takes 90 s against about 400 s for the direct build's single J+K sweep, at a relative K error of 5.4e-5.
- Its K build grows as N1.29–N1.32 between C20 and C48 at def2-SVP.
- It applies to the Coulomb operator only: a range-separated functional
takes its exchange from density-fitted short- and long-range fitters and
ignores
k_builder = "cosx", with a warning. - Its analytic gradient is exact for RHF, RKS, UHF, UKS, ROHF and ROKS with
the overlap fit off, and for RHF and UHF with the default overlap fit, on
flat and pruned (
sgx) COSX grids. Fitted COSX with a KS functional, and fitted COSX for ROHF, are refused for gradient tasks, before the SCF runs.
Why the distinction is drawn so sharply
A quantum chemistry code can produce a plausible number in many ways that are wrong:
- a non-converged SCF returned as an ordinary result, because convergence is a flag rather than an error
- a method missing a physical term it does not mention (for example, TDDFT excitations computed without the fxc kernel)
- a fallback model silently substituted for one atom in a molecule, changing a partitioning without changing the shape of the output
- a screening or truncation threshold that happens to be safe for the test system and not for yours
None of these look like failures, and every one of them has occurred in this codebase. The remedy is to grade each capability separately and say which ones are checked against ground truth.
Testing discipline
Some properties are pinned by tests rather than asserted in prose:
- Bit-identity across thread counts for reductions and permutations:
results do not depend on
RAYON_NUM_THREADS - ERI 8-fold permutational symmetry: verified against the engine, not assumed, since the MP2 code relies on it to compute only ~1/8 of quartets
- Size-extensivity and rotational invariance of total energies
- Memory guards in both directions: a starved budget must be refused and an ample budget must still run, because an over-estimating guard is also a bug
New guards are mutation-tested: a defect is injected and the test confirmed to fail before the guard is trusted. This has caught guards that passed while proving nothing.
Related pages
- Input reference: every TOML key
- Examples: every shipped input file
- Python bindings