_pbc_diff#

mbgdml._gdml.desc._pbc_diff(diffs, lat_and_inv, use_torch=False)[source]#

Clamp differences of vectors to super cell.

Parameters:
  • diffs (numpy.ndarray) – \(N \times 3\) matrix of \(N\) pairwise differences between vectors \(\boldsymbol{u} - \boldsymbol{v}\)

  • lat_and_inv (tuple of numpy.ndarray) – Tuple of \(3 \times 3\) matrix containing lattice vectors as columns and its inverse.

  • use_torch (bool, default: False) – Enable, if the inputs are PyTorch objects.

Returns:

\(N \times 3\) matrix clamped differences

Return type:

numpy.ndarray