NPTState

class torch_sim.integrators.npt.NPTState(*, positions, masses, cell, pbc, atomic_numbers, charge=None, spin=None, system_idx=None, _constraints=<factory>, _rng=None, momenta, energy, forces, stress)[source]

Bases: MDState

State information for an NPT system.

This class extends MDState with the stress tensor needed for constant-pressure simulations. Integrator-specific NPT states (e.g., NPTLangevinState, NPTNoseHooverState) inherit from this class and add their own auxiliary variables.

Variables:

stress (torch.Tensor) – Stress tensor [n_systems, n_dim, n_dim]

Parameters: