minimum_image_displacement¶
- torch_sim.transforms.minimum_image_displacement(*, dr, cell=None, pbc=True)[source]¶
Apply minimum image convention to displacement vectors.
- Parameters:
dr (
torch.Tensor) – Displacement vectors [N, 3] or [N, N, 3].cell (
Optional[torch.Tensor]) – Unit cell matrix [3, 3].pbc (
bool) – Whether to apply periodic boundary conditions.
- Returns:
Minimum image displacement vectors with same shape as input.
- Return type: