npt_crescale_init¶
- torch_sim.integrators.npt.npt_crescale_init(state, model, *, kT, dt, tau_p=None, isothermal_compressibility=None)[source]¶
Initialize the NPT cell rescaling state.
This function initializes a state for NPT molecular dynamics with a cell rescaling barostat. It sets up the system with appropriate initial conditions including particle positions, momenta, and cell variables.
Only allow isotropic external stress, but can run both isotropic and anisotropic cell rescaling.
To seed the RNG set
state.rng = seedbefore calling.- Parameters:
state (SimState) – Initial system state as SimState containing positions, masses, cell, and PBC information
model (
ModelInterface) – Model to compute forces and energiestau_p (float | Tensor | None) – Barostat relaxation time. Controls how quickly pressure equilibrates.
isothermal_compressibility (float | Tensor | None) – Isothermal compressibility of the system.
- Return type: