Examples

This page indexes every input file in examples/. There are 103 TOML files. Three Python scripts that build methods from AoIntegrals blocks are in examples/python/ (Python bindings). Run a TOML file from the repository root:

OPENBLAS_NUM_THREADS=1 cargo run --release --bin ferric -- examples/water-rhf.toml

What CI checks

CI parses every shipped example and runs the three listed below. The test all_shipped_examples_parse (in crates/ferric-cli/src/config.rs) loads every examples/*.toml and examples/full/*.toml through the strict parser. It also checks that each file's [molecule] xyz path exists. It does not execute the calculation or compare any energy.

examples/full/ holds one fully specified input per method.kind: every key written at its default (see Fully specified examples). The test full_examples_anchor.rs runs each of them and the minimal input in its header, and requires identical run logs.

Four examples are also executed by integration tests in crates/ferric-cli/tests/:

ExampleTestWhat the test asserts
water-rhf.tomlepistemic_warning.rs, verbose_trace.rs, qmmm_reports_the_pqr_as_its_geometry.rsThe run completes and prints no [warning] grade line.
water-tdhf-static-alpha.tomlepistemic_warning.rsThe Smoke-grade warning goes to stderr and not to stdout.
water-qmmm.tomlqmmm_reports_the_pqr_as_its_geometry.rsThe embedded energy -74.9653197421 appears in the output.
water-rhf-md.tomlmd_task.rsThe run writes 21 trajectory frames and 21 CSV rows, and the conserved energy stays within 5e-5 Hartree of its start (measured 1.8e-5).

Every other number in the "Reference in header" column below is copied verbatim from that file's comment block, and CI does not re-check it. Where the header cites a Rust test as the reference, that test is the check.

Examples that need extra setup

  • water-mp2v.toml, water-scs-mp2-2terfc.toml, water-attmp2-terfc.toml and any rs-mp2-rpa run with attenuator = "terf" need the tempered-erfc interpolation tables: point FERRIC_TERF_TABLE_DIR at them. Without it these runs stop with an error.
  • benzene-dfb3lyp-mpi.toml is an ordinary input; its header gives the --features mpi build and the mpirun launch line.

SCF and DFT

See SCF and DFT.

FileSystem / basiskind / taskReference in headerNotes
water-rhf.tomlH2O / STO-3Grhf / energy—water-qmmm.toml's header gives this geometry's energy as −74.9631468000. The file is commented to demonstrate screening.
water-rhf-cuest.tomlH2O / cc-pVDZrhf / energy—[gpu] backend = "cuest": SCF integrals on an NVIDIA GPU through cuEST. Needs a --features cuest build and an sm_80+ GPU.
benzene-rhf.tomlbenzene / cc-pVDZrhf—Exact 4-index J/K.
benzene-rhf-dfj.tomlbenzene / cc-pVDZrhf—RI-J only (cc-pvdz-ri).
benzene-rhf-rijk.tomlbenzene / cc-pVDZrhf—RI-JK (def2-universal-jkfit).
benzene-rhf-def2.tomlbenzene / def2-SVPrhf—
benzene-rhf-def2-rijk.tomlbenzene / def2-SVPrhf—RI-JK.
decane-rhf.tomldecane / STO-3Grhf—k_builder = "link".
water-rhf-cosx.tomlH2O / cc-pVDZrhf"E(COSX) − E(direct) is reported in crates/ferric-scf/tests/cosx_scf.rs"COSX exchange.
water-rhf-symmetry.tomlH2O / STO-3Grhf + [scf] symmetry—Point-group-blocked RHF (C2v); irrep_nelec shown commented.
h_uhf.tomlH atom / STO-3G, doubletuhf—
h2_opt.tomlstretched H2 / STO-3Grhf / optimize—
h2-rimp2-frequencies.tomlH2 / cc-pVDZrimp2 / frequencies—Central differences of the analytic RI-MP2 gradient (6 N gradients); also scs-mp2, oo-rimp2, pdep-rpa.
water-frequencies.tomlH2O / STO-3Grhf / frequencies—Finite-difference Hessian (hessian = "fd"). Check Hessian asymmetry.
water-rhf-md.tomlH2O / STO-3Grhf / md"stays within 1.8e-5 Hartree of its start" (the conserved column)Twenty NVE velocity Verlet steps of 0.25 fs from 300 K Maxwell-Boltzmann velocities; writes water-rhf-md.md.xyz and .md.csv. See Molecular dynamics. Run by crates/ferric-cli/tests/md_task.rs.
nh2-rohf-frequencies.tomlNH2 doublet / cc-pVDZrohf / frequenciescrates/ferric-scf/tests/validation_rohf_hessian.rsAnalytic ROHF Hessian.
benzene-dfb3lyp.tomlbenzene / def2-SVPksdft B3LYP—RI-JK is on automatically for ksdft.
benzene-dfb3lyp-mpi.tomlbenzene / cc-pVDZksdft B3LYP—Run under mpirun with the MPI build (see its header).
water-wb97xv.tomlH2O / cc-pVDZksdft wB97X-V—
water-pbe-d3bj.tomlH2O / cc-pVDZksdft PBE + D3(BJ)—Prints E(KS-DFT) and E(D3BJ) separately.
water-pbe-mbd.tomlH2O / cc-pVDZksdft PBE + MBD@rsSCS—Prints E(KS-DFT) and E(MBD@rsSCS) separately.
water-pbe-pruned-grid.tomlH2O / cc-pVDZksdft PBE / energy"removes ~23% of the grid points" (at 75×110)Validated in crates/ferric-dft/tests/grid_prune_live_scf.rs.
h2-lda-opt.tomlH2 / STO-3Gksdft LDA / optimize—
water-qmmm.tomlH2O + Na⁺ (PQR) / STO-3Grhf + [qmmm]"vacuum −74.9629466809, embedded −74.9653197421, i.e. −1.489 kcal/mol from the ion at 4 A. Verified against ferric.run_rhf(point_charges=...) to all 10 digits."The vacuum number is at the PQR geometry, not the xyz. The embedded number is asserted by a test.
water-qmmm-thole.tomlH2O + 3 polarizable MM sites (PQR) / STO-3Grhf + [qmmm] with polarizabilities_angstrom3"E = -75.02570291 Ha, E_pol = -0.06596986 Ha" (the PySCF-based prototype, testdata/reference/water_sto-3g_pe_three_sites.json)Thole-damped induced dipoles, thole_a = 2.1304. The CLI energy equals run_qmmm bit for bit (test_cli_cdft_thole.py).
lih-cdft-charge.tomlLiH / def2-SVPuhf + [cdft]—Li population held at 2.2 electrons (kind = "charge"). The cdft_uhf.rs configuration.
lih-plus-cdft-spin.tomlLiH⁺ doublet / def2-SVPuhf + [cdft]—Nα − Nβ on Li held at 0.45 (kind = "spin").
henep-cdft.tomlHeNe⁺ doublet / def2-SVPuhf + [cdft]"E = -130.4021906 Ha, lambda = -2.754 Ha per electron"The state pinned by cdft_outer_loop.rs: h-core start, level shift 0.5, descent off, 99 × 302 grid.
water-pcm.tomlH2O / STO-3Grhf + [pcm]—IEF-PCM water (solvent = "water", ε = 78.4).
water-rhf-smeared-charge.tomlH2O / STO-3Grhf + [external_potential]—One Gaussian-smeared charge (width, Bohr) and one point charge.
hbr-x2c-rhf.tomlHBr / cc-pVDZrhf + [scf] relativistic = "x2c1e"—Spin-free X2C-1e core Hamiltonian; energy only, Ungraded. PySCF sfx2c1e() gives −2597.626993 Ha (testdata/reference/x2c_scf_sfx2c1e.json; the agreement is asserted in crates/ferric-scf/tests/x2c_scf.rs).
o2-uhf-stability-descent.tomlO2 triplet / STO-3Guhf"the descent follows the downhill eigenvector to the UHF minimum (-147.63530 Ha)"[scf] stability_descent = true.
water-cation-uhf-initial-mom.tomlH2O+ doublet / STO-3Guhf—[scf] mom_reference = "initial": initial MOM holds the starting guess's occupied block.
h2-cell-rhf.tomlH2 / STO-3G, 4 Bohr cubic cellrhf + [cell], Gamma point—Periodic, dense J/K, exxdiv = "ewald".
h2-cell-kpts-rhf.tomlH2 / STO-3G, 4 Bohr cubic cellrhf + [cell], 2×2×2 k-mesh—Periodic k-point RHF, dense J/K.
h2-cell-kpts-ksdft.tomlH2 / STO-3G, 4 Bohr cubic cellksdft + [cell], 1×1×2 k-meshPBE0Periodic k-point closed-shell KS-DFT, dense J/K.
h2-cell-kpts-rhf-stress.tomlH2 / STO-3G, 4 Bohr cubic cellrhf + [cell], 1×1×2 shifted (centring = "mp") k-mesh, stress = true—Analytic k-point stress (Hartree/Bohr³ and GPa, also in the run log's run_end), dense J/K.
h2-cell-kpts-rhf-opt.tomlstretched H2 / STO-3G, 4 Å cubic cellrhf + [cell] 1×1×3 k-mesh / optimize—k-point atom relaxation at a fixed lattice, analytic k-point force, dense J/K.
h2-cell-kpts-rks-opt.tomlstretched H2 / STO-3G, 4 Å cubic cellksdft + [cell] 1×1×3 k-mesh / optimizePBE0k-point atom relaxation at a fixed lattice, analytic k-point Kohn-Sham force (global hybrid), dense J/K.
h-cell-kpts-uks.tomlH atom doublet / STO-3G, 4 Bohr cubic celluhf + [dft] + [cell], 1×1×2 k-meshPBEPeriodic k-point open-shell Kohn-Sham (UKS), dense J/K; rohf gives ROKS/ROHF at a mesh.
h2-cell-rks-opt.tomlstretched H2 / STO-3G, 4 Å cubic cellksdft PBE + [cell] / optimize—Gamma-point atom relaxation at a fixed lattice, analytic periodic force, dense J/K.

MP2 family

See The MP2 family.

FileSystem / basiskindReference in headerNotes
water-rimp2.tomlH2O / cc-pVDZrimp2—All-electron.
water-rimp2-frozen-core.tomlH2O / cc-pVDZrimp2Expected log line: "[ferric] frozen core: 1 orbital(s) frozen from [mp2] frozen_core = "auto""
water-rimp2-rijk.tomlH2O / cc-pVDZrimp2—RI-JK reference SCF ([scf] jk = "rijk", jk_aux = "def2-universal-jkfit"); the MP2 RI aux stays cc-pvdz-ri.
water-rimp2-local.tomlH2O / 6-31Grimp2 + [local]—Amplitude-threshold local MP2, eps = 1e-4. Sets reference = true, so it also computes the exact RI-MP2 and prints the local error against it (off by default).
alkane8-rimp2-local-direct.tomloctane / 6-31Grimp2 + [local]—Integral-direct local MP2 (integral_direct = true), every locality map at its default.
water-drpa.tomlH2O / 6-31Gdrpa—Exact dRPA (no [local]).
water-drpa-local.tomlH2O / 6-31Gdrpa + [local]—Amplitude-threshold dRPA, eps = 1e-4, reference = true (prints the error against the canonical plasmon dRPA). A comment shows the eps_sweep form.
water-mp3.tomlH2O / cc-pVDZmp3—
oh-opmp3-pbe0.tomlOH / cc-pVDZopmp3—SSD-OPMP3 on a ROKS/PBE0 reference at the paper's x_ss = 0.5; exact integrals. Smoke grade.
butane-local-opmp3-pbe0.tomlbutane / 6-31Gopmp3 + [local]—Amplitude-threshold local OP-MP3 on an RKS/PBE0 reference (RI integrals, eps = 1e-5). Sets reference = true, so it also runs the canonical OP-MP3 and prints the local error.
water-oo-rimp2.tomlH2O / cc-pVDZoo-rimp2—Proven (narrow) grade.
water-attmp2.tomlH2O / aug-cc-pVDZatt-rimp2—ω = 0.420 Å⁻¹.
water-attmp2-terfc.tomlH2O / aug-cc-pVDZatt-rimp2—att_operator = "terfc", att_r0 = 1.05 Å (the aug-cc-pVDZ table value, set explicitly). Needs the terf tables.
alkane8-attmp2-terfc-local-direct.tomlC8H18 / 6-31Gatt-rimp2[local]Integral-direct amplitude-threshold LMP2 with a decoupled terfc seam (att_omega, r0·ω = 4). Needs the terf tables.
water-scs-mp2.tomlH2O / cc-pVDZscs-mp2—Grimme coefficients (defaults).
water-scs-mp2-2terfc.tomlH2O / cc-pVDZscs-mp2-2terfc—aTZ-fit r0 = 0.75/1.05 Å set explicitly (cc-pVDZ has no fit of its own). Needs the terf tables.
water-laplace-rimp2.tomlH2O / cc-pVDZlaplace-mp2—
water-omega-ri-mp2.tomlH2O / cc-pVDZrimp2—omega-RI fit, [ri] metric = "erfc", ω = 0.1 Bohr⁻¹
water-omega-ri-cdd-mp2.tomlH2O / cc-pVDZlaplace-mp2—omega-RI-CDD-MP2 with the paper's screens
water-omega-ri-rpa.tomlH2O / cc-pVDZpdep-rpa—omega-RI RPA, energy only
water-laplace-sos-mp2.tomlH2O / cc-pVDZlaplace-sos-mp2—
water-mp2v.tomlH2O / aug-cc-pVDZmp2-v—The header warns that aDZ is outside the fitted basis. Needs the terf tables.
water-rs-mp2-rpa.tomlH2O / aug-cc-pVDZrs-mp2-rpa—Proven grade; prints a notice that the ω choice is unbenchmarked.
water-rs-mp2-rpa-scan.tomlH2O / aug-cc-pVDZrs-mp2-rpa—Three ω and both formulations in one job (omega_scan, formulations).

Coupled cluster and double hybrids

See Coupled cluster and RPA and GW § double hybrids.

FileSystem / basiskindReference in headerNotes
water-ccsd.tomlH2O / cc-pVDZccsd"PySCF CCSD run on the same density-fitted integrals gives E_corr = -0.2135061893 Ha"All electrons, aux cc-pvdz-ri.
water-linlccd.tomlH2O / 6-31Glinlccd—Exact LinLCCD(hh).
water-linlccd-local.tomlH2O / 6-31Glinlccd + [local]—Amplitude-threshold LinLCCD(hh), eps = 1e-4.
water-ccd.tomlH2O / STO-3Gccd—
water-ccsd-t.tomlH2O / STO-3Gccsd(t)—Prints the CCSD correlation energy, the (T) correction and the total.
water-eom-ccsd.tomlH2O / cc-pVDZeom-ccsd"PySCF EOMEESinglet run on the same density-fitted integrals gives the lowest root omega = 0.2999479405 Ha"Five lowest singlets, all electrons, aux cc-pvdz-ri.
water-wb97xlv.tomlH2O / 6-31Gwb97x-l-v—λ = 0.6, ω = 0.1 Bohr⁻¹ (published values). Proven (narrow) grade.
water-dsd-pbep86.tomlH2O / cc-pVDZdsd-pbep86—Proven grade (Kozuch and Martin 2013, no dispersion); same notice as water-b2plyp.toml.
nh2-b2plyp.tomlNH2 doublet / cc-pVDZb2plyp—UKS reference with unrestricted RI-MP2 spin components (energy only).
nh2-dsd-pbep86-d3bj.tomlNH2 doublet / cc-pVDZdsd-pbep86 + [dft] dispersion = "d3bj"—The DSD-PBEP86-D3(BJ) refit set on a UKS reference.
water-b2plyp.tomlH2O / cc-pVDZb2plyp—Proven grade; prints a notice that the default grid and RI-J storage are outside the evidence. Aux cc-pvdz-rifit (an alias of cc-pvdz-ri).

Multireference

See CAS-CI and CASSCF.

FileSystem / basiskindReference in headerNotes
water-casscf.tomlH2O / 6-31Gcasscf"PySCF mcscf.CASSCF on ferric's AO integrals gives E = -76.0369690965 Ha"CAS(4,4) above 3 core orbitals, canonical orbitals on return.
o2-casscf-triplet.tomlO2 / 6-31Gcasscf"PySCF mcscf.CASSCF on ferric's AO integrals gives E = -149.6367298537 Ha"The triplet as the lowest M_s = 1 root of CAS(8,6), n_elec_active = [5, 3], from the closed-shell RHF.
n2-nevpt2.tomlN2 / 6-31Gnevpt2—SC-NEVPT2 on a CAS(6,6) CASSCF reference; prints the eight class energies.

RPA, C6 and properties

See RPA and GW.

FileSystem / basiskindReference in headerNotes
water-pdep-rpa.tomlH2O / cc-pVDZpdep-rpa—Writes eigenpotential cube files.
h2o-pdep-rpa-props.tomlH2O / cc-pVDZpdep-rpa—NPZ export.
benzene-pdep-rpa.tomlbenzene / def2-SVPpdep-rpa—RI-JK SCF.
benzene-pdep-rpa-export.tomlbenzene / cc-pVDZpdep-rpa—Exports cube files.
benzene-rijk-pdep-rpa.tomlbenzene / cc-pVDZpdep-rpa—Full rank (trunc_thresh = 0).
water-c6-pdep.tomlH2O / aug-cc-pVTZpdep-rpa, c6_source = "pdep""DOSD molecular reference (Meath/Toulouse): C6(H2O–H2O) = 45.3 a.u."Compare the printed "molecular C6" line against it, not the sum of the NPZ c6_iso entries. Writes to /tmp.
argon-c6-rpa-pbe.tomlAr / aug-cc-pVTZpdep-rpa @PBE"C6(Ar-Ar) = 56.4 a.u. vs DOSD 64.3 (-12%); the full He/Ne/Ar sweep gives mean |err| 8.9% at RPA@PBE — vs 39% at RPA@HF"Writes to /tmp.
water-tdhf-static-alpha.tomlH2O / cc-pVDZtdhf-static-polarizability @PBE"alpha_iso = 5.20 a.u. … against the DOSD reference 9.64 a.u.: 46% LOW"Sets [gw] scissor = 0.36 Ha; at scissor = 0 the run is refused (negative α diagonal). Static α only. Executed by a test (for the warning only).

GW and BSE

FileSystem / basiskindReference in headerNotes
water-g0w0-pbe.tomlH2O / cc-pVDZgw G0W0@PBE"HOMO IP should match … PySCF gw_ac reference (11.1714 eV) to <0.1 eV" (crates/ferric-gw/tests/g0w0_pbe_h2o.rs)
oh-ugw.tomlOH doublet / cc-pVDZgw U-G0W0@UHF"alpha-HOMO IP in the ~13-14 eV window, bracketing experiment 13.02 eV" (crates/ferric-gw/tests/oh_u_g0w0.rs)
oh-ugw-rohf.tomlOH doublet / cc-pVDZgw U-G0W0@ROHF—[gw] reference = "rohf".
water-bse-tda.tomlH2O / cc-pVDZbse-tda"Measured via this exact TOML (2026-07-18): 8.4572 eV", against a PySCF-integral cross-check of 8.46 eV and a sanity window of [5, 12] eV
water-augccpvdz-bse-tda.tomlH2O / aug-cc-pVDZbse-tdaLiterature: "aug-cc-pVDZ CCSDT Delta_Evert = 9.279 eV, f = 0.058; CBS TBE = 7.71+-0.02 eV, f = 0.052+-0.001"No ferric number is recorded.
h2co-bse-tda.tomlH2CO / cc-pVDZbse-tda—Pilot run. The lowest state is dark (f ≈ 0).
c2h4-bse-tda.tomlC2H4 / cc-pVDZbse-tda—Pilot run.
formaldehyde-bse-tda-augdz.tomlH2CO (QUESTDB geometry) / aug-cc-pVDZbse-tdaLiterature: "lowest singlet 1^1A2 (n->pi*, symmetry-forbidden) at 3.966 eV (QUESTDB TBE…)"The template for the Thiel-set files below.
acetaldehyde-bse-tda-augdz.toml, butadiene-bse-tda-augdz.toml, cyclopropene-bse-tda-augdz.toml, ethylene-bse-tda-augdz.toml, furan-bse-tda-augdz.toml, glyoxal-bse-tda-augdz.toml, pyrazine-bse-tda-augdz.toml, pyridine-bse-tda-augdz.toml, pyrimidine-bse-tda-augdz.tomlQUESTDB Thiel-set molecules / aug-cc-pVDZbse-tda—Same setup as the formaldehyde file. The reference values are in testdata/reference/thiel_set_subset.json.

TDDFT

FileSystem / basiskindReference in headerNotes
water-tda.tomlH2O / cc-pVDZtda (CIS, 5 roots)—Default aux cc-pvdz-rifit (an alias of cc-pvdz-ri).
water-tddft-pbe.tomlH2O / cc-pVDZtddft @PBE (5 roots)—Includes the f_xc kernel.
water-tddft-cam-b3lyp-triplet.tomlH2O / 6-31Gtddft @CAM-B3LYP, spin = "triplet" (5 roots)—Range-separated exchange (erf-metric RI) and the triplet kernel.
nh2-tddft-uks.tomlNH2 / 6-31Gtddft @B3LYP on a UKS reference (6 roots)—Spin-conserving unrestricted response; prints the reference and per-root ⟨S²⟩.

See also Capabilities and validation for the grade of each kind and its evidence, and Input reference for every key.