The Hamiltonian of the diatomic molecule is given by H = p1^2 / 2m + p2^2 / 2m + 1/2 k R^2, where R equals the distance between atoms. Using this result, given in standard texbooks, I keep geting C = 9/2 kT instead of 7/2 kT for heat capacity. I've traced down my problem to the potential energy term. I seem to be calculating as if I have a 3D isotropic oscillator instead of two point particles connected by a spring. It appears as these two systems have the same Hamiltonian, but that surely can't be so. My question is, what's the right Hamiltonian for a given system and how to see that these two systems have different degrees of freedom? Thanks!