jaxdem.integrators.langevin#
Langevin Integrator
Classes
|
Langevin thermostat integrator for the translational degrees of freedom. |
- class jaxdem.integrators.langevin.Langevin(gamma: Array, k_B: Array, temperature: Array)#
Bases:
LinearIntegratorLangevin thermostat integrator for the translational degrees of freedom.
Integrates the underdamped Langevin equation
\[m\,\dot{\vec{v}} = \vec{F} - m \gamma \vec{v} + \sqrt{2 m \gamma k_B T}\, \vec{\eta}(t)\]using the BAOAB splitting scheme (Leimkuhler & Matthews): half kick (B), half drift (A), exact Ornstein-Uhlenbeck update of the velocity (O), half drift (A), and a final half kick (B) after the force evaluation. The O-step samples the friction and Gaussian noise exactly, driving the system towards the canonical distribution at temperature \(T\).
Fixed particles keep their prescribed velocities and are not thermostatted.
- Parameters:
gamma (jax.Array) – Friction (collision) coefficient \(\gamma\) with units of inverse time; sets how strongly velocities are damped and rethermalized.
k_B (jax.Array) – Boltzmann constant (set to 1.0 for reduced units).
temperature (jax.Array) – Target temperature \(T\) of the thermostat.
- gamma: Array#
- k_B: Array#
- temperature: Array#
- static step_before_force(state: State, system: System) tuple[State, System][source]#
Perform the BAOA part of the BAOAB step.
Applies a half kick with the current forces, a half drift, the exact Ornstein-Uhlenbeck velocity update
\[\vec{v} \leftarrow c_1 \vec{v} + c_2 \vec{\eta}, \qquad c_1 = e^{-\gamma \Delta t}, \qquad c_2 = \sqrt{\tfrac{k_B T}{m}\left(1 - e^{-2\gamma \Delta t}\right)}\]with \(\vec{\eta} \sim \mathcal{N}(0, 1)\), and a second half drift.
system.keyis split to draw the noise. Fixed particles keep their prescribed velocities.