# 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

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

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

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

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

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

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))