xnn.ffnn.models.geometry.pair_image_shifts#

xnn.ffnn.models.geometry.pair_image_shifts(data, a, b)[source]#

The integer image shifts (M, 3) that pair_vectors() adds to pos[b] - pos[a], or None for a batch without cells.

Parameters:
  • data (AtomicGraph) – The batched graph.

  • a (Tensor) – Atom indices of shape (M,).

  • b (Tensor) – Atom indices of shape (M,).

Returns:

Shifts in lattice vectors, detached.

Return type:

Tensor or None