nanover.openmm.thermo module
Calculate thermodynamic quantities associated with the simulation.
- nanover.openmm.thermo.compute_dof(system)
Compute the number of degrees of freedom of the system, using the same procedure as the StateDataReporter in OpenMM. :param system: OpenMM system. :return: Number of degrees of freedom of the system.
- nanover.openmm.thermo.compute_instantaneous_temperature(simulation: Simulation, kinetic_energy: float, dof: int)
Calculate the instantaneous temperature of the system (in Kelvin), using the same procedure as the StateDataReporter in OpenMM. If the integrator has an internal function to do this, that function is used. Otherwise, it is calculated using the kinetic energy of the system, according to
\[T = \frac{2 * \mathrm{KE}}{N_{\mathrm{dof}} * R}\]where KE is the kinetic energy of the system, N_{dof} is the number of degrees of freedom of the system and R is the molar gas constant.
- Parameters:
simulation – OpenMM simulation of the system.
kinetic_energy – Kinetic energy of the system (in kJ mol-1).
dof – Number of degrees of freedom of the system.
- Returns:
Instantaneous temperature of the system (in Kelvin).