Canonical Molecular Dynamics of Molecules with Internal Degrees of Freedom