.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/electrochem/standard_potentials/plot_02_stockholm_sign_convention.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_electrochem_standard_potentials_plot_02_stockholm_sign_convention.py: The 1953 Stockholm convention: electrode potentials are reduction potentials ============================================================================== Before IUPAC's 1953 Stockholm meeting, one tradition tabulated *oxidation* potentials and another *reduction* potentials, so the same couple appeared with opposite signs in different books. This example shows both conventions for the table in :data:`~chemistrykit.electrochem.systems.standard_potentials.STANDARD_REDUCTION_POTENTIALS` (which follows Stockholm), and shows that the cathode-minus-anode rule of :func:`~chemistrykit.electrochem.systems.standard_potentials.cell_potential` only gives the right cell voltage and spontaneity when both half-reactions use the agreed reduction convention. .. GENERATED FROM PYTHON SOURCE LINES 17-23 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from chemistrykit.electrochem.systems.standard_potentials import STANDARD_REDUCTION_POTENTIALS as T from chemistrykit.electrochem.systems.standard_potentials import cell_potential, is_spontaneous .. GENERATED FROM PYTHON SOURCE LINES 24-25 Correct usage: both values are Stockholm reduction potentials. .. GENERATED FROM PYTHON SOURCE LINES 25-28 .. code-block:: Python E_ok = cell_potential(T["Ag+/Ag"], T["Cu2+/Cu"]) print(f"Ag+/Ag cathode, Cu anode (both reduction potentials): E = {E_ok:+.2f} V, spontaneous = {is_spontaneous(E_ok)}") .. rst-class:: sphx-glr-script-out .. code-block:: none Ag+/Ag cathode, Cu anode (both reduction potentials): E = +0.46 V, spontaneous = True .. GENERATED FROM PYTHON SOURCE LINES 29-31 The historical pitfall: taking the anode value from an oxidation-potential table (sign flipped) and subtracting it gives nonsense. .. GENERATED FROM PYTHON SOURCE LINES 31-34 .. code-block:: Python E_mixed = T["Ag+/Ag"].E_standard - (-T["Cu2+/Cu"].E_standard) print(f"Same cell with a mixed-convention anode value: E = {E_mixed:+.2f} V (wrong; measured 0.46 V)") .. rst-class:: sphx-glr-script-out .. code-block:: none Same cell with a mixed-convention anode value: E = +1.14 V (wrong; measured 0.46 V) .. GENERATED FROM PYTHON SOURCE LINES 35-37 The whole table in both conventions: the oxidation-potential column is the mirror image of the Stockholm (reduction) column. .. GENERATED FROM PYTHON SOURCE LINES 37-53 .. code-block:: Python names = list(T) E_red = np.array([T[name].E_standard for name in names]) order = np.argsort(E_red) y = np.arange(len(names)) fig, ax = plt.subplots(figsize=(7, 7)) ax.barh(y - 0.2, E_red[order], height=0.4, color="steelblue", label="Reduction potential (Stockholm, 1953)") ax.barh(y + 0.2, -E_red[order], height=0.4, color="lightgray", label="Oxidation potential (older convention)") ax.set_yticks(y) ax.set_yticklabels([names[i] for i in order], fontsize=8) ax.axvline(0.0, color="black", linewidth=0.8) ax.set_xlabel("Tabulated potential (V vs. SHE)") ax.set_title("One couple, two historical signs") ax.legend(fontsize=8, loc="lower right") fig.tight_layout() plt.show() .. image-sg:: /api/gallery/electrochem/standard_potentials/images/sphx_glr_plot_02_stockholm_sign_convention_001.png :alt: One couple, two historical signs :srcset: /api/gallery/electrochem/standard_potentials/images/sphx_glr_plot_02_stockholm_sign_convention_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.085 seconds) .. _sphx_glr_download_api_gallery_electrochem_standard_potentials_plot_02_stockholm_sign_convention.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_stockholm_sign_convention.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_stockholm_sign_convention.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_stockholm_sign_convention.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_