xnn.dnn.featurizers.symmetry_functions#
Atom-centered symmetry functions (Behler-Parrinello / ANI style).
Standalone, independently usable featurizers:
sf = RadialSymmetryFunctions(species=[1, 6, 8], cutoff=6.0)
desc = sf(graph) # (N, sf.output_dim) invariant per-atom descriptor
They are element-resolved: contributions from neighbours are bucketed by the neighbour’s chemical species (and, for the angular term, by the unordered pair of neighbour species), which is what gives the descriptor chemical awareness.
Two knobs make the same math cover both the original Behler-Parrinello (BP,
2007) convention and the ANI / NeuroChem convention used by torchani (see
Smith et al. 2017, and aiqm/torchani):
prefactoron the radial term –1.0for BP (eqn 3 of the ANI paper as written),0.25for ANI/NeuroChem (torchani multiplies the radial term by0.25; it is a constant absorbed by the network’s first layer and does not change expressiveness).cos_factorapplied tocos(theta)beforeacosin the angular term –1.0for BP,0.95for ANI/NeuroChem (torchani scales the cosine by0.95soacosnever sees exactly +-1, where its gradient is infinite).
With prefactor=0.25 and cos_factor=0.95 these featurizers reproduce
torchani.AEVComputer element-for-element for the same parameter grid.
Classes
|
ANI-style angular AEV term, resolved by unordered neighbour-species pair. |
|
Behler G2 radial symmetry functions, resolved by neighbour species. |