I'm reading Schroeder's "An Introduction to Thermal Physics" and he mentions the vibrational degrees of freedom of a diatomic molecule:
A diatomic molecule can also vibrate, as if the two atoms were held together by a spring. This vibration should count as two degrees of freedom, one for the vibrational kinetic energy and one for the potential energy. (You may recall from classical mechanics that the average kinetic and potential energies of a simple harmonic oscillator are equal-a result that is consistent with the equipartition theorem.) More complicated molecules can vibrate in a variety of ways: stretching, flexing, twisting. Each "mode" of vibration counts as two degrees of freedom.
Why is there a "potential energy" degree of freedom? In classical mechanics, we treated a mass vibrating on a spring as having one degree of freedom (for example, in Lagrangian mechanics). I thought that potential energy and kinetic energy for a simple harmonic oscillator are just two sides of the same coin; the energy is transformed between the two.
Is it something different from the usual spatial degrees of freedom that I am used to?