HPMCIntegrator¶
- class hoomd.hpmc.integrate.HPMCIntegrator(default_d, default_a, translation_move_probability, nselect, kT)¶
Bases:
Integrator
Base class hard particle Monte Carlo integrator.
HPMCIntegrator
is the base class for all HPMC integrators. The attributes documented here are available to all HPMC integrators.See also
The module level documentation
hoomd.hpmc.integrate
describes the hard particle Monte Carlo algorithm.Warning
This class should not be instantiated by users. The class can be used for
isinstance
orissubclass
checks.Ignoring overlap checks
Set elements of
interaction_matrix
toFalse
to disable overlap checks between specific pairs of particle types.Writing type_shapes to GSD files.
Use a Logger in combination with a HPMC integrator and a GSD writer to write
type_shapes
to the GSD file for use with OVITO. For example:mc = hoomd.hpmc.integrate.Sphere() log = hoomd.logging.Logger() log.add(mc, quantities=['type_shapes']) gsd = hoomd.write.GSD( 'trajectory.gsd', hoomd.trigger.Periodic(1000), log=log)
Mixed precision
All HPMC integrators use reduced precision floating point arithmetic when checking for particle overlaps in the local particle reference frame.
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 defined in
HPMCIntegrator
:- a¶
Maximum size of rotation trial moves \([\mathrm{dimensionless}]\).
- Type:
TypeParameter
[particle type
,float
]
- d¶
Maximum size of displacement trial moves \([\mathrm{length}]\).
- Type:
TypeParameter
[particle type
,float
]
- interaction_matrix¶
Set to
False
for a pair of particle types to disable overlap checks between particles of those types (default:True
).- Type:
TypeParameter
[tuple
[particle type
,particle type
],bool
]
- kT¶
Temperature set point \([\mathrm{energy}]\).
- Type:
- property counters¶
Trial move counters.
The counter object has the following attributes:
translate
:tuple
[int
,int
] - Number of accepted and rejected translate trial moves.rotate
:tuple
[int
,int
] - Number of accepted and rejected rotate trial moves.overlap_checks
:int
- Number of overlap checks performed.overlap_errors
:int
- Number of overlap checks that were too close to resolve.
Note
The counts are reset to 0 at the start of each
hoomd.Simulation.run
.- Type:
- property external_energy¶
Total external energy contributed by all external potentials \([\mathrm{energy}]\).
(
Loggable
: category=”scalar”)- Type:
- property external_potentials¶
External potentials to apply.
Defines the external energy \(U_{\mathrm{external},i}\) as the sum over all potentials in the list.
Example
simulation.operations.integrator.external_potentials = [linear]
- Type:
- property map_overlaps¶
List of overlapping particles.
The list contains one entry for each overlapping pair of particles. When a tuple
(i,j)
is present in the list, there is an overlap between the particles with tagsi
andj
.Attention
map_overlaps
does not support MPI parallel simulations. It returnsNone
when there is more than one MPI rank.(
Loggable
: category=”sequence”)
- property mps¶
Number of trial moves performed per second.
Note
The count is reset at the start of each
hoomd.Simulation.run
.(
Loggable
: category=”scalar”)- Type:
- property pair_energy¶
Total potential energy contributed by all pair potentials \([\mathrm{energy}]\).
(
Loggable
: category=”scalar”)- Type:
- property pair_potentials¶
Pair potentials to apply.
Defines the pairwise particle interaction energy \(U_{\mathrm{pair},ij}\) as the sum over all potentials in the list.
Example
simulation.operations.integrator.pair_potentials = [lennard_jones]
- Type:
- property rotate_moves¶
Count of the accepted and rejected rotate moves.
Note
The counts are reset to 0 at the start of each
hoomd.Simulation.run
.(
Loggable
: category=”sequence”)