md.manifold

Overview

Manifold

Base class manifold object.

Cylinder

Cylinder manifold.

Diamond

Triply periodic diamond manifold.

Ellipsoid

Ellipsoid manifold.

Gyroid

Triply periodic gyroid manifold.

Plane

Plane manifold.

Primitive

Triply periodic primitive manifold.

Sphere

Sphere manifold.

Details

Manifolds.

class hoomd.md.manifold.Cylinder(r, P=(0, 0, 0))

Cylinder manifold.

Parameters
  • r (float) – radius of the cylinder constraint \([\mathrm{length}]\).

  • P (tuple [float, float, float]) – point defining position of the cylinder axis (default origin) \([\mathrm{length}]\).

Cylinder specifies that a cylindric manifold is defined as a constraint.

Note

The cylinder axis is parallel to the z-direction.

Implicit function

\[F(x,y,z) = x^{2} + y^{2} - r^{2}\]

Example:

cylinder1 = manifold.Cylinder(r=10)
cylinder2 = manifold.Cylinder(r=5,P=(1,1,1))
class hoomd.md.manifold.Diamond(N, epsilon=0)

Triply periodic diamond manifold.

Parameters
  • N (tuple [int, int, int] or int) – number of unit cells in all 3 directions. \([N_x, N_y, N_z]\). In case number of unit cells u in all direction the same (\([u, u, u]\)), use N = u.

  • epsilon (float) – defines CMC companion of the Diamond surface (default 0)

Diamond specifies a periodic diamond surface as a constraint. The diamond (or Schwarz D) belongs to the family of triply periodic minimal surfaces.

For the diamond surface, see:

Implicit function

\[F(x,y,z) = \cos{\frac{2 \pi}{L_x} x} \cdot \cos{\frac{2 \pi}{L_y} y} \cdot \cos{\frac{2 \pi}{L_z} z} - \sin{\frac{2 \pi}{L_x} x} \cdot \sin{\frac{2 \pi}{L_y} y} \cdot \sin{\frac{2 \pi}{L_z} z} - \epsilon\]

is the nodal approximation of the diamond surface where \([L_x,L_y,L_z]\) is the periodicity length in the x, y and z direction. The periodicity length L is defined by the current box size B and the number of unit cells N. \(L=\frac{B}{N}\)

Example:

diamond1 = manifold.Diamond(N=1)
diamond2 = manifold.Diamond(N=(1,2,2))
class hoomd.md.manifold.Ellipsoid(a, b, c, P=(0, 0, 0))

Ellipsoid manifold.

Parameters
  • a (float) – length of the a-axis of the ellipsoidal constraint \([\mathrm{length}]\).

  • b (float) – length of the b-axis of the ellipsoidal constraint \([\mathrm{length}]\).

  • c (float) – length of the c-axis of the ellipsoidal constraint \([\mathrm{length}]\).

  • P (tuple [float, float, float]) – center of the ellipsoid constraint (default origin) \([\mathrm{length}]\).

Ellipsoid specifies that a ellipsoidal manifold is defined as a constraint.

Implicit function

\[F(x,y,z) = \frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}} + \frac{z^{2}}{c^{2}} - 1\]

Example:

ellipsoid1 = manifold.Ellipsoid(a=10,b=5,c=5)
ellipsoid2 = manifold.Ellipsoid(a=5,b=10,c=10,P=(1,0.5,1))
class hoomd.md.manifold.Gyroid(N, epsilon=0)

Triply periodic gyroid manifold.

Parameters
  • N (tuple [int, int, int] or int) – number of unit cells in all 3 directions. \([N_x, N_y, N_z]\). In case number of unit cells u in all direction the same (\([u, u, u]\)), use N = u.

  • epsilon (float) – defines CMC companion of the Gyroid surface (default 0)

Gyroid specifies a periodic gyroid surface as a constraint. The gyroid belongs to the family of triply periodic minimal surfaces.

For the gyroid surface, see:

Implicit function

\[F(x,y,z) = \sin{\frac{2 \pi}{L_x} x} \cdot \cos{\frac{2 \pi}{L_y} y} + \sin{\frac{2 \pi}{L_y} y} \cdot \cos{\frac{2 \pi}{L_z} z} + \sin{\frac{2 \pi}{L_z} z} \cdot \cos{\frac{2 \pi}{L_x} x} - \epsilon\]

is the nodal approximation of the diamond surface where \([L_x,L_y,L_z]\) is the periodicity length in the x, y and z direction. The periodicity length L is defined by the current box size B and the number of unit cells N. \(L=\frac{B}{N}\)

Example:

gyroid1 = manifold.Gyroid(N=1)
gyroid2 = manifold.Gyroid(N=(1,2,2))
class hoomd.md.manifold.Manifold

Base class manifold object.

Manifold defines a positional constraint to a given set of particles. A manifold can be applied to a RATTLE method and/or the active force class. The degrees of freedom removed from the system by constraints are correctly taken into account, i.e. when computing temperature for thermostatting and/or logging.

All manifolds are described by implicit functions.

Note

Users should not instantiate Manifold directly, but should instead instantiate one of its subclasses defining a specific manifold geometry.

Warning

Only one manifold can be applied to the methods/active forces.

__eq__(other)

Test for equality.

class hoomd.md.manifold.Plane(shift=0)

Plane manifold.

Parameters

shift (float) – z-shift of the xy-plane \([\mathrm{length}]\).

Plane specifies that a xy-plane manifold is defined as a constraint.

Implicit function

\[F(x,y,z) = z - \textrm{shift}\]

Example:

plane1 = manifold.Plane()
plane2 = manifold.Plane(shift=0.8)
class hoomd.md.manifold.Primitive(N, epsilon=0)

Triply periodic primitive manifold.

Parameters
  • N (tuple [int, int, int] or int) – number of unit cells in all 3 directions. \([N_x, N_y, N_z]\). In case number of unit cells u in all direction the same (\([u, u, u]\)), use N = u.

  • epsilon (float) – defines CMC companion of the Primitive surface (default 0)

Primitive specifies a periodic primitive surface as a constraint. The primitive (or Schwarz P) belongs to the family of triply periodic minimal surfaces.

For the primitive surface, see:

Implicit function

\[F(x,y,z) = \cos{\frac{2 \pi}{L_x} x} + \cos{\frac{2 \pi}{L_y} y} + \cos{\frac{2 \pi}{L_z} z} - \epsilon\]

is the nodal approximation of the diamond surface where \([L_x,L_y,L_z]\) is the periodicity length in the x, y and z direction. The periodicity length L is defined by the current box size B and the number of unit cells N. \(L=\frac{B}{N}\)

Example:

primitive1 = manifold.Primitive(N=1)
primitive2 = manifold.Primitive(N=(1,2,2))
class hoomd.md.manifold.Sphere(r, P=(0, 0, 0))

Sphere manifold.

Parameters
  • r (float) – radius of the a-axis of the spherical constraint \([\mathrm{length}]\).

  • P (tuple [float, float, float]) – center of the spherical constraint (default origin) \([\mathrm{length}]\).

Sphere specifies that a spherical manifold is defined as a constraint.

Implicit function

\[F(x,y,z) = x^{2} + y^{2} + z^{2} - r^{2}\]

Example:

sphere1 = manifold.Sphere(r=10)
sphere2 = manifold.Sphere(r=5,P=(1,0,1.5))