hoomd.update¶
Overview
Resizes the box between an initial and final box. |
|
Updater wrapper for |
Details
-
class
hoomd.update.
BoxResize
(box1, box2, variant, trigger, scale_particles=True)¶ Resizes the box between an initial and final box.
When part of a
Simulation
updater
list, this object will resize the box between the initial and final boxes passed. The behavior is a linear interpolation between the initial and final boxes where the minimum of the variant is tagged tobox1
and the maximum is tagged tobox2
. All values between the minimum and maximum result in a box that is the interpolation of the three lengths and tilt factors of the initial and final boxes.Note
The passed
Variant
must be bounded (i.e. it must have a true minimum and maximum) or the behavior of the updater is undefined.Note
Currently for MPI simulations the rescaling of particles does not work properly in HPMC.
- Parameters
box1 (hoomd.Box) – The box associated with the minimum of the passed variant.
box2 (hoomd.Box) – The box associated with the maximum of the passed variant.
variant (hoomd.variant.Variant) – A variant used to interpolate between the two boxes.
trigger (hoomd.trigger.Trigger) – The trigger to activate this updater.
scale_particles (bool) – Whether to scale particles to the new box dimensions when the box is resized.
-
variant
¶ A variant used to interpolate between the two boxes.
-
trigger
¶ The trigger to activate this updater.
-
scale_particles
¶ Whether to scale particles to the new box dimensions when the box is resized.
- Type
-
get_box
(timestep)¶ Get the box for a given timestep.
-
classmethod
linear_volume
(box1, box2, t_start, t_size, trigger, scale_particles=True)¶ Create a
BoxResize
object that will scale volume/area linearly.This uses a
hoomd.variant.Power
variant under the hood.- Parameters
box1 (hoomd.Box) – The box associated with t_start.
box2 (hoomd.Box) – The box associated with t_start + t_size.
t_start (int) – The timestep to start the volume ramp.
t_size (int) – The length of the volume ramp
trigger (hoomd.trigger.Trigger) – The trigger to activate this updater. scale_particles (bool): Whether to scale particles to the new box dimensions when the box is resized.
scale_particles (bool) – Whether to scale particles to the new box dimensions when the box is resized.
- Returns
An operation that will scale between the boxes linearly in volume (area for 2D).
- Return type
-
class
hoomd.update.
CustomUpdater
(action, trigger=1)¶ Updater wrapper for
hoomd.custom.Action
objects.For usage see
hoomd.custom.CustomOperation
.