Kinetic energy and temperature

      Temperature is defined differently for different types of ensemble systems. For example, in simulations where thermodynamic properties describe the states of a system, temperature T is defined with entropy S and energy E as follows:
..........(1)

While Eq. 1 is appropriate for equilibrium states, the definition of temperature is different from that in non-equilibrium MD simulations. The average kinetic energy per degree of freedom is defined as follows:
.........(2)

where kB is the Boltzmann constant, m is mass, and v is velocity. Eq. 2 can be described as a version of Eq. 3 to calculate temperature
.........(3)

where N is total number of particles, i denotes the particle under consideration, and Nf is the number of degrees of freedom. Nf is 3N-3 for a system of N particles with fixed total momentum.