StochasticRotationDynamics¶
- class hoomd.mpcd.collide.StochasticRotationDynamics(period, angle, kT=None, embedded_particles=None)¶
Bases:
CollisionMethod
Stochastic rotation dynamics collision method.
- Parameters:
period (int) – Number of integration steps between collisions.
angle (float) – Rotation angle (in degrees).
kT (hoomd.variant.variant_like) – Temperature for the collision thermostat \([\mathrm{energy}]\). If None, no thermostat is used.
embedded_particles (hoomd.filter.ParticleFilter) – HOOMD particles to include in collision.
This class implements the stochastic rotation dynamics (SRD) collision rule for MPCD proposed by Malevanets and Kapral. Every
period
steps, the particles are binned into cells. The particle velocities are then rotated byangle
around an axis randomly drawn from the unit sphere. The rotation is done relative to the average velocity, so this rotation rule conserves linear momentum and kinetic energy within each cell.The SRD method naturally imparts the NVE ensemble to the system comprising the MPCD particles and the
embedded_particles
. Accordingly, the system must be properly initialized to the correct temperature. A thermostat can be applied in conjunction with the SRD method through thekT
parameter. SRD employs a Maxwell-Boltzmann thermostat on the cell level, which generates a constant-temperature ensemble. The temperature is defined relative to the cell-average velocity, and so can be used to dissipate heat in nonequilibrium simulations. Under this thermostat, the SRD algorithm still conserves linear momentum, but kinetic energy is no longer conserved.Examples:
Collision of MPCD particles.
srd = hoomd.mpcd.collide.StochasticRotationDynamics(period=1, angle=130) simulation.operations.integrator.collision_method = srd
Collision of MPCD particles with thermostat.
srd = hoomd.mpcd.collide.StochasticRotationDynamics( period=1, angle=130, kT=1.0 ) simulation.operations.integrator.collision_method = srd
Collision including embedded particles.
srd = hoomd.mpcd.collide.StochasticRotationDynamics( period=20, angle=130, kT=1.0, embedded_particles=hoomd.filter.All(), ) simulation.operations.integrator.collision_method = srd
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
CollisionMethod
:- embedded_particiles¶
HOOMD particles to include in collision.
Read more...
- period¶
Number of integration steps between collisions.
Read more...
Members defined in
StochasticRotationDynamics
:- kT¶
Temperature for the collision thermostat \([\mathrm{energy}]\).
Examples:
Constant temperature.
srd.kT = 1.0
Variable temperature.
srd.kT = hoomd.variant.Ramp(1.0, 2.0, 0, 100)