rmgpy.statmech.HarmonicOscillator¶
- class rmgpy.statmech.HarmonicOscillator(frequencies=None, quantum=True)¶
A statistical mechanical model of a set of one-dimensional independent harmonic oscillators. The attributes are:
Attribute
Description
frequencies
The vibrational frequencies of the oscillators
quantum
True
to use the quantum mechanical model,False
to use the classical modelIn the majority of chemical applications, the energy levels of the harmonic oscillator are of similar magnitude to \(k_\mathrm{B} T\), requiring a quantum mechanical treatment. Fortunately, the harmonic oscillator has an analytical quantum mechanical solution.
Many vibrational motions are well-described as one-dimensional quantum harmonic oscillators. The time-independent Schrodinger equation for such an oscillator is given by
\[-\frac{\hbar^2}{2m} \frac{\partial^2}{\partial x^2} \Psi(x) + \frac{1}{2} m \omega^2 x^2 \Psi(x) = E \Psi(x)\]where \(m\) is the total mass of the particle. The harmonic potential results in quantized solutions to the above with the following energy levels:
\[E_n = \left( n + \frac{1}{2} \right) \hbar \omega \hspace{2em} n = 0, 1, 2, \ldots\]Above we have introduced \(n\) as the quantum number. Note that, even in the ground state (\(n = 0\)), the harmonic oscillator has an energy that is not zero; this energy is called the zero-point energy.
The harmonic oscillator partition function is obtained by summing over the above energy levels:
\[Q_\mathrm{vib}(T) = \sum_{n=0}^\infty \exp \left( -\frac{\left( n + \frac{1}{2} \right) \hbar \omega}{k_\mathrm{B} T} \right)\]This summation can be evaluated explicitly to give a closed-form analytical expression for the vibrational partition function of a quantum harmonic oscillator:
\[Q_\mathrm{vib}(T) = \frac{e^{-\hbar \omega / 2 k_\mathrm{B} T}}{1 - e^{-\hbar \omega / k_\mathrm{B} T}}\]In RMG the convention is to place the zero-point energy in with the ground-state energy of the system instead of the numerator of the vibrational partition function, which gives
\[Q_\mathrm{vib}(T) = \frac{1}{1 - e^{-\hbar \omega / k_\mathrm{B} T}}\]The energy levels of the harmonic oscillator in chemical systems are often significant compared to the temperature of interest, so we usually use the quantum result. However, the classical limit is provided here for completeness:
\[Q_\mathrm{vib}^\mathrm{cl}(T) = \frac{k_\mathrm{B} T}{\hbar \omega}\]- as_dict(self) dict ¶
A helper function for dumping objects as dictionaries for YAML files
- Returns:
A dictionary representation of the object
- Return type:
dict
- frequencies¶
The vibrational frequencies of the oscillators.
- get_density_of_states(self, ndarray e_list, ndarray dens_states_0=None) ndarray ¶
Return the density of states \(\rho(E) \ dE\) at the specified energies e_list in J/mol above the ground state. If an initial density of states dens_states_0 is given, the rotor density of states will be convoluted into these states.
- get_enthalpy(self, double T) double ¶
Return the enthalpy in J/mol for the degree of freedom at the specified temperature T in K.
- get_entropy(self, double T) double ¶
Return the entropy in J/mol*K for the degree of freedom at the specified temperature T in K.
- get_heat_capacity(self, double T) double ¶
Return the heat capacity in J/mol*K for the degree of freedom at the specified temperature T in K.
- get_partition_function(self, double T) double ¶
Return the value of the partition function \(Q(T)\) at the specified temperature T in K.
- get_sum_of_states(self, ndarray e_list, ndarray sum_states_0=None) ndarray ¶
Return the sum of states \(N(E)\) at the specified energies e_list in J/mol above the ground state. If an initial sum of states sum_states_0 is given, the rotor sum of states will be convoluted into these states.
- make_object(self, dict data, dict class_dict)¶
A helper function for constructing objects from a dictionary (used when loading YAML files)
- Parameters:
data (dict) – The dictionary representation of the object
class_dict (dict) – A mapping of class names to the classes themselves
- Returns:
None
- quantum¶
‘bool’
- Type:
quantum