IdealGasThermoChemistry

class IdealGasThermoChemistry(configuration, dynamical_matrix=None)

IdealGasThermoChemistry making it easy to extract Gibbs free energy and entropy.

Parameters:
  • configuration (MoleculeConfiguration|BulkConfiguration) – The configuration.

  • dynamical_matrix (DynamicalMatrix) – The dynamical matrix used to calculate the vibrational modes.

electronicEntropy(spin)

The electronic contribution to the entropy.

Parameters:

spin (integer or half-integer) – The total spin.

Returns:

The electronic entropy.

Return type:

PhysicalQuantity with the unit meV / Kelvin

energy()
Returns:

The total energy.

Return type:

PhysicalQuantity of type energy

enthalpy(temperature, include_translations=True, include_rotations=True, include_vibrations=True)

The enthalpy, H, as a function of temperature.

The enthalpy is here defined by H = E_{ZPE} + E_{electrons} + int_0^T dT C_p (T)}.

Parameters:
  • temperature (PhysicalQuantity with unit temperature) – The temperature or an array of temperatures.

  • include_translations (bool) – True, if translational contributions to the enthalpy should be included.
    Default: True.

  • include_rotations (bool) – True, if rotational contributions to the enthalpy should be included.
    Default: True.

  • include_vibrations (bool) – True, if vibrational contributions to the enthalpy should be included.
    Default: True.

Returns:

The enthalpy, H(T).

Return type:

PhysicalQuantity with unit energy

entropy(temperature, pressure=PhysicalQuantity(1.0, bar), include_translations=True, include_rotations=True, include_vibrations=True)

The entropy.

Parameters:
  • temperature (PhysicalQuantity with unit temperature) – The temperature or an array of temperatures.

  • pressure (PhysicalQuantity with unit pressure) – The (optional) gas pressure.

  • include_translations (bool) – True, if translational contributions to the entropy should be included.
    Default: True.

  • include_rotations (bool) – True, if rotational contributions to the entropy should be included.
    Default: True.

  • include_vibrations (bool) – True, if vibrational contributions to the entropy should be included.
    Default: True.

Returns:

The entropy.

Return type:

PhysicalQuantity with the unit meV / Kelvin

freeEnergy(temperature, pressure=PhysicalQuantity(1.0, bar), include_translations=True, include_rotations=True, include_vibrations=True)

The Gibbs free energy including the total energy contribution.

Parameters:
  • temperature (PhysicalQuantity with unit temperature) – The temperature or an array of temperatures.

  • pressure (PhysicalQuantity with unit pressure) – The pressure.
    Default: 1 * bar.

  • include_translations (bool) – True, if translational contributions to the free energy should be included.
    Default: True.

  • include_rotations (bool) – True, if rotational contributions to the free energy should be included.
    Default: True.

  • include_vibrations (bool) – True, if vibrational contributions to the free energy should be included.
    Default: True.

Returns:

The Gibbs free energy.

Return type:

PhysicalQuantity with wiht unit energy

metatext()
Returns:

The metatext of the object or None if no metatext is present.

Return type:

str | None

nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:

stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()

pressureEntropy(pressure_0, pressure)

The pressure contribution to the entropy.

Parameters:
Returns:

The pressure contribution to the entropy.

Return type:

PhysicalQuantity with the unit meV / Kelvin

rotationalEntropy(temperature)

The rotational contribution to the entropy.

Parameters:

temperature (PhysicalQuantity with unit temperature) – The temperature or an array of temperatures.

Returns:

The rotational entropy.

Return type:

PhysicalQuantity with the unit meV / Kelvin

setMetatext(metatext)

Set a given metatext string on the object.

Parameters:

