xnn.ffnn.models.gfnff_kernels.PeriodicPlan#

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

Bases: object

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

Calling it with positions (N, 3) and the cell (3, 3) in Angstrom returns the nine term energies (Hartree, in the order of gfnff.TERMS), the gradient of their sum in the positions (Hartree per Angstrom) and in the cell at fixed positions (Hartree per Angstrom). The Ewald splitting parameter and the translation lists follow the cell they were made for and are made again when it changes.

tangents()[source]#

Make the tangent buffers and the launches of the tangent kernels that do not follow the cell (once).

Return type:

None

hvp(positions, cell, dpos, dcell)[source]#

The derivatives of the gradients in the positions and in the cell (Hartree per Angstrom) at positions (N, 3) and cell (3, 3) along the changes dpos and dcell (Angstrom): the Hessian of the energy in both times the direction.

Parameters:
Return type:

tuple