xnn.hybnn.models.byteff_kernels#
Fused GPU kernels of periodic ByteFF-Pol’s neighbor pairs (the fast path of molecular dynamics steps).
The real-space pairs of ByteFFPol in a cell (repulsion, dispersion and
charge transfer of the pairs beyond 1,5, real-space Ewald electrostatics of every pair, the charges’
field and the mutual-induction ladders) as two Triton kernels with the numbers of the eager function
_pol_real_space to round-off:
the forward walks the compressed rows of a step plan’s pairs (
pair_rows()), one program per atom, and sums the atom’s half of every pair energy and its field in registers: no atomic adds; each pair’s two ladders are written once, from the row of its first atom;the backward is one pass over the pairs: the gradient of the pair vectors from the gradients of the per-atom energies, the field and the ladders, through
d D_n / dR = R D_(n+1)of the Ewald, Coulomb and Thole ladders. It is differentiable once: molecular dynamics, not training.
Imported only on CUDA devices, so that triton is needed only there.
Functions
|
The fused pairs of periodic ByteFF-Pol (see |
Classes
|
Per-atom energies |