Vertex

class hoomd.hpmc.shape_move.Vertex(default_step_size=None, vertex_move_probability=1)

Bases: ShapeMove

Apply shape moves where particle vertices are translated.

Vertices are rescaled during each shape move to ensure that the shape maintains a constant volume. To preserve detail balance, the maximum step size is rescaled by volume**(1/3) every time a move is accepted.

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

  • vertex_move_probability (float, optional) – Average fraction of vertices to change during each shape move (default: 1).

Vertex moves apply a uniform move on each vertex with probability vertex_move_probability in a shape up to a maximum displacement of step_size for the composing instance. The shape volume is rescaled at the end of all the displacements to the specified volume. To preserve detail balance, the maximum step size is rescaled by \(V^{1 / 3}\) every time a move is accepted.

Shape support.

The following shapes are supported:

Note

hoomd.hpmc.integrate.ConvexPolyhedron models shapes that are the the convex hull of the given vertices.

Example:

mc = hoomd.hpmc.integrate.ConvexPolyhedron(23456)
cube_verts = [(1, 1, 1), (1, 1, -1), (1, -1, 1), (-1, 1, 1),
              (1, -1, -1), (-1, 1, -1), (-1, -1, 1), (-1, -1, -1)])
mc.shape["A"] = dict(vertices=numpy.asarray(cube_verts) / 2)
vertex_move = shape_move.Vertex()
vertex_move.volume["A"] = 1

Members inherited from ShapeMove:

step_size

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


Members defined in Vertex:

vertex_move_probability

Average fraction of vertices to change during each shape move.

Type:

float

volume

Volume of the particles to hold constant. The particles size is always rescaled to maintain this volume.

Type:

TypeParameter [particle type, float]