Examples

This page indexes every input file in examples/. There are 70 TOML files and no Python scripts. Run one 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, but runs only the three listed below. The test all_shipped_examples_parse (in crates/ferric-cli/src/config.rs) loads every examples/*.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.

Three 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.

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

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.
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.
h_uhf.tomlH atom / STO-3G, doubletuhf—
h2_opt.tomlstretched H2 / STO-3Grhf / optimize—
water-frequencies.tomlH2O / STO-3Grhf / frequencies—FD Hessian. Check Hessian asymmetry.
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-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.
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.

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-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—
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 Å. Needs the terf tables.
water-scs-mp2.tomlH2O / cc-pVDZscs-mp2—Grimme coefficients (defaults).
water-scs-mp2-2terfc.tomlH2O / cc-pVDZscs-mp2-2terfc—Thesis defaults r0 = 0.75/1.05 Å. Needs the terf tables.
water-laplace-rimp2.tomlH2O / cc-pVDZlaplace-mp2—
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—Smoke grade.

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-wb97xlv.tomlH2O / 6-31Gwb97x-l-v—λ = 0.6, ω = 0.1 Bohr⁻¹ (published values). Proven (narrow) grade.
water-b2plyp.tomlH2O / cc-pVDZb2plyp—Spike grade. Aux cc-pvdz-rifit (an alias of cc-pvdz-ri).

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.

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