ConvexSpheropolyhedronUnion

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

Bases: HPMCIntegrator

Convex spheropolyhedron union 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 unions of convex sphereopolyhedra. The union shape \(S\) is the set union of the given convex spheropolyhedra:

\[S = \bigcup_k S_k(\mathbf{q}_k, \vec{r}_k)\]

Each constituent shape in the union has its own shape parameters \(S_k\), position \(\vec{r}_k\), and orientation \(\mathbf{q}_k\) (see shape).

Note

This shape uses an internal OBB tree for fast collision queries. Depending on the number of constituent spheropolyhedra in the tree, different values of the number of spheropolyhedra per leaf node may yield different performance. The capacity of leaf nodes is configurable.

Wall support.

ConvexSpheropolyhedronUnion supports no hoomd.wall geometries.

Example:

mc = hoomd.hpmc.integrate.ConvexSpheropolyhedronUnion(default_d=0.3,
                                                      default_a=0.4)
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(shapes=[cube_verts, cube_verts],
                     positions=[(0, 0, 0), (0, 0, 1)],
                     orientations=[(1, 0, 0, 0), (1, 0, 0, 0)],
                     overlap=[1, 1]);
print('vertices of the first cube = ',
      mc.shape["A"]["shapes"][0]["vertices"])
print('center of the first cube = ', mc.shape["A"]["positions"][0])
print('orientation of the first cube = ',
      mc.shape_param["A"]["orientations"][0])

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

shape

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

  • shapes (list [dict], required) - Shape parameters for each spheropolyhedron in the union. See ConvexSpheropolyhedron.shape for the accepted parameters.

  • positions (list [tuple [float, float, float]], required) - Position of each spheropolyhedron in the union. \([\mathrm{length}]\)

  • orientations (list [ tuple [float, float, float, float]], default: None) - Orientation of each spheropolyhedron in the union. When not None, orientations must have a length equal to that of positions. When None (the default), orientations is initialized with all [1,0,0,0]’s.

  • overlap (list [int], default: None) - Check for overlaps between constituent particles when overlap [i] & overlap[j] is nonzero (& is the bitwise AND operator). When not None, overlap must have a length equal to that of positions. When None (the default), overlap is initialized with all 1’s.

  • capacity (int, default: 4) - set the maximum number of particles per leaf node to adjust performance.

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

Type:

TypeParameter [particle type, dict]