nvt_vrescale_step¶
- torch_sim.integrators.nvt.nvt_vrescale_step(model, state, *, dt, kT, tau=None)[source]¶
Perform one complete V-Rescale dynamics integration step.
This function implements the canonical sampling through velocity rescaling (V-Rescale) thermostat combined with velocity Verlet integration. The V-Rescale thermostat samples the canonical distribution by rescaling velocities with a properly chosen random factor that ensures correct canonical sampling.
- Parameters:
model (ModelInterface) – Neural network model that computes energies and forces. Must return a dict with ‘energy’ and ‘forces’ keys.
state (NVTVRescaleState) – Current system state containing positions, momenta, forces
dt (float | Tensor) – Integration timestep, either scalar or shape [n_systems]
kT (float | Tensor) – Target temperature in energy units, either scalar or with shape [n_systems]
tau (float | Tensor | None) – Thermostat relaxation time controlling the coupling strength, either scalar or with shape [n_systems]. Defaults to 100*dt.
seed – Random seed for reproducibility
- Returns:
- Updated state after one complete V-Rescale step with new positions,
momenta, forces, and energy
- Return type:
Notes
Uses V-Rescale thermostat for proper canonical ensemble sampling
Unlike Berendsen thermostat, V-Rescale samples the true canonical distribution
Integration sequence: V-Rescale rescaling + Velocity Verlet step
The rescaling factor follows the distribution derived in Bussi et al.
References
Bussi G, Donadio D, Parrinello M. “Canonical sampling through velocity rescaling.” The Journal of chemical physics, 126(1), 014101 (2007).