File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,21 +266,25 @@ def _displacements_relative_to_center(
266266 ) -> np .ndarray :
267267 """Compute displacement vectors from center to positions.
268268
269- This method delegates displacement computation to axes_manager.get_vector,
269+ This method delegates displacement computation to `` axes_manager.get_vector`` ,
270270 which is expected to handle periodic boundary conditions if applicable.
271271
272272 Args:
273273 center: Reference center position of shape (3,).
274274 positions: Array of positions of shape (N, 3).
275- axes_manager: Object providing get_vector(center, positions, box).
276- box: Periodic box passed through to axes_manager.get_vector.
275+ axes_manager: Object providing `` get_vector(center, positions, box)`` .
276+ box: Periodic box passed through to `` axes_manager.get_vector`` .
277277
278278 Returns:
279279 Displacement vectors of shape (N, 3).
280280
281281 Raises:
282- AttributeError: If axes_manager does not provide get_vector.
282+ ValueError: If ``axes_manager`` is not provided.
283+ AttributeError: If ``axes_manager`` does not provide ``get_vector``.
283284 """
285+ if axes_manager is None :
286+ raise ValueError ("axes_manager must be provided for torque computation." )
287+
284288 return axes_manager .get_vector (center , positions , box )
285289
286290 @staticmethod
You can’t perform that action at this time.
0 commit comments