unwrap

mdhelper.algorithm.topology.unwrap(positions: ndarray[float], positions_old: ndarray[float], dimensions: ndarray[float], *, thresholds: float = None, images: ndarray[int] = None, in_place: bool = True) None | tuple[ndarray[float], ndarray[float], ndarray[int]][source]

Globally unwraps particle positions.

Parameters:
positionsnumpy.ndarray

Particle positions.

Shape: \((N,\,3)\).

Reference unit: \(\mathrm{nm}\).

positions_oldnumpy.ndarray

Previous particle positions.

Shape: \((N,\,3)\).

Reference unit: \(\mathrm{nm}\).

dimensionsnumpy.ndarray

System dimensions.

Shape: \((3,)\).

Reference unit: \(\mathrm{nm}\).

thresholdsfloat, keyword-only, optional

Maximum distances in each direction a particle can move before it is considered to have crossed a boundary.

Reference unit: \(\mathrm{nm}\).

imagesnumpy.ndarray, keyword-only, optional

Current image flags (or number of boundary crossings).

Shape: \((N,\,3)\).

in_placebool, keyword-only, default: False

Determines whether the input array is modified in-place.

Returns:
positionsnumpy.ndarray

Unwrapped particle positions. Only returned if in_place=False.

Shape: \((N,\,3)\).

Reference unit: \(\mathrm{nm}\).

positions_oldnumpy.ndarray

Updated previous particle positions. Only returned if in_place=False.

Shape: \((N,\,3)\).

Reference unit: \(\mathrm{nm}\).

imagesnumpy.ndarray

Updated image flags (or number of boundary crossings). Only returned if in_place=False.

Shape: \((N,\,3)\).