# Statistical Thermodynamics and Rate Theories/Molecular partition functions

The partition function of a system, Q, provides the tools to calculate the probability of a system occupying state i .Partition function depends on composition,volume and number of particle. Larger the partition function allows to have more accessible energy states at that temperature.The general form of a partition function is a sum over the states of the system,
    $Q=\sum _{i}\exp \left({\frac {-E_{i}}{k_{B}T}}\right)$
Two equivalent ways could be used to write the the partition function. Sum over states approach allows to give different indices to the states with the same energy. Energy levels approach suggests that only energy levels with distinct energies have their own index.
This requires that the energies levels of the entire system must be known and the calculations have to be calculated from sums over states. This limits the types of the systems that we can derive properties for.
For ideal gases, we assume that the energy states of molecules are independent of those in other molecules. The molecular partition function, q, is defined as the sum over the states of an individual molecule.
    $q=\sum _{i}\exp \left({\frac {-\epsilon _{i}}{k_{B}T}}\right)$
The particles of an ideal gas could be considered distinguishable if they are different from each other and, therefore, the unique label could be assigned to each.On the contrary, the indistinguishable particles are impossible to assign a unique label, as they are the identical to each other.This article considers the indistinguishable particles of an ideal gas for which the partition function of the system (Q) could be expressed in terms of the molecular partition function (q),and the number of particles in the system (N).As the partition function allows to calculate the probability of the system occupying the state j.Such system could be assumed as isolated, as a microcanonical ensemble of particles, where the total volume, the total energy and number of particles are constant. However, the range of energies appropriate for composition, volume and temperature of canonical ensembles contributing to the system must be still considered for composition, volume and temperature.
    Partition function of an ideal gas of indistinguishable particles $Q={\frac {q^{N}}{N!}}$

## Molecular Partition Functions

The energy levels of a molecule can be approximated as the sum of energies in the various degrees of freedom of the molecule,
    $\epsilon =\epsilon _{trans}+\epsilon _{rot}+\epsilon _{vib}+\epsilon _{elec}$
Correspondingly, we can divide molecular partition function (q),
    $q=\sum _{i}\exp \left({\frac {-(\epsilon _{trans}+\epsilon _{rot}+\epsilon _{vib}+\epsilon _{elec})}{k_{B}T}}\right)$
    $q=\sum _{i}\exp \left({\frac {-\epsilon _{trans,i}}{k_{B}T}}\right)\sum _{i}\exp \left({\frac {-\epsilon _{rot,i}}{k_{B}T}}\right)\sum _{i}\exp \left({\frac {-\epsilon _{vib,i}}{k_{B}T}}\right)\sum _{i}\exp \left({\frac {-\epsilon _{elec,i}}{k_{B}T}}\right)$
    $q=\sum _{i}\exp \left({\frac {-\epsilon _{trans,i}}{k_{B}T}}\right)\times \sum _{i}\exp \left({\frac {-\epsilon _{rot,i}}{k_{B}T}}\right)\times \sum _{i}\exp \left({\frac {-\epsilon _{vib,i}}{k_{B}T}}\right)\times \sum _{i}\exp \left({\frac {-\epsilon _{elec,i}}{k_{B}T}}\right)$
    $q=q_{trans}\times q_{rot}\times q_{vib}\times q_{elec}$

## Translational Partition Function

The translational partition function, q$_{trans}$, is the sum of all possible translational energy states, which could be represented using one,two and three dimensional models for a particle in the box equation, depending on the system of the coordinates .The one and two dimensionsal spaces for a particle in the box equation forms are less commonly used than the three dimensional form as those do not account for the force acting on the particles inside of a box. For a molecule in the three dimensional space, the energy term in the general partition function equation is replaced with the particle in a 3D box equation. All molecules have three translational degrees of freedom, one for each axis the molecule can move along in three dimensional space.
    Particle in a 3D Box Equation $E_{n_{x},n_{y},n_{z}}={\frac {h^{2}}{8mL^{2}}}(n_{x}^{2}+n_{y}^{2}+n_{z}^{2})$
The assumption that energy levels are continuous is valid because the space between energy levels is extremely small, resulting in minimal error. This form is convenient as it does not include a sum to infinity and can therefore be solved with relative ease. The translational partition function can be simplified further by defining a DeBroglie wavelength, $\Lambda$, of a molecule at a given temperature.
$q_{trans}={\frac {V}{\Lambda ^{3}}}$
$\Lambda =\left({\frac {2\pi mk_{B}T}{h^{2}}}\right)^{-1/2}$

### Thermal de Broglie Wavelength
## Rotational Partition Function

