amep.pbc.pbc_diff#

amep.pbc.pbc_diff(v1: ndarray, v2: ndarray, box_boundary: ndarray, pbc: bool = True) ndarray#

Calculates the difference vector(s) between v1 and v2 considering periodic boundary conditions.

Parameters:
  • v1 (np.ndarray) – First vector.

  • v2 (np.ndarray) – Second vector.

  • box_boundary (np.ndarray) – Boundaries of the simulation box given in the form np.array([[xmin, xmax], [ymin, ymax], [zmin, zmax]]).

  • pbc (bool, optional) – If True, periodic boundary conditions are considered. The default is True.

Returns:

out – Difference vector(s).

Return type:

np.ndarray