Let us now consider the molecular partition function $q=\sum_{i}g_{i}e^{-\beta{\epsilon_{i}}}$. Molecular energy is the sum of translational, rotational, vibrational, and electronic energy.
\begin{equation} \epsilon_{i}=\epsilon_{tr,n}+\epsilon_{vib,v}+\epsilon_{rot,J}+\epsilon_{ele,u} \label{ec39} \end{equation}
Substituting into the molecular partition function $q$
\begin{equation} q={\sum{g_{i}}{e^{-\beta\left(\epsilon_{tr,n}+\epsilon_{vib ,v}+\epsilon_{rot,J}+\epsilon_{ele,u}\right)}}=\sum_{n}g_{n}e^{-\beta{\epsilon_{tr,n}}} \sum_{v}g_{v}e^{-\beta{\epsilon_{vib,v}}}\sum_{J}g_{J}e^{-\beta{\epsilon_{rot,J}}} \sum_{u}g_{u}e^{-\beta{\epsilon_{ele,u}}}} \label{ec40} \end{equation}
\begin{equation} q=q_{tr}\cdot{ q_{vib}}\cdot{q_{rot}}\cdot{q_{ele}} \label{ec41} \end{equation}
Taking neperians in (\ref{ec41})
\begin{equation} lnq=lnq_{ tr}+lnq_{vib}+lnq_{rot}+lnq_{ele} \label{ec42} \end{equation}
The total internal energy of a gas can be expressed in terms of translational, rotational, vibrational, and electronic partition functions.
\begin{equation} E=NkT^2\left(\frac{\partial{lnq}}{\partial{T}}\right)_{V} \label{ec43} \end{equation}
Substituting (\ref {ec42})en (~\ref{ec43})
\begin{equation} E=NkT^2\left[\left(\frac{\partial{lnq_{tr}}}{\partial{T}}\right )_{V}+\frac{dlnq_{vib}}{dT}+\frac{dlnq_{rot}}{dT}+\frac{dlnq_{ele}}{dT}\right] \label{ec44} \end{equation}
where $E_{tr}=NkT^2\left(\frac{\partial{lnq_{tr}}}{\partial{T}}\right)_{V}$ $E_{vib}= NkT^2\frac{dlnq_{vib}}{dT},.........$
\begin{equation} E=E_{tr}+E_{vib}+E_{rot}+E_{ele } \label{ec45} \end{equation}