Integrator¶
- class hoomd.md.Integrator(dt, integrate_rotational_dof=False, forces=None, constraints=None, methods=None, rigid=None, half_step_hook=None)¶
Bases:
Molecular dynamics time integration.
- Parameters:
dt (float) – Integrator time step size .
methods (Sequence[hoomd.md.methods.Method]) – Sequence of integration methods. The default value of
Noneinitializes an empty list.forces (Sequence[hoomd.md.force.Force]) – Sequence of forces applied to the particles in the system. The default value of
Noneinitializes 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
Noneinitializes 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.
Integratoris the top level class that orchestrates the time integration step in molecular dynamics simulations. The integrationmethodsdefine the equations of motion to integrate under the influence of the givenforcesandconstraints.Each method applies the given equations of motion to a subset of particles in the simulation state. See the documentation for each method for details on what equations of motion it solves. The intersection of the subsets must be null.
Integratorcomputes the net force, torque, energy, and virial on each particle as a sum of those applied byhoomd.md.force.Forceobjects in theforcesandconstraintslists:Integratoralso computes the net additional energy and virialSee
md.force.Forcefor definitions of these terms. Constraints are a special type of force used to enforce specific constraints on the system state, such as distances between particles withhoomd.md.constrain.Distance.Integratorhandles rigid bodies as a special case, as it only integrates the degrees of freedom of each body’s center of mass. Seehoomd.md.constrain.Rigidfor details.Degrees of freedom
Integratoralways integrates the translational degrees of freedom. It optionally integrates one or more rotational degrees of freedom for a given particle i when all the following conditions are met:The integration method supports rotational degrees of freedom.
integrate_rotational_dofisTrue.The moment of inertia is non-zero .
Each particle may have zero, one, two, or three rotational degrees of freedom.
Note
By default,
integrate_rotational_dofisFalse.gsdandhoomd.Snapshotalso set particle moments of inertia to 0 by default.Classes
Classes of the following modules can be used as elements in
methods:The classes of following modules can be used as elements in
forces:The classes of the following module can be used as elements in
constraints:Example:
cell = hoomd.md.nlist.Cell(buffer=0.4) lj = hoomd.md.pair.LJ(nlist=cell) lj.params[('A', 'A')] = dict(epsilon=1.0, sigma=1.0) lj.r_cut[('A', 'A')] = 2.5 nve = hoomd.md.methods.ConstantVolume( filter=hoomd.filter.All(), thermostat=None, ) integrator = hoomd.md.Integrator(dt=0.005, methods=[nve], forces=[lj], )
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
Integrator:- constraints¶
List of constraint forces applied to the particles in the system.
- forces¶
List of forces applied to the particles in the system.
- Type:
- half_step_hook¶
User-defined implementation to perform computations during the half-step of the integration.
- Type:
- methods¶
List of integration methods.
- Type:
- rigid¶
The rigid body definition for the simulation associated with the integrator.
- Type:
- __setattr__(attr, value)¶
Handle group DOF update when setting integrate_rotational_dof.