compute_average_pressure_tensor¶
- torch_sim.integrators.npt.compute_average_pressure_tensor(*, degrees_of_freedom, kT, stress, volumes)[source]¶
Compute forces on the cell for NPT dynamics.
This function calculates the instantaneous internal pressure tensor.
- Parameters:
degrees_of_freedom (
torch.Tensor) – Degrees of freedom of the system, shape (n_systems,)kT (
torch.Tensor) – Thermal energy (k_B * T), shape (n_systems,)stress (
torch.Tensor) – Stress tensor of the system, shape (n_systems, 3, 3)volumes (
torch.Tensor) – Volumes of the systems, shape (n_systems,)
- Returns:
Instanteneous internal pressure tesnor [n_systems, 3, 3]
- Return type: