What Are the Correct Energy Levels for Computing a Molecular Partition Function with HITRAN? I was trying to compute some stat mech and thermodynamic quantities using the data in the HITRAN molecular data base and ran into a conceptual problem.  The basic quantity needed for these calculations is the partition function, $Q(T)$, the usual sum over Boltzmann factors.  HITRAN provides the spectral line wavenumber, $\nu_{ij}$, and the lower state energy of the transition, $E_{\text{lower},\,ij}$ for every spectral line.  I naively computed
$$Q(T) = \sum_{I,j} \exp( - (\nu_{ij} + E_{\text{lower},\,ij})/kT )$$
which gives the wrong answer compared to the the HITRAN tables of precomputed Q(T) values.  It turns out that the correct calculation is
$$Q(T) = \sum_{\text{unique }E_{\text{lower},\,ij}}\exp( - E_{\text{lower},\,ij}/kT )$$
With this definition I got the right answer for $Q(T)$ and the computed specific heats of H2O and CO2 matched their measured values within 1%.
What I learned from this is that there are many more spectral lines than there are values of $E_\text{lower}$ and each value of $E_\text{lower}$ has a specific set of lines associated with it.  This is true for N2, O2, CO2, and H2O.
A hydrogen atom only has one $E_\text{lower} = 0$ and all its energy levels are with respect to this.  Where do the $E_\text{lower}$ values come from in a molecule?  Why does the partition function only depend on them and not all the spectral lines?
 A: Because every energy state can be excited into a higher one, every energy state that the molecule has will appear as one possible $E_{lower}$. All the partition function cares about is the list of possible energy states, and a convenient list that happens to have all of the same things on it is the list of possible lower states in transitions. The properties of the spectral line itself are typically ignored, because in the thermal limit even a very rare transition will happen often enough to equilibrate that specific energy level.
A: The correct answer is given by computing the total partition function.  Each molecular energy level is a sum of translational, electronic, vibrational, and rotational energy.  Assuming that all four energies are independent, the total partition function is the product of four partition functions, one for each type of energy.  The translational and rotational partition functions can be computed directly without using the HITRAN data.  The electronic energy levels can only be accessed at high temperatures so that only the lowest level matters.  Setting its energy to zero gives its Q = 1.  That leaves the partition function for vibrational levels that must be computed by the second equation above.
See  Molecular Partition Functions for a discussion and examples for diatomic molecules.
