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 = seedbefore calling.- Parameters:
state (SimState) – SimState containing positions, masses, cell, pbc
model (ModelInterface) – Model computing energy, forces, stress
kT (Annotated[float | Tensor, UnitAnnotation(factor=<MetalUnits.mass: 1.0>)]) – Target temperature in energy units
dt (Annotated[float | Tensor, UnitAnnotation(factor=<MetalUnits.time: 98.22694788464062>)]) – Integration timestep
alpha (Annotated[float | Tensor, UnitAnnotation(factor=0.010180505671156725)] | None) – Particle friction. Defaults to 1/(5·dt).
cell_alpha (Annotated[float | Tensor, UnitAnnotation(factor=0.010180505671156725)] | None) – Cell friction. Defaults to 1/(30·dt).
b_tau (Annotated[float | Tensor, UnitAnnotation(factor=<MetalUnits.time: 98.22694788464062>)] | None) – Barostat time constant. Defaults to 300·dt.
_kwargs (Any)
- Returns:
NPTLangevinAnisotropicState with εi = 0 for all dimensions
- Return type: