xnn.ffnn.models.gfnff_kernels.Plan#

class xnn.ffnn.models.gfnff_kernels.Plan(model)[source]#

Bases: object

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

Calling it with positions (N, 3) in Angstrom returns the nine term energies (Hartree, in the order of gfnff.TERMS) and the gradient of their sum in Hartree per Angstrom.

has_moved()[source]#

Whether the last evaluation found an atom farther than half the skin from the positions of the hydrogen- and halogen-bond lists (only plans with checks look).

Return type:

bool

tangents()[source]#

Make the launches of the tangent kernels (once; Unsupported where the CPU kernels do not cover them).

Return type:

None

hvp(positions, direction)[source]#

The derivative of the gradient (Hartree per Angstrom) at positions (N, 3) along direction (N, 3) (Angstrom), the Hessian times direction: the tangent kernels run the evaluation again with the tangents of every buffer.

Parameters:
Return type:

Tensor