The rotational partition function, $q_{rot}$, is the sum of all possible rotational energy levels. This sum is found by substituting the equation for the energy levels of a linear rigid rotor:
$E_{j}={\frac {\hbar ^{2}}{2\mu r^{2}}}J(J+1),J=0,1,2,...$
Into the partition function, to produce an open form of the rotational partition function:
$q_{rot}=\sum _{j=1}^{\infty }\ g_{i}\exp \left({\frac {-E_{j}}{k_{B}T}}\right)$
By solving this sum using a definite integral from zero to infinity, a closed form of this function can be found, making numerical evaluation much easier:
$q_{rot}={\frac {2k_{B}T\mu r^{2}}{{\text{ħ}}^{2}}}$
The full derivation of the closed form of the rotational partition function of a linear rotor is given here.
The special case of rotational partition function for homonuclear diatomics could cause the lower weight for alternating states,and result in the change of the rotational partition function. This case is based on the assumption that the total wavefunction of the two exchanging nuclei must be either asymmetric for the nuclei with the even spins (integer spins),or symmetric for the nuclei with odd spins. This function applies only to heteronuclear diatomic molecules. However, this equation can be altered by adding a variable to alter the equation based on the nature of the diatomic molecule being studied:
$q_{rot}={\frac {2k_{B}T\mu r^{2}}{\sigma \hbar ^{2}}}$
where $\sigma$ is 1 for heteronuclear diatomics, and 2 for homonuclear diatomics.
The characteristic temperature is the constant that combines many constants calculated for partition functions of rotational and vibrational levels,introducing the fact of partition function dependence on the temperature change. The characteristic temperature is now defined as , $\Theta _{rot}$ where,
$\Theta _{rot}={\frac {\hbar ^{2}}{2k_{B}\mu r^{2}}}$
determining the rotational partition function can be calculated much easier using,
$q_{rot}={\frac {T}{\sigma \Theta _{rot}}}$

## Vibrational Partition Function

A Partition Function (Q) is the denominator of the probability equation. It corresponds to the number of accessible states in a given molecule. Q represents the partition function for the entire system, which is broken down and calculated from each individual partition function of each molecule in the system. These individual partition functions are denoted by q.
All molecules have four different types of partition functions: translational, rotational, vibrational, and electronic. Looking only at the vibrational aspect of the system, there is a specific unique equation used to calculate its partition function:
The vibrational partition function of a linear molecule is,
    $q_{vib}={\frac {1}{1-\exp \left({\frac {-h\nu }{k_{B}T}}\right)}}$
In general, the molecule partition function can be written as an infinite sum. This is called the open form of the equation:
    $q=\sum _{j}g_{i}\exp \left({\frac {-E_{j}}{k_{B}T}}\right)$
It is much easier and more convenient to write this as a closed sum. This turns the equation into an approximative algebraic expression, with the following parameters in variables:
* degeneracy $g_{j}=1$
* quantum number $n=1,2,3...$
* energy levels $\varepsilon _{n}=h\nu (n+({\frac {1}{2}}))$
The energy levels, $\Delta E_{J}$ are defined relative to the ground state of the system (i.e., the zero point energy is subtracted from each level),
    $\Delta E_{J}=\varepsilon _{j}-\varepsilon _{0}$
    $=h\nu (j+{\frac {1}{2}})-h\nu (0+{\frac {1}{2}})=h{\nu }j+{\frac {1}{2}}h{\nu }-{\frac {1}{2}}h{\nu }=h{\nu }j$
By exploring some substitutions and derivations, the equation listed above for a linear molecule is achieved. The substitutions made include:
* $g_{j}=1$
* $E_{j}=h{\nu }j$
* $j=0,1,2...$
At the same time, it is important to note that ${\nu }$ represents the vibrational frequency of the molecule. It can be calculated on its own prior by the following relation:
    $v={\frac {1}{2\pi }}\left({\frac {k}{\mu }}\right)^{\frac {1}{2}}$
where k represents the spring constant of the molecule and μ represents the reduced mass of the same molecule.

## Electronic Partition Function

The electronic partition function (q$_{el}$) of a system describes the electronic states of the system at thermodynamic equilibrium. This can be written as a sum over states,
    $q_{el}=\sum g_{j}\exp(-\beta \epsilon _{j})$
however due to high energy levels being present under most circumstances, the electronic partition function can be reduced to:
    $q_{el}=g_{0}$
Thus, the electronic partition function can usually be approximated as the ground state degeneracy of the atom or molecule.

## Molecular Partition Function

The molecular partition function, q, is the total number of states accessible to the atom or molecule. It is the product of the vibrational, rotational and translational partition functions:
    $q=q_{trans}\times q_{rot}\times q_{vib}\times q_{el}$