# How do we get g and E values for various levels to calculate electronic partition function

When we calculate electronic partition function using the formula:

$$q_\mathrm{elec}=\sum^\infty_{n=1}g_ne^{-E_n/k_BT}$$

How can I get the $$g_n$$ value and $$E_n$$ values for $$n=0,1,2,3...$$ levels?

I need to calculate the $$q_\mathrm{elec}$$ for various species like $$\ce{H, H2, OH, H2O, O2, O, O+, H+}$$.

• First you must understand what the $n$ represents then you will need to look up the values for $E_n$ and $g_n$ at least for all but a couple of of the species you quote. Aug 24 '20 at 11:20

$$E_n$$ represents the energy of the $$n$$th electronic state relative to the ground state (i.e. the ground-state electronic energy $$E_0 = 0$$). Often, electronic states are very high in energy and the excited-state energies $$E_1, E_2, \cdots$$ are far greater than $$k_\mathrm{B}T$$, such that $$\mathrm{e}^{-E_n/k_\mathrm{B}T} \approx 0$$.
$$q_\mathrm{elec} = \sum_n g_n \mathrm{e}^{-E_n/k_\mathrm{B}T} \approx g_0 \mathrm{e}^{-E_0/k_\mathrm{B}T} = g_0$$
where the latter equality is because $$E_0 = 0$$. $$g_0$$ is the degeneracy of the electronic ground state: to find this out you will need to draw some MO diagrams and/or construct the term symbols.
If the ground state is nondegenerate (e.g. $$\ce{H2O}$$) the whole thing is just equal to 1. Otherwise, for an atom with ground-state term symbol $$^{2S+1}L_J$$, the degeneracy is $$2J + 1$$. Similar considerations can be applied to molecules.
However, you will have to watch out for cases where there are low-lying energy states where $$E_n$$ is on the order of $$k_\mathrm{B}T$$. I am not aware of an easy way to predict this, though – you will have to know some typical examples, failing which you will just have to look it up, as porphyrin suggests. The NIST WebBook is a good starting place for this.