metatext (str | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

translationalEntropy(temperature, pressure_0=PhysicalQuantity(1.0, bar))

The translational contribution to the entropy.

Parameters:
  • temperature (PhysicalQuantity with unit temperature) – The temperature or an array of temperatures.

  • pressure_0 (PhysicalQuantity with unit pressure) – The reference gas pressure.
    Default: 1 * bar.

Returns:

The entropy.

Return type:

PhysicalQuantity with the unit meV / Kelvin

uniqueString()

Return a unique string representing the state of the object.

vibrationalEntropy(temperature)

The vibrational contribution to the entropy.

Parameters:

temperature (PhysicalQuantity with unit temperature) – The temperature or an array of temperatures.

Returns:

The entropy.

Return type:

PhysicalQuantity with the unit meV / Kelvin

zeroPointEnergy()

The zero point energy.

Returns:

The zero point energy.

Return type:

PhysicalQuantity with unit energy

Notes

IdealGasThermoChemistry implements the calculations of the Gibbs free energy in the ideal gas limit, as given by the standard derivation of ideal gas thermodynamic properties as done in e.g. C.J. Cramer, “Essentials of Computational Chemistry”.

The Gibbs free energy is given as a function of temperature, \(T\),

\[G(T) = H(T) - T S\]

where \(H(T)\) is the enthalpy, while \(S\) is the entropy.

In the ideal gas limit, the total enthalpy can be defined by

\[H(T) = E_{\mathrm{electronic}} + E_{\mathrm{ZPE}} + \int_0^T C_p \, \mathrm{d}T\]

where \(E_{\mathrm{electronic}}\) is the electronic contribution to the energy (also sometimes called the total energy) and \(E_{\mathrm{ZPE}}\) is the zero point energy. The heat capacity at constant pressure, \(C_p\), can be divided up into components,

\[C_p = k_\mathrm{B} + C_{V, \mathrm{trans}} + C_{V, \mathrm{vib}} + C_{V, \mathrm{rot}} + C_{V, \mathrm{elec}},\]

where the translational contribution for an ideal gas is given by, \(C_{V, \mathrm{trans}} = 3 k_\mathrm{B} / 2\). The integral over the vibrational contribution to the heat capacity, is given by,

\[\int_{0}^T C_{V, \mathrm{vib}} \, \mathrm{d} T = \sum_i^{\mathrm{dof}} \frac{\hbar \omega_i}{e^{\hbar \omega_i / k_{\mathrm{B} T}} - 1}\]

The sum runs over all vibrational degrees of freedom each with an \(\omega_i\) vibrational frequency. Note that the number of degrees of freedom also depends on the molecule geometry, with monatomic molecules containing no internal vibrational degrees of freedom, linear molecule having \(3N - 5\) degrees of freedom and nonlinear molecules having \(3N - 6\) degrees of freedom (with \(N\) being the number of atoms).

The rotational contribution depends on the geometry of the molecule:

\[\begin{split}C_{V, \mathrm{rot}} = k_{\mathrm{B}} \begin{cases} 0 & \textrm{, for monatomic molecules;} \\ 1 & \textrm{, for linear molecules;} \\ \frac{3}{2} & \textrm{, for nonlinear molecules.} \end{cases}\end{split}\]

Finally, the electronic contribution to the heat capacity can be assumed to be zero.

The ideal gas entropy can be calculated as a function of temperature and pressure,

\[\begin{split}S(T, P) & = S(T, P_0) - k_{\mathrm{B}} \ln \frac{P}{P_0} \\ & = S_{\mathrm{trans}} + S_{\mathrm{rot}} + S_{\mathrm{vib}} + S_{\mathrm{elec}} - k_{\mathrm{B}} \ln \frac{P}{P_0}\end{split}\]

While the last term (also referred to as the pressure entropy) depends on the reference pressure, \(P_0\), this term is cancelled by an equal and opposite term in the translational contribution to the entropy as given by (including contributions from the Stirling approximations),

\[S_{\mathrm{trans}} = k_{\mathrm{B}} \ln \left( \left[ \frac{2 \pi M k_{\mathrm{B}} T}{h^2} \right]^{3/2} \frac{k_{\mathrm{B}} T}{P_0}\right) + \frac{5}{2} k_{\mathrm{B}}\]

Here \(M\) is the total mass of the molecule. The rotational contribution depends again on the molecule geometry,

\[\begin{split}S_{\mathrm{rot}} = k_\mathrm{B} \begin{cases} 0 & \textrm{, for monatomic molecules;} \\ \ln \left(\frac{8 \pi^2 I k_{\mathrm{B}} T}{\sigma h^2}\right) + 1 & \textrm{, for linear molecules;} \\ \ln \left( \frac{\sqrt{\pi I_{\mathrm{A}} I_{\mathrm{B}} I_{\mathrm{C}}}}{\sigma} \left[ \frac{8 \pi^2 k_{\mathrm{B}} T}{h^2} \right]^{3/2}\right) + \frac{3}{2} & \textrm{, for nonlinear molecules.} \end{cases}\end{split}\]

Here \(I_{\mathrm{A}}\), \(I_{\mathrm{B}}\) and \(I_{\mathrm{C}}\) are the principle moment of inertia, while \(I\) is the total moment of inertia. The number, \(\sigma\), is the symmetry number for the molecule.

Finally the vibrational contribution is,

\[S_{\mathrm{vib}} = k_{\mathrm{B}} \sum_i^{\mathrm{dof}} \left[ \frac{\hbar \omega_i}{k_{\mathrm{B}} T (e^{\hbar \omega_i / k_{\mathrm{B}} T} - 1 )} - \ln \left( 1 - e^{- \hbar \omega_i / k_{\mathrm{B}} T} \right) \right].\]

If the molecule has a non-zero total spin, one can also include that by adding the contribution,

\[S_{\mathrm{elec}} = k_{\mathrm{B}} \ln(2 \cdot \mathrm{spin} + 1).\]