xnn.hybnn.models.byteff#
ByteFF and ByteFF-Pol: classical force fields parameterized by a graph transformer.
ByteFF (Zheng et al., Chem. Sci. 16, 2730 (2025),
https://doi.org/10.1039/D4SC06640E) predicts every parameter of an AMBER-form force
field for a molecule from its two-dimensional graph: a local edge-augmented graph
transformer (MolecularGraphTransformer) reads the atoms
and bonds, and output heads map its states to
harmonic bond and angle parameters, a four-term Fourier series per proper torsion (phases 0 for odd and pi for even multiplicities, zero barriers about linear centers) and a twofold improper per trigonal carbon or nitrogen;
per-atom Lennard-Jones
sigmaandepsilon(Lorentz-Berthelot combination) and partial charges built as bond charge increments on the formal charges, so the total charge is exact.
ByteFF-Pol (Zheng et al., Nat. Commun. 17, 8276 (2026), https://doi.org/10.1038/s41467-026-73566-3) keeps the bonded terms and replaces the nonbonded part by five physically separated terms fitted to an energy decomposition: Born-Mayer repulsion with a short-range wall, damped C6 dispersion, point-charge electrostatics, Thole-damped induced dipoles and a charge-transfer term. Atomic C6, polarizability and van der Waals radius follow from a predicted effective atomic volume by Tkatchenko-Scheffler scaling of free-atom values.
The network sees no coordinates. The parameters of a bound system are predicted once per distinct molecule (and cached between evaluations while the weights do not change); the energy of a conformation is then a classical force field evaluation. Several independently trained networks (an ensemble) average their parameters.
Conventions and scope#
A model is bound to one system (
ByteFF.bind()): an RDKit molecule of one or more fragments, a list of molecules, a SMILES string or anase.Atoms(bonds perceived). Every structure evaluated must be a conformation of that system.Parameters are in kcal/mol, Angstrom, radians and e; energies are returned in eV.
Without
cutoffevery pair of a structure interacts (molecules and clusters, no cell). ByteFF also runs with a neighbor-list cutoff and periodic cells (truncated or switched, without Ewald sums). ByteFF-Pol solves its dipoles directly per structure without a cutoff; with one it evaluates periodic cells: the short-range terms truncated at the cutoff with a long-range correction of their tails, the charges and induced dipoles as Ewald sums with the reciprocal part on a particle mesh, and the dipoles solved iteratively.
Module Attributes
Coulomb constant of the released models, kcal Angstrom / (mol e^2). |
|
bond lengths (Angstrom) and angles (radians). |
Functions
|
One free-atom quantity per element (row |
Classes
|
Bond, angle, torsion and improper parameters from atom and edge states. |
|
ByteFF: an AMBER-form force field whose parameters a graph transformer predicts. |
|
ByteFF-Pol: a polarizable force field whose parameters a graph transformer predicts. |
|
Per-atom Lennard-Jones |
|
Charges and the exp-6, polarization and charge-transfer parameters (ByteFF-Pol). |