wrap¶
- mdhelper.algorithm.topology.wrap(positions: ndarray[float], dimensions: ndarray[float], *, in_place: bool = True) ndarray[float] [source]¶
Wraps particle positions back into the primary simulation cell.
- Parameters:
- positionsnumpy.ndarray
Particle positions.
Shape: \((N,\,3)\).
Reference unit: \(\mathrm{nm}\).
- dimensionsnumpy.ndarray
System dimensions.
Shape: \((3,)\).
Reference unit: \(\mathrm{nm}\).
- in_placebool, keyword-only, default:
False
Determines whether the input array is modified in-place.
- Returns:
- positionsnumpy.ndarray
Wrapped particle positions. Only returned if
in_place=False
.Shape: \((N,\,3)\).
Reference unit: \(\mathrm{nm}\).