CircularBounds

class openxps.bounds.CircularBounds(lower=-3.141592653589793, upper=3.141592653589793, unit=Unit({BaseUnit(base_dim=BaseDimension('angle'), name='radian', symbol='rad'): 1.0}))[source]

A circular boundary condition equivalent to PeriodicBounds(-π, π, radians).

This is a convenience class for the common case of a periodic boundary condition spanning from -π to π radians, which corresponds to a full circle.

Parameters:
  • lower (float) – Optional arguments for internal use (e.g., during deserialization). If not provided, defaults to -π, π, radians respectively.

  • upper (float) – Optional arguments for internal use (e.g., during deserialization). If not provided, defaults to -π, π, radians respectively.

  • unit (Unit) – Optional arguments for internal use (e.g., during deserialization). If not provided, defaults to -π, π, radians respectively.

Example

>>> import openxps as xps
>>> bounds = xps.bounds.CircularBounds()
>>> bounds.lower == -3.141592653589793
True
>>> bounds.upper == 3.141592653589793
True
>>> bounds.unit == xps.bounds.CircularBounds().unit
True
>>> from openmm import unit
>>> bounds.convert(unit.degree)
CircularBounds(lower=-180.0, upper=180.0, unit=deg)