xnn.ffnn.models.gfnff_export#

Deployment of a bound GFN-FF model: the scriptable cores of its TorchScript export and the forces and strain derivative that the ASE calculator and the MDI engine take from it.

A GFN-FF model is bound to the structure it was built from, so both routes serve that system with its atoms in their order. The exported cores hold the rows of the terms as buffers and evaluate the eager terms of GFNFF. For molecules and clusters (GFNFFExport) the hydrogen- and halogen-bond rows of each conformation are chosen inside the scripted module: every row the topology allows is kept and the distance cuts are applied at each evaluation, which gives the rows of the model’s lists. Periodic cells (GFNFFCellExport) keep the rows the model holds, which stay valid while every atom is within half the model’s skin of the positions they were chosen at. direct_outputs() serves molecules and periodic cells through energy_and_gradient(), with the fused kernels where the model takes them.

Functions

direct_outputs(model, data)

The outputs of forward() with the forces and the strain derivative "virial" (eV) of every structure, from energy_and_gradient().

Classes

GFNFFCellExport(model)

node_features_energy_charges of a bound periodic GFN-FF model: the energy of one structure of the bound cell as equal per-atom shares (eV), its EEQ charges, and no features.

GFNFFExport(model)

node_features_energy_charges of a bound GFN-FF model: the energy of one conformation of a molecule or cluster as equal per-atom shares (eV), its EEQ charges, and no features.