xnn.ffnn.models.gfnff_kernels#

The GFN-FF energy terms as fused kernels: every kernel adds the energy of its rows and their position gradient, one row (or a block of pairs) per program. Plan holds the launches of one energy-and-gradient evaluation of a bound GFNFF model, on a GPU through Triton and on the CPU through xnn.common.cpu_kernels.

Module Attributes

CONST

Inexact constants of the kernels (float literals of a kernel are float32).

DENSE_FROM

Atom count above which the C6 coefficients come from matrix products, and the largest system of charge equations factorized in a kernel.

SMALL_SOLVE

Atom count above which the C6 coefficients come from matrix products, and the largest system of charge equations factorized in a kernel.

SERIAL_UP_TO

Atom count up to which the evaluation of a few atoms runs on one thread.

PAIR_BLOCK

Pairs per program of the pair kernels on a GPU.

BOND

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

ANGLE

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

TORSION

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

REPULSION

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

BATM

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

DISPERSION

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

HB

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

XB

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

ELECTROSTAT

Slots of the term energies in the energy buffer, in the order of gfnff.TERMS.

PCONST

1/sqrt(pi), 2/sqrt(pi), 4 pi, 2 pi, the distance (Bohr) within which images of a pair count as minimum images and a floor of their squared bound, the smallest squared distance of a pair (Bohr^2).

Functions

available([device])

Whether the kernels can run on device: a C++ compiler for the CPU, Triton for a GPU.

Classes

PeriodicPlan(model)

One energy-and-gradient evaluation of a bound periodic GFN-FF model on the CPU or a GPU.

Plan(model)

One energy-and-gradient evaluation of a bound GFN-FF model on the CPU.