.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/structure/bonding/plot_02_pauling_bond_length.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_structure_bonding_plot_02_pauling_bond_length.py: Pauling's bond-order and bond-length correlation for carbon-carbon bonds ======================================================================== Linus Pauling (1947) related the length of a bond to its order, .. math:: D(n) = D(1) - c\,\log_{10} n, with :math:`D(1) = 1.54` Å the C-C single bond and :math:`c = 0.71` Å for carbon. The single, double and triple bonds of ethane, ethylene and acetylene lie on the curve. Read backwards, it turns a measured length into a bond order: benzene's 1.397 Å bond and graphite's 1.42 Å bond get orders between 1 and 2. This example uses :func:`~chemistrykit.structure.systems.bonding.bond_length_from_order` and :func:`~chemistrykit.structure.systems.bonding.bond_order_from_length`. .. GENERATED FROM PYTHON SOURCE LINES 21-34 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from chemistrykit.structure.systems.bonding import PAULING_C_C_CONSTANT, bond_length_from_order, bond_order_from_length from chemistrykit.structure.visualizers.structure_plots import plot_bond_order_correlation D1 = 1.54 # ethane C-C, angstrom reference = {"ethane C-C": (1, 1.54), "ethylene C=C": (2, 1.339), "acetylene C#C": (3, 1.203)} for name, (n, measured) in reference.items(): predicted = bond_length_from_order(D1, n) print(f"{name:14s}: order {n}, predicted {predicted:.3f} A, measured {measured:.3f} A") assert abs(predicted - measured) < 0.02 .. rst-class:: sphx-glr-script-out .. code-block:: none ethane C-C : order 1, predicted 1.540 A, measured 1.540 A ethylene C=C : order 2, predicted 1.326 A, measured 1.339 A acetylene C#C : order 3, predicted 1.201 A, measured 1.203 A .. GENERATED FROM PYTHON SOURCE LINES 35-40 Now read bond orders off measured lengths. Benzene's comes out near 1.6, close to the 1 + 2/3 of Huckel-Coulson theory. Graphite, where each carbon shares one pi bond among three neighbours (order 4/3), comes out near 1.5: the ordering is right, but the correlation is empirical and only good to about 0.1 in bond order. .. GENERATED FROM PYTHON SOURCE LINES 40-46 .. code-block:: Python unknown = {"benzene": 1.397, "graphite": 1.421} estimated = {name: bond_order_from_length(D1, length) for name, length in unknown.items()} for name, n in estimated.items(): print(f"{name:9s}: {unknown[name]:.3f} A -> bond order {n:.2f}") .. rst-class:: sphx-glr-script-out .. code-block:: none benzene : 1.397 A -> bond order 1.59 graphite : 1.421 A -> bond order 1.47 .. GENERATED FROM PYTHON SOURCE LINES 47-57 .. code-block:: Python ax = plot_bond_order_correlation( single_bond_length=D1, bond_orders=np.linspace(0.8, 3.3, 200), c=PAULING_C_C_CONSTANT, color="gray", label=r"$D(n) = 1.54 - 0.71\log_{10} n$" ) for name, (n, measured) in reference.items(): ax.scatter([n], [measured], zorder=3, label=name) for name, n in estimated.items(): ax.scatter([n], [unknown[name]], marker="s", zorder=3, label=f"{name} (from length)") ax.set_ylabel("C-C bond length (angstrom)") ax.legend(fontsize=8) plt.show() .. image-sg:: /api/gallery/structure/bonding/images/sphx_glr_plot_02_pauling_bond_length_001.png :alt: Pauling bond-order/bond-length correlation :srcset: /api/gallery/structure/bonding/images/sphx_glr_plot_02_pauling_bond_length_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.040 seconds) .. _sphx_glr_download_api_gallery_structure_bonding_plot_02_pauling_bond_length.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_bond_length.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_pauling_bond_length.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_pauling_bond_length.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_