xnn.ffnn.models.amoeba.lattice_jumps#

xnn.ffnn.models.amoeba.lattice_jumps(pos, reference, cell, batch, pbc)[source]#

The whole lattice vectors (N, 3) by which every atom moved from reference to pos: the rounded fractional displacements along the periodic axes (zero in the zero cell of a molecule). They are the wraps back into the cell while the atoms themselves move by less than half a cell height. Formed on the device without reading it.

Parameters:
  • pos (Tensor) – Positions (N, 3).

  • reference (Tensor) – Positions (N, 3).

  • cell (Tensor) – Lattice vectors as rows, (B, 3, 3).

  • batch (Tensor) – The structure of every atom (N,).

  • pbc (Tensor or None) – Periodic axes (B, 3).

Returns:

The jumps in lattice vectors, in the dtype of pos.

Return type:

Tensor