NPTLangevinState

class torch_sim.integrators.npt.NPTLangevinState(positions, masses, cell, pbc, atomic_numbers, system_idx, momenta, *, energy, forces, stress, reference_cell, cell_positions, cell_velocities, cell_masses)[source]

Bases: MDState

State information for an NPT system with Langevin dynamics.

This class represents the complete state of a molecular system being integrated in the NPT (constant particle number, pressure, temperature) ensemble using Langevin dynamics. In addition to particle positions and momenta, it tracks cell dimensions and their dynamics for volume fluctuations.

Variables:
  • positions (torch.Tensor) – Particle positions [n_particles, n_dim]

  • velocities (torch.Tensor) – Particle velocities [n_particles, n_dim]

  • energy (torch.Tensor) – Energy of the system [n_systems]

  • forces (torch.Tensor) – Forces on particles [n_particles, n_dim]

  • masses (torch.Tensor) – Particle masses [n_particles]

  • cell (torch.Tensor) – Simulation cell matrix [n_systems, n_dim, n_dim]

  • pbc (bool) – Whether to use periodic boundary conditions

  • system_idx (torch.Tensor) – System indices [n_particles]

  • atomic_numbers (torch.Tensor) – Atomic numbers [n_particles]

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

  • reference_cell (torch.Tensor) – Original cell vectors used as reference for scaling [n_systems, n_dim, n_dim]

  • cell_positions (torch.Tensor) – Cell positions [n_systems, n_dim, n_dim]

  • cell_velocities (torch.Tensor) – Cell velocities [n_systems, n_dim, n_dim]

  • cell_masses (torch.Tensor) – Masses associated with the cell degrees of freedom shape [n_systems]

Parameters:
Properties:
momenta (torch.Tensor): Particle momenta calculated as velocities*masses

with shape [n_particles, n_dimensions]

n_systems (int): Number of independent systems in the batch device (torch.device): Device on which tensors are stored dtype (torch.dtype): Data type of tensors