md.mesh.conservation¶
Overview
Area conservation potential. |
|
Triangle Area conservation potential. |
|
Volume conservation potential. |
Details
Mesh Conservation potential.
Mesh conservation force classes apply a force and virial to every mesh vertex particle based on a global or local quantity \(A\) of the given mesh triangulation \(T\).
See also
See the documentation in hoomd.mesh.Mesh for more information on the
initialization of the mesh object.
- class hoomd.md.mesh.conservation.Area(mesh, ignore_type=False)¶
Bases:
MeshConservationPotentialArea conservation potential.
Areaspecifies a global area conservation energy for each mesh type.\[U_t = k \frac{ (A_t - A_{0,t} )^2}{2 \cdot A_0}\]with \(A_t\) is the instantaneous total area of all triangles of type \(t\).
- Parameters:
mesh (
hoomd.mesh.Mesh) – Mesh data structure.ignore_type (
bool, optional) – ignores mesh type if set toTrueand calculates the conservation energy considering all triangles in the mesh. Defaults toFalse.
- parameter¶
The parameter of the area conservation for each mesh type. The dictionary has the following keys:
k(float, required) - bending stiffness \([\mathrm{energy} \cdot \mathrm{length}^{-2}]\)A0(float, required) - targeted global surface area \([\mathrm{length}]^2]\)
- Type:
Example:
area_conservation_potential = hoomd.md.mesh.conservation.Area(mesh) area_conservation_potential.params["mesh"] = dict(k=10.0, A0=250)
- class hoomd.md.mesh.conservation.TriangleArea(mesh)¶
Bases:
MeshPotentialTriangle Area conservation potential.
TriangleAreaspecifies an area conservation energy by applying an area constraint to each triangle of the mesh.\[U(r) = k \sum_{i,j,k \in \mathrm{mesh{ }triangle}} \frac{( N_\mathrm{tri} \cdot A_{ijk} - A_0 )^2} {2 \cdot A_0 \cdot N_\mathrm{tri}}\]The potential sums over the area \(A_{ijk}\) of all triplets \(i\), \(j\) and \(k\) that make up a triangle in the mesh. The number of triangles in the mesh are symbolized by \(N_\mathrm{tri}\).
- Parameters:
mesh (
hoomd.mesh.Mesh) – Mesh data structure.
- parameter¶
The parameter of the triangle area conservation for each mesh type. The dictionary has the following keys:
k(float, required) - area conservation coefficient \([\mathrm{energy} \cdot \mathrm{length}^{-2}]\)A0(float, required) - target surface area of a single triangle in the mesh \([\mathrm{length}]^2\)
- Type:
Example:
tringle_area_conservation_potential = \ hoomd.md.mesh.conservation.TriangleArea(mesh) tringle_area_conservation_potential.params["mesh"] = dict(k=10.0, A0=250)
- class hoomd.md.mesh.conservation.Volume(mesh, ignore_type=False)¶
Bases:
MeshConservationPotentialVolume conservation potential.
Volumespecifies a volume constraint on the whole mesh surface:\[U(r) = k \frac{( V(r) - V_0 )^2}{2 \cdot V_0}\]- Parameters:
mesh (
hoomd.mesh.Mesh) – Mesh data structure.ignore_type (
bool, optional) – ignores mesh type if set toTrueand calculates the conservation energy considering all triangles in the mesh. Defaults toFalse.
- parameter¶
The parameter of the volume constraint for the defined mesh. The dictionary has the following keys:
k(float, required) - potential constant \([\mathrm{energy} \cdot \mathrm{length}^{-3}]\)V0(float, required) - target volume \([\mathrm{length}^{3}]\)
- Type:
Example:
volume = hoomd.md.mesh.conservation.Volume(mesh) volume.params["mesh"] = dict(k=10.0, V0=100)