.. _fidelity: ******************************** Model Fidelity to Upstream Codes ******************************** The literature models in xnn (MACE, NequIP, Allegro, CACE, PhysNet, BAMBOO, ANI, SchNet) are not approximations or "inspired-by" re-implementations: they are faithful, self-contained xnn-native reproductions of the reference codes, verified numerically block by block and end to end. Models based on spherical-harmonic features will only need ``e3nn``: no additional packages such as ``mace-torch``, ``nequip``, ``cuequivariance``, or ``opt_einsum_fx`` is required at the runtime. Furthermore, CACE, PhysNet, BAMBOO, ANI, and SchNet need no extra dependency at all. Moreover, PhysNet's original implementation in TensorFlow has been ported to xnn's ecosystem in pure PyTorch. The BAMBOO model uses Cartesian vector channels, so, it does not need the e3nn package. The ANI model is written in pure PyTorch and use symmetry functions. The SchNet model is also written in plain PyTorch. The equivariance itself is verified in the test suite (rotate the inputs $\rightarrow$ check to see whether the energy remains invariant and the forces co-rotate, numerically, to the threshold of ~1e-7; see ``tests/test_gnn.py`` and ``tests/test_mace.py``). MACE ==== MACE in xnn reproduces the upstream `ACEsuit/mace `_ (``mace-torch``). Notably, the xnn implementation reproduces: - the real ``RealAgnostic(Residual)InteractionBlock`` and the paper's *learned symmetric contraction* over Clebsch-Gordan paths (``correlation`` order); - the CG coupling basis (``U_matrix_real``), which is bit-identical to ``mace-torch``, and the contraction reproduces it to ~1e-16 given the same weights; - the ZBL ``pair_repulsion``, which makes the message-passing depth fully flexible (contrary to the original code, where the ``num_interactions``, T, is fixed to 2, our implementation allows for T to be set to 0, ..., N). - the ``ScaleShiftMACE`` energy expression (``scale`` / ``shift`` on the per-atom interaction energy), the Agnesi and Soft distance transforms, and the density-normalized interaction blocks of the newer foundation generations. The notebooks in ``examples/fidelity_checks`` verify the xnn's implementation and compare it against the upstream version block by block. The notebooks in ``examples/gnn/mace/`` offer end to end examples which compare the xnn's MACE implementation against ``mace-torch`` on argon molecular dynamics data. **Foundation models.** ``MACE.from_foundation()`` converts the published pretrained checkpoints into xnn: ``examples/fidelity_checks/mace_foundation_verification.ipynb`` runs the complete registry, 16 of the 17 released MACE-MP / MACE-OFF checkpoints plus every head of the multi-head ``mace-mh-0``, against the upstream engine and finds energy parity at ~1e-15 eV/atom, forces at ~1e-13 eV/A and stress at ~1e-15 eV/A^3 (float64). Two conversion details are load bearing: the checkpoints' Clebsch-Gordan ``U_matrix`` buffers are transplanted rather than regenerated (the higher-``l`` bases differ across the e3nn versions the models were trained with; regenerating them leaves ~1e-4 errors on ``mace-mp-0b2-large``), and float32 checkpoints keep their stored, quantized Bessel frequencies and ZBL screening constants. ``mace-mh-1`` (next-generation nonlinear interaction blocks, un-enveloped radial embedding) is rejected with an explicit ``NotImplementedError``. ``tests/test_mace.py`` covers the same conversion in-process (every architecture flavor and multi-head slicing) without downloads. NequIP ====== The NequIP model in xnn offers a faithful re-implementation of the upstream ``EnergyModel`` of `mir-group/nequip `_ and involves: - the real ``InteractionBlock``, with upstream parameter names, so state dicts transplant directly; - per-layer ``tp_path_exists`` irreps pruning and the gated nonlinearity; - NequIP's radial conventions: trainable Bessel with the :math:`2/r_{\max}` prefactor, :math:`1/\sqrt{\langle n_\text{neigh}\rangle}` message normalization, and the :math:`\mathbf{r}_j - \mathbf{r}_i` edge orientation; - the per-species energy scale/shift. Given the same weights it reproduces ``nequip`` to ~1e-16 in energies, forces, and stress (``tests/test_nequip.py``). TorchScript export required a scriptable, bit-exact stand-in for e3nn's ``Gate`` (``xnn.gnn.models.nequip._Gate``), which the e3nn 0.4.4 original cannot provide on torch 2.x. Allegro ======= A faithful re-implementation of the original `mir-group/allegro `_ (v0.3.0, the e3nn-era reference, default ``uuulin`` mode): - the two-body product type embedding and the per-channel weightless Wigner-3j tensor products with the embedded-environment density trick; - the strided channel-mixing linears with the same flat weight layout, so state dicts transplant directly; - the cumulative-softmax latent resnet; - Allegro's radial conventions: trainable "normalized sinc" Bessel with the :math:`r_{\max}/\pi` prefactor, :math:`1/\sqrt{\langle n_\text{neigh}\rangle - 1}` environment and :math:`1/\sqrt{\langle n_\text{neigh}\rangle}` energy-sum normalization; - the per-species scale/shift. Given the same weights it reproduces ``allegro`` to ~1e-15 in energies and forces (``tests/test_allegro.py``). CACE ==== A faithful re-implementation of `BingqingCheng/cace `_ (Cheng, *npj Comput Mater* 2024), the Cartesian atomic cluster expansion, which needs no spherical harmonics or e3nn at all: - the Cartesian monomial angular basis (:class:`~xnn.gnn.featurizers.cartesian.CartesianAngularBasis`, evaluated with the same autograd-safe multiply recursion) and the exact multinomial symmetrization rules of upstream ``find_combo_vectors_nu{2,3,4}``, so B-feature ordering is identical; - the tensor-product element-embedding edge type, the per-\ :math:`(l, c)` trainable radial channel coupling (upstream's per-\ :math:`l` weight list stacked into one einsum), and all three message-passing mechanisms (node memory ``M``, exponential-decay filter ``Ar``, recursive edge embedding ``Bchi``); - CACE's radial conventions: trainable Bessel with the MACE :math:`\sqrt{2/r_{\max}}` prefactor, degree-6 polynomial cutoff, normalized :math:`\mathbf{r}_i - \mathbf{r}_j` edge vectors, and the :math:`1/\sqrt{\langle n_\text{neigh}\rangle}` message normalization; - the linear + MLP readout on the concatenated per-layer B features; the per-species reference energy lives in the standard xnn ``atom_ref`` (upstream subtracts it from the training labels instead). Given the same weights it reproduces ``cace`` to ~1e-16 (relative) in energies and forces, molecular and periodic, for any message-type subset (``tests/test_cace.py``). PhysNet ======= A faithful **pure-PyTorch translation** of the original TensorFlow 1.x implementation `MMunibas/PhysNet `_ (Unke & Meuwly, JCTC 2019): - the exponential-Gaussian radial basis with its quintic cutoff, the distance-based attention masks (zero-initialized ``k2f``), pre-activation residual blocks, gated feature updates, and the zero-initialized per-module ``(energy, charge)`` output heads, with per-element scale/shift tables of length 95 (elements are embedded directly by nuclear charge -- alchemical by construction); - the exact charge-correction, the switched/shielded Coulomb term (``kehalf`` constant and the force-shifted long-range form included), and an independently written D3(BJ) dispersion module that reproduces the behavior of upstream's bundled Grimme D3 code exactly, with its reference data (Grimme's original C6 table, built from the ``"2010"`` reference set of ``xnn/common/models/d3_reference.npz``; the two PhysNet radius tables kept verbatim) and softplus-learnable coefficients; - the shifted-softplus is evaluated in its exact form ``max(x, 0) + log1p(exp(-|x|))`` -- PyTorch's ``F.softplus`` goes linear above its threshold and would cost ~1e-9. Given the same weights it reproduces the original TF graph to ~1e-15 in energies, forces, corrected charges, and the non-hierarchicality penalty (``tests/test_physnet.py``; the parity test needs TensorFlow and a clone of the upstream repo via ``PHYSNET_UPSTREAM_PATH``, and the block-by-block notebook documents three dtype-only harness patches that let the float32-era TF graph run in float64). Dropout (upstream ``keep_prob``, default off) is not implemented. ANI === A faithful, from-scratch re-implementation of the ANI method (Smith, Isayev & Roitberg, *Chem. Sci.* 2017), verified against `aiqm/torchani `_ (pure-PyTorch symmetry functions, no extra dependency): - the Atomic Environment Vector (:class:`~xnn.dnn.featurizers.AEV`): element-resolved radial (Behler :math:`G^2`) and angular symmetry functions, bucketed by neighbour species and by the unordered neighbour-species pair in torchani's upper-triangular order, with the parameter grids laid out in torchani's ``(EtaR, ShfR)`` and ``(EtaA, Zeta, ShfA, ShfZ)`` orderings; - the ANI / NeuroChem conventions torchani follows over the paper as written: the ``0.25`` radial prefactor and the ``0.95`` scaling of :math:`\cos\theta` inside ``acos`` (both configurable; set to ``1.0`` for the literal Behler-Parrinello form); - per-element neural networks with per-element architectures (:meth:`ANI.ani1x` uses torchani's H ``160:128:96``, C ``144:112:96``, N/O ``128:112:96`` widths and the ``CELU`` activation), and per-element self atomic energies; - the published parameterisations as presets: :meth:`ANI.ani1` (the paper's 768-length AEV, 4.6/3.1 Å cutoffs, ``768:128:128:64:1`` networks with a Gaussian activation), :meth:`ANI.ani1x` (the 384-length ANI-1x grid, 5.2/3.5 Å cutoffs), :meth:`ANI.ani1ccx` (Smith *et al.* 2019: identical architecture to ANI-1x, transfer-learned to CCSD(T)*/CBS coupled-cluster data; the preset reuses :meth:`ANI.ani1x` and swaps in the coupled-cluster self atomic energies), and :meth:`ANI.ani2x` (Devereux *et al.* 2020: the seven-element model, adding S, F, and Cl to give a 1008-length AEV with 5.1/3.5 Å cutoffs and wider per-element networks). The AEV matches ``torchani.AEVComputer`` element-for-element to ~1e-16 (for the ANI-1, ANI-1x, and ANI-2x grids), and transplanting torchani's **pretrained** ANI-1x, ANI-1ccx, or ANI-2x weights reproduces their energies to ~1e-8 Ha and forces to ~2e-7 Ha/Å, for a single network and the full 8-model ensemble (``examples/fidelity_checks/ani_verification.ipynb``, ``tests/test_ani.py``; the parity tests need ``torchani``, the ``[ani]`` extra). All four training sets are in the hub: the original ANI-1 data as ``load_dataset("ani1")``, the active-learning ANI-1x data (energies and forces) as ``load_dataset("ani1x")``, its coupled-cluster subset (CCSD(T)*/CBS energies, shared release file) as ``load_dataset("ani1ccx")``, and the seven-element ANI-2x data (wB97X energies and forces for H/C/N/O/S/F/Cl) as ``load_dataset("ani2x")``. SchNet ====== A faithful implementation of the **manuscripts** — Schütt *et al.*, NIPS 30 (2017), plus the DTNN predecessor (*Nat. Commun.* **8**, 13890, 2017) for the conventions SchNet inherits. By design it is a *clean-room* build: no code is taken from (or compared against) schnetpack; the verification reference is an independent NumPy implementation of the papers' equations run with the same weights: - the atom-type embedding (eq. 3), the Gaussian radial basis :math:`e_k(r) = \exp(-\gamma (r - \mu_k)^2)` on the paper's grid (:math:`\gamma = 10` Å\ :sup:`-2`, centers every 0.1 Å — the shared :class:`~xnn.common.featurizers.GaussianRBF` with an explicit ``gamma``); - the continuous-filter convolution (eq. 2) with the two-dense-layer shifted-softplus filter-generating network, and the Fig. 2 interaction block (*atom-wise → cfconv → atom-wise → ssp → atom-wise*, residual, no weight sharing across the :math:`T` blocks); - the exact shifted softplus :math:`\ln(0.5 e^x + 0.5)` (shared with PhysNet in :func:`~xnn.common.models.ops.shifted_softplus`), the atom-wise :math:`F \to F/2 \to 1` readout with a zero-initialized head, and the DTNN per-atom energy standardization :math:`E_i = E_\sigma \hat E_i + E_\mu`; - one documented, off-by-default deviation: ``cutoff_fn="cosine"`` multiplies the filters by a smooth envelope for finite-cutoff condensed- phase use (the paper trains cutoff-free; its RBF grid simply ends at 30 Å). Given the same weights it reproduces the equation-by-equation reference to ~1e-15 in energies, block by block and end to end, with autograd forces matching finite differences to ~1e-10 and exact TorchScript parity (``tests/test_schnet.py``, ``examples/fidelity_checks/schnet_verification.ipynb``). BAMBOO ====== A faithful, from-scratch re-implementation of `bytedance/bamboo `_ (Gong *et al.* 2024), the graph equivariant transformer with a physics energy split, built on the xnn abstractions with no upstream code vendored: - the multi-head QKV edge attention (the reusable :class:`~xnn.transformer.attention.EdgeMultiheadAttention`), the scalar/vector GET layers with their inner-product coupling (first / middle / last variants), and the exponential-normal radial basis (:class:`~xnn.transformer.featurizers.ExpNormalSmearing`); - the charge-equilibrium electrostatics: per-atom electronegativity/hardness energies from the initial embedding, charges squashed by ``tanh`` and conserved to the total charge, and the damped all-pairs Coulomb sum (whose short-range softplus damping differentiates exactly to the paper's sigmoid force damping); - BAMBOO's native kcal/mol / Å units and its ``ele_factor`` constant; elements are embedded directly by atomic number. Given the same weights, and driven from the same geometry, it reproduces the original model to machine precision: every GET layer, the partial charges, the dipole, and the component energies match to ~1e-15, block by block (``examples/fidelity_checks/bamboo_verification.ipynb``, ``tests/test_bamboo.py`` with a clone of the upstream repo via ``BAMBOO_UPSTREAM_PATH``). The one deliberate difference is the force convention: xnn returns the full conservative ``-dE/dr`` through :class:`~xnn.common.models.outputs.ForceStressOutput`, which equals the upstream ``forces + qeq_force`` to ~1e-14; upstream reports only ``forces`` (``nn + coul`` with charges held fixed) and regularises the charge-equilibrium residual ``qeq_force`` toward zero during training (Supplementary Theorem A.2). The optional D3(CSO) dispersion (off by default, as in the paper's DFT training) reuses xnn's standard Grimme-D3 reference tables with the CSO damping and is therefore not on the machine-precision path. Latent Ewald Summation (LES) ============================ The long-range add-on :class:`~xnn.common.models.les.LatentEwald` is an independently written implementation of the algorithm of the reference ``cace.modules.EwaldPotential`` (Cheng, *npj Comput Mater* 2025) and the ``cace-lr-fit`` training-script conventions, verified against them: - the reciprocal-space sum with hemisphere symmetry factors, tinfoil boundary conditions (no ``k = 0`` term), triclinic cells, the optional Gaussian self-interaction removal, and the ``1/r^6`` dispersion kernel; - the ``erf``-converged real-space direct sum for non-periodic structures; - the reference latent-charge head (bias-free ``[24, 12]`` MLP plus a parallel bias-free linear layer) on the model's invariant features. Given the same weights, ``LatentEwald(CACE)`` reproduces the upstream CACE-LR composition (representation + two ``Atomwise`` heads + ``EwaldPotential`` + ``FeatureAdd``) to float32 round-off end to end, and each kernel matches upstream to ~1e-16 in float64 (``tests/test_les.py``). Documented deviations (floating-point robustness, not physics): the k-grid follows the input dtype (upstream hard-casts it to float32 and cannot run in float64), exact ties at the ``|k| = k_c`` shell resolve consistently so the energy is exactly rotation-invariant, and the self-interaction term is subtracted once (upstream subtracts it once per ``q`` channel). DFT-D4 dispersion ================= The dispersion add-on :class:`~xnn.common.models.d4.D4Dispersion` is an independently written implementation of the D4 model (Caldeweyher *et al.*, *J. Chem. Phys.* 2019), verified against the reference `dftd4 `_ (4.2.0, through its Python package, imported only as an external oracle): - the electronegativity-weighted error-function coordination number, the EEQ charge model (plain CN softly capped at 8, Gaussian charge widths, Lagrange-constrained total charge) and its Ewald summation for periodic cells (automatic splitting parameter, fixed +-2 real / reciprocal windows, Wigner-Seitz image averaging); - the charge-scaled, partitioned reference polarizabilities, the Gaussian CN weighting with its per-reference number of Gaussians and the highest-CN fallback, the 23-point Casimir-Polder C6 integration; - BJ-damped two-body and neutral-C6 ATM three-body energies with the upstream real-space cutoffs (60 / 40 / 30 / 25 bohr) and optional quintic switching windows. Energies agree to ~1e-16 hartree, gradients and virials to ~1e-17, charges, coordination numbers, polarizabilities and C6 coefficients to ~1e-15, for molecules, ions and crystals (``tests/test_d4.py``, ``examples/fidelity_checks/d4_verification.ipynb``). The one documented difference concerns *isolated* atoms (no neighbor within about two covalent radii): upstream's soft cap of the EEQ coordination number leaves a one-ulp residual of 1.8e-15 instead of zero, which the ``1e-14`` regularizer of the EEQ right-hand side amplifies to ~1e-9 e in the charges (~1e-13 hartree); xnn evaluates the cap exactly. The reference data are extracted from the upstream sources by ``tools/build_d4_reference.py`` and ship as ``xnn/common/models/d4_reference.npz``. One environment caveat: the ``dftd4`` wheel's bundled OpenMP runtime returns wrong EEQ charges once torch's thread pool is active in the same process -- import ``dftd4`` before ``torch``, or run it with ``torch.set_num_threads(1)`` (the tests do the latter and check a known water molecule as a guard). DFT-D3 dispersion ================= The dispersion add-on :class:`~xnn.common.models.d3.D3Dispersion` is an independently written implementation of the D3 model (Grimme *et al.*, *J. Chem. Phys.* 2010; BJ damping: Grimme, Ehrlich & Goerigk, *J. Comput. Chem.* 2011), verified against the reference `simple-dftd3 `_ (1.6.0, through its Python package, imported only as an external oracle): - the exponential-count coordination number (``k1 = 16``, 4/3-scaled Pyykko radii, 40 bohr cutoff), the Gaussian CN interpolation of the reference C6 (``k3 = 4``) with the highest-CN fallback, ``C8`` from the ``/`` factors; - the four damping functions of the reference code -- rational (BJ), zero (Chai & Head-Gordon), modified zero and optimized power -- with their respective critical radii (``a1 sqrt(C8/C6) + a2`` or the tabulated pair cutoff radii); - the ATM three-body term with zero damping on the 4/3-scaled pair radii and exponent ``alp + 2``, the upstream real-space cutoffs (60 / 40 bohr) and optional quintic switching windows. Energies agree to ~1e-17 hartree and gradients / virials to ~1e-17 for molecules and crystals, every damping function and the three-body term (``tests/test_d3.py``, ``examples/fidelity_checks/d3_verification.ipynb``). The reference data are extracted from the upstream sources by ``tools/build_d3_reference.py`` into ``d3_reference.npz``, which carries two sets of reference systems: the current reference code's (``references="2024"``, the :class:`~xnn.common.models.d3.DFTD3` default; ``simple-dftd3`` 1.1.0 re-parametrized Fr-Pu and added Am-Lr) and Grimme's original 2010 systems (``references="2010"``, read from a ``simple-dftd3`` 1.0.0 checkout). Both are identical for Z <= 86. PhysNet and BAMBOO use the 2010 set by default through the legacy functional API, so their tables are bit for bit those of their upstream codes for every element; ``d3_references: "2024"`` switches them. D3 and D4 share their switching, Gaussian-weight, three-body and wrapper machinery (:mod:`~xnn.common.models.dispersion`). ReaxFF / ReaxFF-nn ================== A faithful implementation of the **published equations**: the classical reactive force field of van Duin *et al.* (*J. Phys. Chem. A* 105, 9396, 2001; the transition-metal extension of Nielson *et al.* 2005 and the standard form reviewed by Senftle *et al.* 2016) and the machine-learned ReaxFF-nn variant (Guo *et al.*, *Comput. Mater. Sci.* 172, 109393, 2020; Xue *et al.*, *PCCP* 23, 19457, 2021), including the conventions required to evaluate published parameter libraries (SEAMM ``.frc`` files and ReaxFF-nn JSON): kcal/mol units and their per-term application rules, off-diagonal combination rules, torsion wildcards, hydrogen-bond defaults, and the bond-order switching behavior the libraries were trained under. The classical evaluation was additionally cross-checked against standalone LAMMPS ``pair_style reaxff`` on the published C/H/O combustion field (Chenoweth *et al.* 2008; xnn ships SEAMM's ``.frc`` translation of it, which rounds eight bond-energy parameters to three decimals -- ``De`` values differ from the LAMMPS ``ffield.reax.cho`` by up to 4e-4 kcal/mol, about 3e-5 eV on a small molecule, and nothing else differs): per-term energies agree at the level set by the two codes' different bond-list truncation conventions (nonbonded van der Waals and Coulomb terms to ~1e-6 eV; bond, angle, and total energies to ~0.1 percent), and forces match within a fraction of a percent. LAMMPS is used there only as an external oracle; nothing in xnn depends on it. **Licensing note.** The authors' reference implementation of ReaxFF-nn is distributed under the AGPL, which is incompatible with redistributing any derived verification artifact alongside this MIT-licensed code base. During development the xnn implementation was checked term by term against that publicly available implementation (agreement at its float32 working precision on molecular and periodic CHNO systems, classical and neural variants alike), but **no fidelity notebook, test, or vendored code that depends on it is distributed here, and none of its code was copied**. The distributed verification is therefore self-contained, following the same clean-room convention as SchNet: ``tests/test_reaxff.py`` recomputes every energy term from the papers' equations (uncorrected and corrected bond orders, bond energy, the analytic two-atom EEM solution and its self/Coulomb energies, the shielded-Morse van der Waals dimer, the valence angle of water via eqs 8a-8d, hydrogen bonds, valence/torsion enumeration by brute force) and checks rotation/translation invariance, autograd forces against finite differences, size extensivity, batching, charge-constraint handling, trainability, and library round-trips. Documented conventions: valence angles and torsions use the composed edge geometry (well defined for any cell); nonbonded terms are evaluated on a true periodic neighbor list under the standard 7th-order taper; the torsion angle enters through Chebyshev cosine identities (no ``arccos`` in the graph, whose derivative diverges for the planar torsions every conjugated molecule has); and a handful of rational-exponential terms are evaluated in overflow-safe sigmoid form (exact) or with an argument-capped ``exp`` (differing below 1e-17, inside saturating ratios only) so that float32 training with force losses stays finite. OPLS / OPLS-AA / L-OPLS ======================= A clean-room implementation of the **published functional form** (Jorgensen, Maxwell & Tirado-Rives, *JACS* 118, 11225, 1996, eqs 1-4), with parameters taken from the published tables rather than any upstream code. Fidelity is established two independent ways: * **Parity with OpenMM**: ``tests/test_opls.py`` and ``examples/fidelity_checks/opls_verification.ipynb`` assemble the same parameter library and topology into an OpenMM ``System`` (Coulomb via ``NonbondedForce``, Lennard-Jones via a ``CustomNonbondedForce`` with OPLS geometric mixing, exact 1,4 exceptions, Fourier torsions as phased periodic torsions) and compare on randomized conformations of butane, ethanol and ethylene: energies agree to ~1e-7 kJ/mol and forces to ~1e-6 kJ/mol/nm — the precision at which the two codes' physical constants are written down. OpenMM is an optional test dependency; the suite skips the parity test without it. * **The papers' own numbers**: relaxed dihedral-driver scans reproduce the OPLS-AA column of Table 1 of the 1996 paper to a few hundredths of a kcal/mol across ethane, propane, butane, methanol and ethanol (``examples/ffnn/opls/opls_conformational_energetics.ipynb``), and the Fourier/Ryckaert-Bellemans conversion reproduces the dual-form torsion rows of Table 2 of the L-OPLS paper (Siu *et al.*, *JCTC* 8, 1459, 2012) exactly. The hexane gauche-trans gap of the built-in ``"lopls"`` library matches the published refit (~2 kJ/mol vs OPLS-AA's ~5). Documented conventions: ``"oplsaa"`` is SEAMM's OPLS-AA distribution, whose alkane torsions are the late-1999 revision by the Jorgensen lab and whose ``H-C-O-H`` torsion (``V3`` = 0.352 kcal/mol) and ``C-C-C-O`` torsion differ from the 1996 paper as well; ``"oplsaa-1996"`` restores the paper's values (alkanes from Supporting Information Table 7, ``H-C-O-H`` ``V3`` = 0.45 and ``C-C-C-O`` as distributed with GROMACS), which are what Table 1 was computed with -- with them every Table 1 entry is reproduced to 0.01 kcal/mol. Atom types are assigned from the file's SMARTS templates, so the SEAMM type names (``opls_80`` for an alkane CH3 carbon, not GROMACS' ``opls_135``) never need to be known. Parameters use the thermochemical calorie (4.184 kJ exactly) and the CODATA Coulomb constant, matching the kJ-based ecosystem (BOSS/GROMACS/OpenMM) in which OPLS parameters are distributed — ReaxFF keeps its own historical Fortran-era constants for ``ffield`` compatibility, and the two differ by ~8e-6 relative. Dihedral angles enter through Chebyshev cosine identities (the OPLS Fourier terms are even in the angle, so no ``arccos``/``atan2`` is needed); excluded pairs are excluded in every periodic image, the standard MM convention. DREIDING / DREIDING-X6 ====================== A clean-room implementation of the **published functional form** (Mayo, Olafson & Goddard III, *J. Phys. Chem.* 94, 8897, 1990), with the per-atom generators read from the SEAMM ``dreiding.frc`` and the rule constants taken from the paper's tables. Because DREIDING *generates* every valence term rather than tabulating it, fidelity has to cover the rule engine as well as the energy expressions, and is established three ways: * **The published parameter tables**: Tables I (bond radii, equilibrium angles), II (van der Waals ``R0``, ``D0``, ``zeta``), III (the universal force constants and the inversion constants) and V (the hydrogen-bond parameters) are checked entry by entry in ``examples/fidelity_checks/dreiding_verification.ipynb``. * **Parity with LAMMPS**: every term the rule engine generates is written into a LAMMPS data file and evaluated by LAMMPS's own DREIDING styles (``bond_style harmonic``, ``angle_style cosine/squared`` and ``cosine``, ``dihedral_style harmonic``, ``improper_style umbrella``, ``pair_style lj/cut`` / ``buck`` / ``hbond/dreiding/lj``), an entirely independent implementation of the same expressions. Nine molecules covering every rule branch, in both nonbond forms, agree **term by term** to ~1e-10 kcal/mol and force by force to ~5e-10 kcal/mol/Angstrom. * **The paper's own numbers**: relaxed torsional scans reproduce the DREIDING column of Table XI across fourteen molecules with a mean difference of ~0.01 kcal/mol (max 0.06), and the butane gauche-anti (0.73 vs 0.75) and cyclohexane twist-boat-chair (7.70 vs 7.72) entries of Table XII follow (``examples/ffnn/dreiding/dreiding_conformational_energetics.ipynb``). Two exactly known quantities are hit exactly: the eclipsed-ethane torsion barrier is the published total ``V_JK`` = 2.0 kcal/mol of eq 14, and a linear donor-hydrogen-acceptor bridge at ``R = R_hb`` sits at ``-D_hb``, the analytic minimum of eq 38. Documented conventions: the inversion term of eq 28 is averaged over all three axis choices with weight 1/3, as the paper specifies (LAMMPS applies one improper per listed quadruple, so its force constant is ``K/3``); 1,4 nonbonded pairs count **in full** and only 1,2 and 1,3 pairs are excluded, unlike OPLS; the Coulomb constant is the paper's 332.0637 kcal Angstrom/mol of eq 37, which differs from LAMMPS ``real`` units' ``qqr2e = 332.06371`` by 3e-8 relative (the verification notebook absorbs that difference explicitly so the comparison isolates the functional forms); the equilibrium angle of 109.471 degrees in the parameter file is a rounded tetrahedral angle, which leaves a residue of ~1e-8 kcal/mol in an otherwise ideal geometry. DREIDING prescribes no partial charges, so electrostatics are off unless charges are supplied; the paper recommends Gasteiger estimates, available through ``Dreiding.from_atoms(..., charges="gasteiger")``. Resonance delocalization enters through the *typing*, not the rules: an amide C-N must be given as ``C_R``-``N_R`` with bond order 1.5 (the paper's footnote 8) to get its ~25 kcal/mol barrier, which automatic RDKit perception does not do. Why this matters ================ Fidelity means results published with the reference codes can be reproduced, weights can be transplanted in either direction (see :ref:`howto-transplant`), and the xnn implementations can serve as readable, single-dependency references for how these architectures actually work: the ``examples/fidelity_checks/_verification.ipynb`` notebooks double as annotated tours of each architecture.