  One-dimensional ideal diatomic gas is simulated through possible types of
motion of a molecule. Energy of each type of its motion is calculated from
theory and numerical method. Calculation of kinetic energy of an atom in
translational-vibrational motion is not analytically simple, but it can be
solved by numerical method of molecular dynamic simulation. This paper
justifies that kinetic energy of a diatomic molecule can be determined by two
different approaches. The first is the sum of kinetic energy of each atom and
second is the sum of kinetic energy of translational motion and vibrational
motion.
