Elastic

class hoomd.hpmc.shape_move.Elastic(stiffness, mc, default_step_size=None, normal_shear_ratio=0.5)

Bases: ShapeMove

Elastic shape move.

Apply volume preserving normal and shear shape moves to particles with a deformation energy penalty. When volume preserving deformations, the strain energy penalty is approximated as:

\[U \approx \mu \text{Tr}[\boldsymbol{\varepsilon}^2]V\]

where \(\mu\) is the stiffness constant, \(\text{Tr}\) is the trace operator, \(\boldsymbol{\varepsilon}\) is the strain tensor and \(V\) is the particle volume.

Parameters:
  • stiffness (hoomd.variant.variant_like) – Shape stiffness against deformations.

  • mc (hoomd.hpmc.integrate.HPMCIntegrator) – The class of the MC shape integrator or an instance (see hoomd.hpmc.integrate) to use with this elastic shape. Must be a compatible class. We use this argument to create validation for reference_shape.

  • default_step_size (float, optional) – Default maximum size of shape trial moves (default: None). By default requires setting step size for all types.

  • normal_shear_ratio (float, optional) – Fraction of normal to shear deformation trial moves (default: 0.5).

Shape support.

The following shapes are supported:

Note

An instance is only able to be used with the passed HPMC integrator class.

Example:

mc = hoomd.hpmc.integrate.ConvexPolyhedron()
verts = [(1, 1, 1), (-1, -1, 1), (1, -1, -1), (-1, 1, -1)]
mc.shape["A"] = dict(vertices=verts)
elastic_move = hoomd.hpmc.shape_move.Elastic(stiffness=10, mc)
elastic_move.stiffness = 100
elastic_move.reference_shape["A"] = verts

Members inherited from ShapeMove:

step_size

Maximum size of the shape trial moves. Read more...


Members defined in Elastic:

stiffness

Shape stiffness against deformations.

Type:

hoomd.variant.Variant

reference_shape

Reference shape against to which compute the deformation energy.

Type:

TypeParameter [particle type, dict]

normal_shear_ratio

Fraction of normal to shear deformation trial moves (default: 0.5).

Type:

float, optional