Skip to content

Commit

Permalink
Merge pull request #149 from AdityaSavara/relative-formation-energies
Browse files Browse the repository at this point in the history
Relative formation energies
  • Loading branch information
ajmedford authored May 17, 2022
2 parents af254eb + c9bd2d7 commit cd1ea56
Showing 1 changed file with 94 additions and 24 deletions.
118 changes: 94 additions & 24 deletions docs/source/tutorials/generating_an_input_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ of the header and first few lines are provided below:
::

surface_name site_name species_name formation_energy bulk_structure frequencies reference
None gas CH4 0 None [] By Definition
None gas H2O 0 None [] By Definition
None gas H2 0 None [4401] By Definition
None gas CH4 0 None [] Defined as part of reference state to have formation_energy of 0
None gas H2O 0 None [] Defined as part of reference state to have formation_energy of 0
None gas H2 0 None [4401] Defined as part of reference state to have formation_energy of 0
None gas CO 2.74 None [2170] Energy Environ. Sci., 3, 1311-1315 (2010)
Pt 211 CO 1.113 fcc [] J. Phys. Chem. C, 113 (24), 10548-10553 (2009)

Expand Down Expand Up @@ -134,13 +134,17 @@ formation\_energy
^^^^^^^^^^^^^^^^^

This is the core of the input file since it defines the energetics of
the system. It should be the "generalized formation energy" (see
the system. It should be a "relative free energy of formation" (see
:ref:`Formation Energy Approach <formation_energy>`) of the "species\_name" on the "surface\_name" and
"site\_name". These energies are usually very hard to come by, and must be
computed by an electronic structure method such as DFT, or in some cases they
can be measured experimentally. It is extremely important that all energies
share a
common thermodynamic reservoir for each atomic constituent (see :ref:`Formation
"site\_name". A "relative free energy of formation" is different from a standard free energy of formation
in that a "standard free energy of formation" uses pure elements as the reference states.
In contrast, a "relative free energy of formation" can include heteroatomic molecules (such as CO)
within the reference state, such that the relative energies of molecules in the reference state are set equal to 0.
For species on surfaces, formation energies are often not available experimentally, and thus
there is great value in computing them by an electronic structure method such as DFT. For gas phase species,
experimental values are more accurate and can be used directly or as a correction for DFT values.
To perform thermodynamic calculations, it is generally necessary that all energies
share a common thermodynamic reference state for the species in the reaction mechanism. (see :ref:`Formation
Energy Approach <formation_energy>`).

frequencies
Expand Down Expand Up @@ -201,21 +205,45 @@ Formation Energy Approach
~~~~~~~~~~~~~~~~~~~~~~~~~

One key point for generating input files is that the energies are
computed as a "generalized formation energy" relative to a *common
reference*:
computed as a "relative free energies of formation" relative to a *common
reference* state. This relative free energy of formation is provided by:

:math:`E_i = U_i - \sum_j (n_j R_j)`
:math:`G_i = H_i - T*S_i - \sum_j (n_j R_j)`

where :math:`E_i` is the "generalized formation energy" of species :math:`i`, :math:`U_i` is the
raw/DFT energy of species :math:`i`, :math:`nj` is the number of atomic species :math:`j` in :math:`i`,
and :math:`\left|R_j\right|` is the reference energy of that atomic species. Mathematically
:math:`G_i` is the "relative Gibbs free energy of formation" of species :math:`i` .
:math:`H_i` is the enthalpy of species :math:`i` (see further below).
:math:`S_i` is the absolute entropy of species :math:`i` .
:math:`nj` is the number of atomic species :math:`j` in :math:`i`,
and :math:`\left|R_j\right|` is the reference Gibbs free energy of that atomic species. Mathematically
this looks a little confusing (especially with such crude notation) but
in practice it is pretty easy. For example, say we want to find the
in practice it is pretty easy.
The general principle is similar to https://en.wikipedia.org/wiki/Born%E2%80%93Haber_cycle
and https://en.wikipedia.org/wiki/Hess%27s_law
For this type of input file of CatMAP, we will
be specifying the 0K electronic contribution to the relative formation energies,
and these do not have a temperature depndence. How other terms become included will be explained later.

In practice, today, the value for :math:`H_i` is generally approximated as being equal to the electronic energy.
In this case, the equation becomes

:math:`G_i = U_i - T*S_i - \sum_j (n_j R_j)`

Where :math:`U_i` is the raw/DFT energy of species :math:`i`,

Here, we will provide a simple example of how to provide the electronic energies information
that CatMAP needs to calculate this contribution for the relative free energy of formation.
We will use the variable :math:`E_i` to emphasize that this term, based on `U_i`, represents
the electronic energy contribution for :math:`G_i` .

In CatMAP, the the Zero Point Energy (ZPE) correction terms should not be included in `U_i`,
The ZPE correction terms for `U_i` will be added later by CatMAP based on
the vibrational frequencies provided. The :math:`-T*S_i` term will also be added later by CatMAP

Let's look at an example. Say we want to find the
energy of gas-phase CO relative to carbon (C) in methane (|CH4|), oxygen
(O) in |H2O|, and hydrogen (H) in molecular hydrogen (|H2|). We first
compute the reference energies (:math:`\left|R_j\right|`) for each atomic species:


.. math::
R_{\rm{H}} &= 0.5(U_{\rm{H}_2}) \\
Expand All @@ -225,12 +253,12 @@ compute the reference energies (:math:`\left|R_j\right|`) for each atomic specie
(where again U is a "raw" energy from an ab-initio calculation, or a
"regular" formation energy from NIST).

Now we can compute the "generalized formation energy" of CO as:
Now we can compute the electronic contribution to the relative formation energy of CO as:

:math:`E_{\rm{CO}} = U_{\rm{CO}} - R_{\rm{C}} - R_{\rm{O}}`

In the case where CO is adsorbed to a surface, say Pt(211), we can
compute a "generalized" formation energy relative to the clean surface:
compute the electronic contribution to the relative formation energy relative to the clean surface:

:math:`E_{{\rm{CO}}*@{\rm{Pt}}(211)} = U_{{\rm{Pt}}(211)+{\rm{CO}}*} - U_{{\rm{Pt}}(211)} - R_{\rm{C}} - R_{\rm{O}}`

Expand All @@ -248,7 +276,7 @@ Then one could compute the barrier for :math:`{\rm{C-O}}` dissociation as:
If this still doesn't make sense, try working through the
`example <#example>`__ below.

In principle the choice of reference species is arbitrary since the
In principle the choice of reference states is arbitrary since the
reference energies :math:`|R_j|` cancel out in any relative quantities. However, in
many cases it is necessary to use some correction scheme for the
gas-phase energies if they are poorly described by the level of theory
Expand All @@ -259,11 +287,53 @@ by DFT, so it would not make sense to use these to compute the reference
energies :math:`|R_j|`.

It is also worth re-iterating that the *same reference energies* :math:`|R_j|` *must
be used for all energies in a given input file*. One can usually see
which gas-phase species are used as references since their formation
energies will be 0 by definition (see :ref:`overview <overview>`).
be used for all energies in a given input file*. The best practice
is to first set any pure element reactants in the system as having relative free energies of formation of 0
and then to add in gases with one additional element as having relative free energies of formation of 0.
Finally, other species (the remaining species with elements already used) will have relative free energies of formation defined based on these reference states
as well as the math:`U_i` (or math:`U_i - T*S_i` ) computed values for these other / remaining species.
When looking at an input file that has been created correctly, the gas-phase species that were used
as part of the reference state are easy to recognize since their relative formation
energies will be set to 0. (see :ref:`overview <overview>`).

Formation Energy Approach and Temperature Dependence
^^^^^^^^^^^

The below paragraphs are for informational purposes only.

As noted above, a free energy of formation has several terms:

:math:`G_i = H_i - T*S_i - \sum_j (n_j R_j)`

In general, for formation energies, the Temperature and Pressure and any other quantities used for defining the
reference states should be reported in the manuscript (whether using a relative formation energy or a standard formation energy).
The temperature dependence and entropy contributions are handled elsewhere in CatMAP,
and are thus not included in the "formation_energy" field of the input file.

The best practice and state of the art today is to include the entropy of formation, :math:`S_i` when calculating :math:`G_i`
The value from :math:`T*S_i` (and the values within :math:`\left|R_j\right|` ) will then include the values
for the entropy contribtuions calculated at a given temperature based on the partition functions
for vibrations, rotations, and the Sackur-Tetrode equation. The Sackur-Tetrode equation includes
both the translational partition function contribution and a quantum configurational term.
(The Sackur-Tetrode equation is often referred to as simply the "translational entropy", which can be misleading).

Computational calculation of the entropy contribution to :math:`G_i` has a significant computational expense (because it
requires more than single point calculations), and many studies do not require that level of accuracy
since for many systems changes in :math:`U_i` affect the chemistry and kinetics more than changes in :math:`S_i`

When the term :math:`T*S_i` is approximated as sufficiently insignificant, the equation reduces to:

:math:`G_i = U_i - \sum_j (n_j R_j)`

However, CatMAP supports an inclusion of an approximate entropy, and use of this feature is encouraged.
CatMAP uses existing codes to calculate the entropy contributions of
for vibrational stretching modes and gas phase translations from statistical mechanics,
and thus we include stretching mode vibrational frequencies near the end of the example below.

CatMAP's built-in thermo corrections will then use the frequencies to add in ZPE + enthalpy + entropy to complete `G_i`.
In the future, even more accurate entropy terms may be included, but present day
studies are adequately served by using stretching mode contributions for adsorbates.

.. _example:

Example
-------
Expand Down

0 comments on commit cd1ea56

Please sign in to comment.