pele.utils._pressure_tensor#
# distutils: language = C++ # cython: language_level=3str
This module provides access to the c++ pressure measurement.
- pele.utils._pressure_tensor.pressure_tensor()
-
def pressure_tensor(pot, x, volume, ndim):Computes the pressure tensor and returns the scalar pressure.
The negative of the pressure tensor is often called the stress tensor, see Allen, Tidsley, “Computer Simulation of Liquids” pp. 60-61.
- Parameters:
- potbase-potential
potential for pressure computation
- xarray
particle coordinates
- volumescalar
box volume
- ndimscalar
box dimension
- Returns:
- ppressure (trace of ptensor?)
- ptensorpressure tensor