amep.pbc.pbc_diff_rect#

amep.pbc.pbc_diff_rect(v1, v2, box_boundary)#

Calculate the difference of two vectors, considering periodic boundary conditions within a rectangular box.

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]]).

Returns:

v – Difference vector.

Return type:

np.ndarray