# 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.

A Manifold defines a lower dimensional manifold embedded in 3D space with an implicit function $$F(x,y,z) = 0$$. Use Manifold classes to define positional constraints to a given set of particles with:

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

Bases: Manifold

Cylinder manifold.

Parameters

Cylinder defines a right circular cylinder along the z axis:

$F(x,y,z) = (x - P_x)^{2} + (y - P_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)

Bases: Manifold

Triply periodic diamond manifold.

Parameters

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

$F(x,y,z) = \cos{\frac{2 \pi}{B_x} x} \cdot \cos{\frac{2 \pi}{B_y} y} \cdot \cos{\frac{2 \pi}{B_z} z} - \sin{\frac{2 \pi}{B_x} x} \cdot \sin{\frac{2 \pi}{B_y} y} \cdot \sin{\frac{2 \pi}{B_z} z} - \epsilon$

is the nodal approximation of the diamond surface where $$[B_x,B_y,B_z]$$ is the periodicity length in the x, y and z direction. The periodicity length B is defined by the current box size L and the number of unit cells N $$B_i=\frac{L_i}{N_i}$$.

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

Bases: Manifold

Ellipsoid manifold.

Parameters

Ellipsoid defines an ellipsoid:

Implicit function

$F(x,y,z) = \frac{(x-P_x)^{2}}{a^{2}} + \frac{(y-P_y)^{2}}{b^{2}} + \frac{(z-P_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)

Bases: Manifold

Triply periodic gyroid manifold.

Parameters

Gyroid defines a periodic gyroid surface. The gyroid belongs to the family of triply periodic minimal surfaces:

$F(x,y,z) = \sin{\frac{2 \pi}{B_x} x} \cdot \cos{\frac{2 \pi}{B_y} y} + \sin{\frac{2 \pi}{B_y} y} \cdot \cos{\frac{2 \pi}{B_z} z} + \sin{\frac{2 \pi}{B_z} z} \cdot \cos{\frac{2 \pi}{B_x} x} - \epsilon$

is the nodal approximation of the diamond surface where $$[B_x,B_y,B_z]$$ is the periodicity length in the x, y and z direction. The periodicity length B is defined by the current box size L and the number of unit cells N $$B_i=\frac{L_i}{N_i}$$.

Example:

gyroid1 = manifold.Gyroid(N=1)
gyroid2 = manifold.Gyroid(N=(1,2,2))

class hoomd.md.manifold.Manifold

Bases:

Base class manifold object.

Warning

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 a given method or active forces.

__eq__(other)

Test for equality.

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

Bases: Manifold

Plane manifold.

Parameters

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

Plane defines an xy-plane at a given value of z:

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

Bases: Manifold

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:

$F(x,y,z) = \cos{\frac{2 \pi}{B_x} x} + \cos{\frac{2 \pi}{B_y} y} + \cos{\frac{2 \pi}{B_z} z} - \epsilon$

is the nodal approximation of the diamond surface where $$[B_x,B_y,B_z]$$ is the periodicity length in the x, y and z direction. The periodicity length B is defined by the current box size L and the number of unit cells N. $$B_i=\frac{L_i}{N_i}$$

Example:

primitive1 = manifold.Primitive(N=1)
primitive2 = manifold.Primitive(N=(1,2,2))

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

Bases: Manifold

Sphere manifold.

Parameters

Sphere defines a sphere:

$F(x,y,z) = (x-P_x)^{2} + (y-P_y)^{2} + (z-P_z)^{2} - r^{2}$

Example:

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