Integrator¶
- class hoomd.mpcd.Integrator(dt, integrate_rotational_dof=False, forces=None, constraints=None, methods=None, rigid=None, half_step_hook=None, streaming_method=None, collision_method=None, virtual_particle_fillers=None, mpcd_particle_sorter=None)¶
Bases:
Integrator
MPCD integrator.
- Parameters:
dt (float) – Integrator time step size \([\mathrm{time}]\).
methods (Sequence[hoomd.md.methods.Method]) – Sequence of integration methods. The default value of
None
initializes an empty list.forces (Sequence[hoomd.md.force.Force]) – Sequence of forces applied to the particles in the system. The default value of
None
initializes an empty list.integrate_rotational_dof (bool) – When True, integrate rotational degrees of freedom.
constraints (Sequence[hoomd.md.constrain.Constraint]) – Sequence of constraint forces applied to the particles in the system. The default value of
None
initializes an empty list. Rigid body objects (i.e.hoomd.md.constrain.Rigid
) are not allowed in the list.rigid (hoomd.md.constrain.Rigid) – An object defining the rigid bodies in the simulation.
half_step_hook (hoomd.md.HalfStepHook) – Enables the user to perform arbitrary computations during the half-step of the integration.
streaming_method (hoomd.mpcd.stream.StreamingMethod) – Streaming method for the MPCD particles.
collision_method (hoomd.mpcd.collide.CollisionMethod) – Collision method for the MPCD particles and any embedded particles.
virtual_particle_fillers – (Sequence[hoomd.mpcd.fill.VirtualParticleFiller]): MPCD virtual-particle filler(s).
mpcd_particle_sorter (hoomd.mpcd.tune.ParticleSorter) – Tuner that sorts the MPCD particles.
The MPCD
Integrator
enables the MPCD algorithm concurrently with standard MD methods.In MPCD simulations,
dt
defines the amount of time that the system is advanced forward every time step. MPCD streaming and collision steps can be defined to occur in multiples ofdt
. In these cases, any MD particle data will be updated everydt
, while the MPCD particle data is updated asynchronously for performance. For example, if MPCD streaming happens every 5 steps, then the particle data will be updated as follows:0 1 2 3 4 5 MD: |---->|---->|---->|---->|---->| MPCD: |---------------------------->|
If the MPCD particle data is accessed via the snapshot interface at time step 3, it will actually contain the MPCD particle data for time step 5. The MD particles can be read at any time step because their positions are updated every step.
Examples:
Integrator for only MPCD particles.
stream = hoomd.mpcd.stream.Bulk(period=1) collide = hoomd.mpcd.collide.StochasticRotationDynamics( period=1, angle=130 ) integrator = hoomd.mpcd.Integrator( dt=0.1, streaming_method=stream, collision_method=collide, mpcd_particle_sorter=hoomd.mpcd.tune.ParticleSorter(trigger=20), ) simulation.operations.integrator = integrator
MPCD integrator with solutes.
dt_md = 0.005 md_steps_per_collision = 20 # collision time = 0.1 stream = hoomd.mpcd.stream.Bulk(period=md_steps_per_collision) collide = hoomd.mpcd.collide.StochasticRotationDynamics( period=md_steps_per_collision, angle=130, embedded_particles=hoomd.filter.All(), ) solute_method = hoomd.md.methods.ConstantVolume( filter=collide.embedded_particles ) integrator = hoomd.mpcd.Integrator( dt=dt_md, methods=[solute_method], streaming_method=stream, collision_method=collide, mpcd_particle_sorter=hoomd.mpcd.tune.ParticleSorter( trigger=20 * md_steps_per_collision ), ) simulation.operations.integrator = integrator
MPCD integrator with virtual particle filler.
plates = hoomd.mpcd.geometry.ParallelPlates(separation=6.0) stream = hoomd.mpcd.stream.BounceBack(period=1, geometry=plates) collide = hoomd.mpcd.collide.StochasticRotationDynamics( period=1, angle=130, kT=1.0 ) filler = hoomd.mpcd.fill.GeometryFiller( type="A", density=5.0, kT=1.0, geometry=plates ) integrator = hoomd.mpcd.Integrator( dt=0.1, streaming_method=stream, collision_method=collide, virtual_particle_fillers=[filler], mpcd_particle_sorter=hoomd.mpcd.tune.ParticleSorter(trigger=20), ) simulation.operations.integrator = integrator
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
Integrator
:- constraints¶
List of constraint forces applied to the system.
Read more...
- dt¶
Integrator time step size.
Read more...
- forces¶
List of the forces applied to the system.
Read more...
- half_step_hook¶
User-defined method that executes between the half steps.
Read more...
- integrate_rotational_dof¶
When True, integrate rotational degrees of freedom.
Read more...
- methods¶
List of integration methods applied to the system.
Read more...
- rigid¶
Rigid body constraint.
Read more...
- property linear_momentum¶
The linear momentum of the system.
Read more...
Members defined in
hoomd.mpcd.Integrator
:- collision_method¶
Collision method for the MPCD particles and any embedded particles.
- mpcd_particle_sorter¶
Tuner that sorts the MPCD particles (recommended).
- streaming_method¶
Streaming method for the MPCD particles.
- property cell_list¶
Collision cell list.
A
CellList
is automatically created with eachIntegrator
using the default settings.
- property virtual_particle_fillers¶
MPCD virtual-particle fillers.
- Type:
Sequence[hoomd.mpcd.fill.VirtualParticleFiller]