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.
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:
|
States |
Elements |
|---|---|---|
|
\(S_0\)–\(S_{10}\) |
all twelve |
|
\(S_0\) |
all twelve |
|
\(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 \(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.
python -m pip install --upgrade mlatom
MLatom downloads the pretrained model weights on first use. The weights are also available from Zenodo.
Download pyrazine.xyz and
pyrazine_tddft.json and put them beside
the Jupyter notebook or
the 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 \(S_n\) is \(E(S_n)-E(S_0)\). Oscillator strengths describe absorption from \(S_0\) to each excited state.
import mlatom as ml
model = ml.models.methods(method='OMNI-P3x', nthreads=4)
mol = ml.data.molecule.from_xyz_file('pyrazine.xyz')
model.predict(molecule=mol, nstates=4, calculate_energy_gradients=True)
print(f'S0 energy: {mol.electronic_states[0].energy:.6f} Hartree')
for state, (energy, strength) in enumerate(
zip(mol.excitation_energies * ml.constants.Hartree2eV, mol.oscillator_strengths),
start=1,
):
print(f'S{state}: {energy:.3f} eV, oscillator strength {strength:.4f}')
print('S1 gradient (Hartree/angstrom):')
print(mol.electronic_states[1].energy_gradients)
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.
model.predict(molecule=mol, nstates=11)
tddft = ml.data.molecule.load('pyrazine_tddft.json', format='json')
ml.spectra.plot_uvvis(molecular_database=ml.data.molecular_database(molecules=[mol, tddft]),
spc=True, band_width=0.3, labels=['OMNI-P3x', 'TDA-ωB97X-D/def2-SVP'],
filename='pyrazine_uvvis.png', title='Pyrazine')
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.
References¶
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].