spheropack.Box#

class spheropack.Box(lengths, periodic=True, ball=None)#

Rectangular box spanning [0, L_k) along each axis.

Each axis is either periodic or bounded by walls. Without ball the walls are flat (at 0 and L_k); a box with walls along one axis and periodic boundaries along the others is a slab. With ball the axes of the ball are bounded by the curved wall instead; use Cylinder(), SphereContainer() or Disk() to construct such containers.

Parameters:
  • lengths (tuple[float, ...]) – Edge lengths, one per dimension (2 or 3 values).

  • periodic (tuple[bool, ...]) – One flag for all axes, or one flag per axis.

  • ball (spheropack.containers.Ball | None) – Optional curved wall inside the box.

__init__(lengths, periodic=True, ball=None)#
Parameters:

Methods

__init__(lengths[, periodic, ball])

Attributes

ball

dim

volume

Volume (area in 2D) available to the spheres.

lengths

periodic