FacetedEllipsoid

class hoomd.hpmc.integrate.FacetedEllipsoid(default_d=0.1, default_a=0.1, translation_move_probability=0.5, nselect=4, kT=1.0)

Bases: HPMCIntegrator

Faceted ellipsoid hard particle Monte Carlo integrator.

Parameters:
  • default_d (float) – Default maximum size of displacement trial moves \([\mathrm{length}]\).

  • default_a (float) – Default maximum size of rotation trial moves \([\mathrm{dimensionless}]\).

  • translation_move_probability (float) – Fraction of moves that are translation moves.

  • nselect (int) – Number of trial moves to perform per particle per timestep.

  • kT (hoomd.variant.variant_like) – Temperature set point \([\\mathrm{energy}]\).

Perform hard particle Monte Carlo of faceted ellipsoids. The shape \(S\) of a faceted ellipsoid is the intersection of an ellipsoid with a convex polyhedron defined through halfspaces (see shape). The equation defining each halfspace is given by:

\[\vec{n}_i\cdot \vec{r} + b_i \le 0\]

where \(\vec{n}_i\) is the face normal, and \(b_i\) is the offset.

Wall support.

FacetedEllipsoid supports no hoomd.wall geometries.

Example:

mc = hpmc.integrate.FacetedEllipsoid(default_d=0.3, default_a=0.4)

# half-space intersection
slab_normals = [
    (-1, 0, 0),
    (1, 0, 0),
    (0, -1, 0),
    (0, 1, 0),
    (0, 0, -1),
    (0, 0, 1),
]
slab_offsets = [-0.1, -1, -0.5, -0.5, -0.5, -0.5]

# polyedron vertices
slab_verts = [
    [-0.1, -0.5, -0.5],
    [-0.1, -0.5, 0.5],
    [-0.1, 0.5, 0.5],
    [-0.1, 0.5, -0.5],
    [1, -0.5, -0.5],
    [1, -0.5, 0.5],
    [1, 0.5, 0.5],
    [1, 0.5, -0.5],
]

mc.shape["A"] = dict(
    normals=slab_normals,
    offsets=slab_offsets,
    vertices=slab_verts,
    a=1.0,
    b=0.5,
    c=0.5,
)
print(
    "a = {}, b = {}, c = {}",
    mc.shape["A"]["a"],
    mc.shape["A"]["b"],
    mc.shape["A"]["c"],
)

Members inherited from AutotunedObject:

property kernel_parameters

Kernel parameters. Read more...

property is_tuning_complete

Check if kernel parameter tuning is complete. Read more...

tune_kernel_parameters()

Start tuning kernel parameters. Read more...


Members inherited from HPMCIntegrator:

a

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

d

Maximum size of displacement trial moves Read more...

interaction_matrix

Set which types interact with other types. Read more...

translation_move_probability

Fraction of moves to be selected as translation moves. Read more...

nselect

Number of trial moves to perform per particle per timestep. Read more...

kT

Temperature set point. Read more...

property counters

Trial move counters. Read more...

property external_energy

Total external energy contributed by all external potentials. Read more...

property external_potentials

External potentials to apply. Read more...

property map_overlaps

List of overlapping particles. Read more...

property mps

Number of trial moves performed per second. Read more...

property overlaps

Number of overlapping particle pairs. Read more...

property pair_energy

Total potential energy contributed by all pair potentials. Read more...

property pair_potentials

Pair potentials to apply. Read more...

property rotate_moves

Count of the accepted and rejected rotate moves. Read more...

property translate_moves

Count of the accepted and rejected translate moves. Read more...


Members defined in FacetedEllipsoid:

shape

The shape parameters for each particle type. The dictionary has the following keys:

  • normals (list [tuple [float, float, float]], required) - facet normals \(\\vec{n}_i\).

  • offsets (list [float], required) - list of offsets \(b_i\) \([\mathrm{length}^2]\)

  • a (float, required) - half axis of ellipsoid in the x direction \([\mathrm{length}]\)

  • b (float, required) - half axis of ellipsoid in the y direction \([\mathrm{length}]\)

  • c (float, required) - half axis of ellipsoid in the z direction \([\mathrm{length}]\)

  • vertices (list [tuple [float, float, float]], default: []) - list of vertices for intersection polyhedron (see note below). \([\mathrm{length}]\)

  • origin (tuple [float, float, float], default: (0,0,0)) - A point inside the shape. \([\mathrm{length}]\)

  • ignore_statistics (bool, default: False) - set to True to ignore tracked statistics.

Important

The origin must be chosen so as to lie inside the shape, or the overlap check will not work. This condition is not checked.

Warning

Planes must not be coplanar.

Note

For simple intersections with planes that do not intersect within the sphere, the vertices list can be left empty. When specified, the half-space intersection of the normals must match the convex polyhedron defined by the vertices (if non-empty), the half-space intersection is not calculated automatically.

Type:

TypeParameter[particle type, dict]