Box Module

Contains data structures for simulation boxes.

Simulation Box

class freud.box.Box(*args, **kwargs)[source]

The freud Box class for simulation boxes.

Module author: Carl Simon Adorf <csadorf@umich.edu>

For more information about the definition of the simulation box, please see:

Parameters:
  • Lx (float) – Length of side x
  • Ly (float) – Length of side y
  • Lz (float) – Length of side z
  • xy (float) – Tilt of xy plane
  • xz (float) – Tilt of xz plane
  • yz (float) – Tilt of yz plane
  • is2D (bool) – Specify that this box is 2-dimensional, default is 3-dimensional.
classmethod cube(L)[source]

Construct a cubic box.

Parameters:L (float) – The edge length
classmethod from_box(box)[source]

Initialize a box instance from another box instance.

classmethod from_matrix(boxMatrix, dimensions=None)[source]

Initialize a box instance from a box matrix.

For more information and the source for this code, see: http://hoomd-blue.readthedocs.io/en/stable/box.html

classmethod square(L)[source]

Construct a 2-dimensional box with equal lengths.

Parameters:L (float) – The edge length
to_matrix()[source]

Returns the box matrix (3x3).

to_tuple()[source]

Returns the box as named tuple.