.. _tutorial_omnip3x: OMNI-P3x ======== Use OMNI-P3x [OMNIP3x]_ to calculate singlet excitation energies and oscillator strengths at a fixed molecular geometry. The examples below use pyrazine to calculate excited-state properties and plot a UV/vis absorption spectrum. .. figure:: files/omnip3x/overview.png :alt: Overview of the development and use of OMNI-P3x :width: 100% Ground- and excited-state conformations of molecules from several databases were sampled, selected with active learning and labeled with TDA-ωB97X-D/def2-SVP, giving a dataset of 1.17 million structures. Combined with ground-state data at two further levels of theory, it was used to train OMNI-P3x, which predicts the excited-state properties needed for UV/vis spectra simulations, analysis of excited-state charges and high-throughput screening. OMNI-P3x covers neutral and charged molecules containing H, B, C, N, O, F, Si, P, S, Cl, Br and I. Choose the level of theory with the ``level`` argument of ``predict``: .. list-table:: :header-rows: 1 :widths: 45 20 35 * - ``level`` - States - Elements * - ``'TDA-wB97X-D/def2-SVP'`` (default) - :math:`S_0`–:math:`S_{10}` - all twelve * - ``'wB97M-D3(BJ)/def2-TZVPP'`` - :math:`S_0` - all twelve * - ``'CCSD(T)*/CBS'`` - :math:`S_0` - H, C, N, O For every state, OMNI-P3x predicts the energy, energy gradients, Hessian, dipole moment and atomic charges (``AIMNet_charges``), and for the excited states the oscillator strengths from :math:`S_0`. MLatom adds the D3(BJ) dispersion of the ωB97M-D3(BJ) level. OMNI-P3x is an ensemble of four MS-AIOAIMNet2 networks; every prediction is the mean of the four. Before you start ---------------- Use Python 3.10–3.12. Starting with MLatom 3.28.1, pip installs the OMNI-P3x backend with MLatom. .. code-block:: bash python -m pip install --upgrade mlatom MLatom downloads the pretrained model weights on first use. The weights are also available from `Zenodo `__. Download :download:`pyrazine.xyz ` and :download:`pyrazine_tddft.json ` and put them beside the :download:`Jupyter notebook ` or the :download:`Python script `. Excitation energies and gradients --------------------------------- Run this example to calculate the energies and gradients of the ground state and three singlet excited states. The excitation energy of state :math:`S_n` is :math:`E(S_n)-E(S_0)`. Oscillator strengths describe absorption from :math:`S_0` to each excited state. .. literalinclude:: files/omnip3x/quickstart.py :language: python :end-before: # UV/vis spectrum The example uses the default TDA-ωB97X-D/def2-SVP model level. The excitation energies are printed in eV and the gradients in Hartree per ångström. For the supplied pyrazine geometry, the first excitation is about 4.15 eV. UV/vis absorption at one geometry --------------------------------- Run this block after the first example to plot the spectrum. It predicts ten singlet excitations at the same geometry and broadens the transitions by single-point convolution with a band width of 0.3 eV. For comparison, the plot also shows TD-DFT (TDA-ωB97X-D/def2-SVP) at the same geometry, broadened in the same way. .. literalinclude:: files/omnip3x/quickstart.py :language: python :start-after: # UV/vis spectrum .. figure:: files/omnip3x/pyrazine_uvvis.png :alt: OMNI-P3x and TD-DFT UV/vis absorption spectra of pyrazine :width: 540px OMNI-P3x and TD-DFT (TDA-ωB97X-D/def2-SVP, Turbomole) absorption spectra of pyrazine at the same geometry. Tutorials --------- Each tutorial is a Jupyter notebook; its page shows the notebook with the output. .. toctree:: :maxdepth: 1 tutorial_omnip3x_spc tutorial_omnip3x_nea tutorial_omnip3x_charges References ---------- .. [OMNIP3x] Mikołaj Martyka, Joanna Jankowska, and `Pavlo O. Dral `__. `OMNI-P3x universal neural network potential for large-scale computational photochemistry workflows `__. *arXiv* **2026**, 2611.32133 [physics.chem-ph].