Added optional argument box to pbc_points

This commit is contained in:
Sebastian Kloth 2024-01-05 16:30:47 +01:00
parent b1cb9d99cf
commit 76db85d628

View File

@ -8,6 +8,7 @@ from numpy.typing import ArrayLike, NDArray
from itertools import product
from .logging import logger
if TYPE_CHECKING:
from mdevaluate.coordinates import CoordinateFrame
@ -179,6 +180,7 @@ def nojump(frame: CoordinateFrame, usecache: bool = True) -> CoordinateFrame:
def pbc_points(
coordinates: CoordinateFrame,
box: Optional[NDArray] = None,
thickness: Optional[float] = None,
index: bool = False,
shear: bool = False,
@ -191,6 +193,7 @@ def pbc_points(
index=True also returns the indices with indices of images being their
original values.
"""
if box is None:
box = coordinates.box
if shear:
box[2, 0] = box[2, 0] % box[0, 0]