ConvexSpheropolygon

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

Bases: HPMCIntegrator

Convex spheropolygon 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 convex spheropolygons. The shape \(S\) of a convex spheropolygon includes the points inside and on the surface of the convex hull of the vertices plus a disk (with radius sweep_radius)swept along the perimeter (see shape). For example:

Example of a convex spheropolygon with vertex and sweep labels.

Important

ConvexSpheropolygon simulations must be performed in 2D systems.

Tip

To model mixtures of convex polygons and convex spheropolygons, use ConvexSpheropolygon and set the sweep radius to 0 for some shape types.

Tip

A 1-vertex spheropolygon is a disk and a 2-vertex spheropolygon is a rectangle with half disk caps.

Wall support.

ConvexSpheropolygon supports no hoomd.wall geometries.

Examples:

mc = hoomd.hpmc.integrate.ConvexSpheropolygon(
    default_d=0.3, default_a=0.4
)
mc.shape["A"] = dict(
    vertices=[
        (-0.5, -0.5),
        (0.5, -0.5),
        (0.5, 0.5),
        (-0.5, 0.5),
    ],
    sweep_radius=0.1,
)
mc.shape["A"] = dict(
    vertices=[(0, 0)],
    sweep_radius=0.5,
    ignore_statistics=True,
)
print("vertices = ", mc.shape["A"]["vertices"])

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 ConvexSpheropolygon:

shape

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

  • vertices (list [tuple [float, float]], required) - vertices of the polygon \([\mathrm{length}]\).

    • The origin MUST be contained within the spheropolygon.

    • Points inside the polygon should not be included.

    • The origin centered circle that encloses all vertices should be of minimal size for optimal performance.

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

  • sweep_radius (default: 0.0) - radius of the disk swept around the edges of the polygon \([\mathrm{length}]\). Set a non-zero sweep_radius to create a spheropolygon.

Warning

HPMC does not check that all vertex requirements are met. Undefined behavior will result when they are violated.

Type:

TypeParameter [particle type, dict]

property type_shapes

Description of shapes in type_shapes format.

Example

>>> mc.type_shapes()
[{'type': 'Polygon', 'sweep_radius': 0.1,
  'vertices': [[-0.5, -0.5], [0.5, -0.5], [0.5, 0.5], [-0.5, 0.5]]}]

(Loggable: category=”object”)

Type:

list[dict]