npt_crescale_isotropic_step

torch_sim.integrators.npt.npt_crescale_isotropic_step(state, model, *, dt, kT, external_pressure, tau=None)[source]

Perform one NPT integration step with cell rescaling barostat.

This function performs a single integration step for NPT dynamics using a cell rescaling barostat. It updates particle positions, momenta, and the simulation cell based on the target temperature and pressure.

Trotter based splitting: 1. Half Thermostat (velocity scaling) 2. Half Update momenta with forces 3. Barostat (cell rescaling) 4. Update positions (from barostat + half momenta) 5. Update forces with new positions and cell 6. Compute forces 7. Half Update momenta with forces 8. Half Thermostat (velocity scaling)

Only allow isotropic external stress. This performs isotropic cell rescaling: cell shape is preserved, cell lengths are scaled equally. For anisotropic cell rescaling, use npt_crescale_anisotropic_step.

References

  • Bernetti, Mattia, and Giovanni Bussi.

“Pressure control using stochastic cell rescaling.” The Journal of Chemical Physics 153.11 (2020). - And the corresponding Supplementary Information which details the integration scheme. Notice an error in scaling of positions in SI Eq. S13a.

Parameters:
  • model (ModelInterface) – Model to compute forces and energies

  • state (NPTCRescaleState) – Current system state

  • dt (torch.Tensor) – Integration timestep

  • kT (torch.Tensor) – Target temperature

  • external_pressure (torch.Tensor) – Target external pressure

  • tau (torch.Tensor | None) – V-Rescale thermostat relaxation time. If None, defaults to 100*dt

Returns:

Updated state after one integration step

Return type:

NPTCRescaleState