.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/quantum/huckel/plot_02_pauling_resonance_energy.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_quantum_huckel_plot_02_pauling_resonance_energy.py: Pauling's resonance energy as Huckel delocalization energy ============================================================ Linus Pauling's *The Nature of the Chemical Bond* made "resonance energy" the chemist's measure of the extra stability a molecule gains because its true structure is a superposition of several Lewis structures (benzene's two Kekule structures foremost). In Huckel theory that stabilization is the delocalization energy (:meth:`~chemistrykit.quantum.systems.huckel.HuckelSystem.delocalization_energy`): the computed pi energy minus that of the same electrons held in isolated, ethylene-like double bonds, :math:`2(\alpha+\beta)` per bond. .. GENERATED FROM PYTHON SOURCE LINES 16-33 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from chemistrykit.quantum.systems.huckel import HuckelSystem molecules = { "ethylene": (HuckelSystem.linear_polyene(2), 2), "butadiene": (HuckelSystem.linear_polyene(4), 4), "hexatriene": (HuckelSystem.linear_polyene(6), 6), "cyclobutadiene": (HuckelSystem.cyclic_polyene(4), 4), "benzene": (HuckelSystem.cyclic_polyene(6), 6), } resonance = {} for name, (system, n_pi) in molecules.items(): resonance[name] = system.delocalization_energy(n_pi) print(f"{name:15s} pi energy = {system.pi_electron_energy(n_pi):7.4f} |beta|, resonance energy = {resonance[name]:7.4f}") .. rst-class:: sphx-glr-script-out .. code-block:: none ethylene pi energy = -2.0000 |beta|, resonance energy = 0.0000 butadiene pi energy = -4.4721 |beta|, resonance energy = -0.4721 hexatriene pi energy = -6.9879 |beta|, resonance energy = -0.9879 cyclobutadiene pi energy = -4.0000 |beta|, resonance energy = -0.0000 benzene pi energy = -8.0000 |beta|, resonance energy = -2.0000 .. GENERATED FROM PYTHON SOURCE LINES 34-40 With :math:`\beta = -1`, benzene's resonance energy is exactly :math:`2|\beta|`, far more than open-chain hexatriene with the same six pi electrons, and cyclobutadiene gets none at all. The thermochemical benzene resonance energy of about 36 kcal/mol (from heats of hydrogenation) corresponds to :math:`|\beta|` near 18 kcal/mol on this scale. .. GENERATED FROM PYTHON SOURCE LINES 40-49 .. code-block:: Python fig, ax = plt.subplots(figsize=(7, 4)) names = list(resonance) values = -np.array([resonance[n] for n in names]) ax.bar(names, values, color=["gray", "gray", "gray", "lightcoral", "seagreen"]) ax.set_ylabel(r"resonance stabilization $(-E_{deloc})/|\beta|$") ax.set_title("Resonance (delocalization) energy: benzene stands out") fig.tight_layout() .. image-sg:: /api/gallery/quantum/huckel/images/sphx_glr_plot_02_pauling_resonance_energy_001.png :alt: Resonance (delocalization) energy: benzene stands out :srcset: /api/gallery/quantum/huckel/images/sphx_glr_plot_02_pauling_resonance_energy_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 50-52 Resonance energy per pi electron in linear polyenes creeps up with chain length but stays well below benzene's :math:`|\beta|/3` per electron. .. GENERATED FROM PYTHON SOURCE LINES 52-65 .. code-block:: Python n_values = np.arange(2, 21, 2) per_electron = [-HuckelSystem.linear_polyene(n).delocalization_energy(n) / n for n in n_values] fig2, ax2 = plt.subplots(figsize=(6, 4)) ax2.plot(n_values, per_electron, "o-", label="linear polyenes") ax2.axhline(-resonance["benzene"] / 6, color="seagreen", linestyle="--", label="benzene") ax2.set_xlabel("number of pi electrons") ax2.set_ylabel(r"resonance energy per electron $/|\beta|$") ax2.set_title("Resonance energy per pi electron") ax2.legend() fig2.tight_layout() plt.show() .. image-sg:: /api/gallery/quantum/huckel/images/sphx_glr_plot_02_pauling_resonance_energy_002.png :alt: Resonance energy per pi electron :srcset: /api/gallery/quantum/huckel/images/sphx_glr_plot_02_pauling_resonance_energy_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.077 seconds) .. _sphx_glr_download_api_gallery_quantum_huckel_plot_02_pauling_resonance_energy.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_pauling_resonance_energy.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_pauling_resonance_energy.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_pauling_resonance_energy.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_