npt_langevin_anisotropic_init

torch_sim.integrators.npt.npt_langevin_anisotropic_init(state, model, *, kT, dt, alpha=None, cell_alpha=None, b_tau=None, **_kwargs)[source]

Initialize NPT Langevin state with independent per-dimension cell lengths.

Each spatial dimension gets its own strain DOF εi = ln(Li/Li0), driven by the corresponding diagonal pressure component.

To seed the RNG set state.rng = seed before calling.

Parameters:
  • state (SimState) – SimState containing positions, masses, cell, pbc

  • model (ModelInterface) – Model computing energy, forces, stress

  • kT (float | Tensor) – Target temperature in energy units

  • dt (float | Tensor) – Integration timestep

  • alpha (float | Tensor | None) – Particle friction. Defaults to 1/(5·dt).

  • cell_alpha (float | Tensor | None) – Cell friction. Defaults to 1/(30·dt).

  • b_tau (float | Tensor | None) – Barostat time constant. Defaults to 300·dt.

  • _kwargs (Any)

Returns:

NPTLangevinAnisotropicState with εi = 0 for all dimensions

Return type:

NPTLangevinAnisotropicState