Langevin¶
- class hoomd.md.methods.Langevin(filter, kT, tally_reservoir_energy=False, default_gamma=1.0, default_gamma_r=(1.0, 1.0, 1.0))¶
Bases:
Method
Langevin dynamics.
- Parameters:
filter (hoomd.filter.filter_like) – Subset of particles to apply this method to.
kT (hoomd.variant.variant_like) – Temperature of the simulation .
tally_reservoir_energy (bool) – When True, track the energy exchange between the thermal reservoir and the particles. Defaults to False .
default_gamma (float) – Default drag coefficient for all particle types .
default_gamma_r ([
float
,float
,float
]) – Default rotational drag coefficient tensor for all particles .
Langevin
integrates particles forward in time according to the Langevin equations of motion, modelling a canonical ensemble (NVT).The translational degrees of freedom follow:
where is the force on the particle from all potentials and constraint forces, is the drag coefficient, is the particle’s velocity, is a uniform random force, and is the dimensionality of the system (2 or 3). The magnitude of the random force is chosen via the fluctuation-dissipation theorem to be consistent with the specified drag and temperature, .
About axes where , the rotational degrees of freedom follow:
where , is the i-th component of the rotational drag coefficient (
gamma_r
), is a component of the uniform random torque, is the particle’s angular velocity and is the the particle’s moment of inertia. The magnitude of the random torque is chosen via the fluctuation-dissipation theorem to be consistent with the specified drag and temperature, .Langevin
numerically integrates the translational degrees of freedom using Velocity-Verlet and the rotational degrees of freedom with a scheme based on Kamberaj 2005.The attributes
gamma
andgamma_r
set the translational and rotational damping coefficients, respectively, by particle type.Example:
langevin = hoomd.md.methods.Langevin(filter=hoomd.filter.All(), kT=1.5) simulation.operations.integrator.methods = [langevin]
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
Langevin
:- filter¶
Subset of particles to apply this method to.
- Type:
- kT¶
Temperature of the simulation .
Examples:
langevin.kT = 1.0
langevin.kT = hoomd.variant.Ramp( A=2.0, B=1.0, t_start=0, t_ramp=1_000_000 )
- Type:
- tally_reservoir_energy¶
When True, track the energy exchange between the thermal reservoir and the particles.
Example:
langevin.tally_reservoir_energy = True
- Type:
- gamma¶
The drag coefficient for each particle type .
Example:
langevin.gamma["A"] = 0.5
- Type:
TypeParameter[
particle type
,float
]
- gamma_r¶
The rotational drag coefficient tensor for each particle type .
Example:
langevin.gamma_r["A"] = [1.0, 2.0, 3.0]
- property reservoir_energy¶
Energy absorbed by the reservoir .
Set
tally_reservoir_energy
toTrue
to track the reservoir energy.Example:
langevin.tally_reservoir_energy = True logger.add(obj=langevin, quantities=["reservoir_energy"])
Warning
When continuing a simulation, the energy of the reservoir will be reset to zero.
(
Loggable
: category=”scalar”)