Domain

class Domain

A Domain represents the spatial boundaries and constraints imposed upon the positions of the particles.

The origin is always located at the center of the domain.

By default, periodicity in each dimension is enabled when the side lengths are set.

A cuboid-shaped domain may have unique side lengths but the angles between the edges of the domain are fixed at ninety degrees. In two-dimensions, the cuboid reduces to a rectangle.

A triclinic-shaped domain is similar to cuboid-shaped except that the angles between the boundaries may different from ninety degrees. In two-dimensions, this reduces to a parallelogram.

The triclinic periodic cell is defined by a vector for each dimension. This implementation is only valid for the following two- or three-dimensions.

For the first (i.e., “x”):

\( \vec{l_x} = {l_x, 0, 0} \)

For the second (i.e., “y”):

\( \vec{l_y} = {xy, l_y, 0} \)

For the third (i.e., “z”):

\( \vec{l_z} = {xz, yz, l_z} \)

Thus, the angle, \(\alpha\), between the “x” and “y” vectors is given by

\( |l_x| |l_y| \cos\alpha = \vec{l_x} \cdot \vec{l_y}\).

For more information, see LAMMPS: https://docs.lammps.org/Howto_triclinic.html

Another good resource is the inner workings of Monte Carlo codes https://doi.org/10.1080/08927022.2013.819102

Arguments

  • side_length[i]: set the side length of the i-th dimension. The “[i]” is to be substituted for an integer 0, 1, 2, …

  • cubic_side_length: side length of cubic perioidic boundary conditions.

  • periodic[i]: set if the i-th dimension is periodic (default: true).

  • xy: set the tilt along the x-y direction (default: 0).

  • xz: set the tilt along the x-z direction (default: 0).

  • yz: set the tilt along the y-z direction (default: 0).