xnn.dnn.fast.acsf_kernels#
Triton kernels and autograd functions of the HDNNP symmetry functions (see xnn.dnn.fast.acsf).
Imported only when the kernels run, so that triton is needed only there.
The radial functions (types 1 and 2) of an edge depend on its length r; the angular functions
(types 3 and 9) of a triplet factor into A(c) h(r1) h(r2) h(r3), with c the cosine of the
angle, A(c) = 2^(1-zeta) max(1 + lambda c, 0)^zeta, h(r) = exp(-eta r^2) fc(r) and no
h(r3) for type 9. The kernels take the per-edge lengths and the per-triplet (r1, r2, r3, c);
the geometry before them stays in PyTorch.
The edges (triplets) are sorted by center and neighbor species (species pair), and one program sums a segment: the lanes are the functions of that center element and neighbor species (pair), so no lane is masked, and every program writes its own output columns (no atomic adds, the same result in every run). The cutoff values of the at most two declared cutoffs are evaluated once per edge or triplet and shared by the lanes. Each order has its own kernels: the values, the first derivatives (the gradient with respect to the inputs and the sums of a tangent’s first derivatives) and the second derivatives (contracted with a tangent). The gradient is therefore differentiable once, which is what a force loss needs for training.
Module Attributes
Edges or triplets per step of the segment kernels and per program of the per-item kernels. |
Functions
|
The order that sorts items by (center, |
Classes
|
The angular symmetry functions |
|
The gradient of |
|
The radial symmetry functions |
|
The gradient of |