.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/spectro/electronic/plot_01_franck_condon.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_spectro_electronic_plot_01_franck_condon.py: Franck-Condon vibronic progressions in a UV-Vis absorption band ==================================================================== Builds a vibronic progression from the Huang-Rhys displacement parameter, verifies the Franck-Condon factors' normalization (they must sum to 1 -- the required correctness check for any Franck-Condon calculation), and shows how a larger excited-state displacement shifts the most-intense vibronic peak to higher `v'`. .. GENERATED FROM PYTHON SOURCE LINES 13-28 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from chemistrykit.spectro.systems.electronic import franck_condon_progression, franck_condon_spectrum, huang_rhys_factor from chemistrykit.spectro.visualizers.spectro_plots import plot_broadened_spectrum, plot_stick_spectrum # A displaced excited-state potential energy surface, characterized by # the Huang-Rhys parameter S. S = huang_rhys_factor(displacement=3.0e-11, mass=1.6e-27, angular_frequency=4.0e13) print(f"Huang-Rhys parameter S = {S:.3f}") progression = franck_condon_progression(v_max=25, S=S) print(f"Sum of Franck-Condon factors (should be ~1): {np.sum(progression):.6f}") print(f"Most probable transition: 0 -> {int(np.argmax(progression))} (S = {S:.2f})") .. rst-class:: sphx-glr-script-out .. code-block:: none Huang-Rhys parameter S = 0.273 Sum of Franck-Condon factors (should be ~1): 1.000000 Most probable transition: 0 -> 0 (S = 0.27) .. GENERATED FROM PYTHON SOURCE LINES 29-32 Building the full vibronic spectrum -- stick positions at the electronic origin plus v' quanta of excited-state vibrational spacing, stick heights the Franck-Condon factors: .. GENERATED FROM PYTHON SOURCE LINES 32-47 .. code-block:: Python spectrum = franck_condon_spectrum(origin_wavenumber=22000.0, vibrational_wavenumber=1400.0, S=S, v_max=12) fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(11, 4)) plot_stick_spectrum(spectrum, ax=ax1, color="darkviolet") ax1.set_xlabel("wavenumber (cm^-1)") ax1.set_title(f"Vibronic stick spectrum (S={S:.2f})") x = np.linspace(spectrum.positions[0] - 500.0, spectrum.positions[-1] + 500.0, 2000) plot_broadened_spectrum(spectrum, x, ax=ax2, shape="gaussian", fwhm=250.0, color="indigo") ax2.set_xlabel("wavenumber (cm^-1)") ax2.set_title("Simulated absorption band") fig.tight_layout() .. image-sg:: /api/gallery/spectro/electronic/images/sphx_glr_plot_01_franck_condon_001.png :alt: Vibronic stick spectrum (S=0.27), Simulated absorption band :srcset: /api/gallery/spectro/electronic/images/sphx_glr_plot_01_franck_condon_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 48-52 A larger displacement (bigger S) shifts the peak of the vibronic envelope to higher v' and broadens the whole progression -- the textbook signature of a large geometry change upon electronic excitation: .. GENERATED FROM PYTHON SOURCE LINES 52-63 .. code-block:: Python fig2, ax3 = plt.subplots(figsize=(7, 4)) for S_value in (0.5, 2.0, 5.0): prog = franck_condon_progression(v_max=20, S=S_value) ax3.plot(np.arange(len(prog)), prog, "o-", label=f"S={S_value}") ax3.set_xlabel("v'") ax3.set_ylabel("Franck-Condon factor") ax3.set_title("Vibronic progression shape vs. displacement") ax3.legend() fig2.tight_layout() plt.show() .. image-sg:: /api/gallery/spectro/electronic/images/sphx_glr_plot_01_franck_condon_002.png :alt: Vibronic progression shape vs. displacement :srcset: /api/gallery/spectro/electronic/images/sphx_glr_plot_01_franck_condon_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.115 seconds) .. _sphx_glr_download_api_gallery_spectro_electronic_plot_01_franck_condon.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_01_franck_condon.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_01_franck_condon.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_01_franck_condon.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_