espressopp.analysis.Temperature
Calculate the temperature of the system (in \(k_B T\) units).
- espressopp.analysis.Temperature(system)
- Parameters:
system (std::shared_ptr) – system object
- Returns:
temperature
- Return type:
real
Temperature of the system of \(N\) particles is calculated as:
\[T = \frac{1}{N_f} \sum^N_{i=1} m_i v_i^2,\]where \(m_i\) and \(v_i\) are the mass and velocity of a particle \(i\).
\(N_f = 3N\) is the number of the system’s degrees of freedom.
Example:
>>> # declare an object, e.g., T: >>> T = espressopp.analysis.Temperature(system) >>> >>> # later in your script compute temperature and print it: >>> print T.compute()