Plot UV/Vis spectrum from ORCA output file and much more. (TO UPDATE)
A Python 3 script for (hassle-free) plotting of absorption spectra from output files with peak detection and annotation. It combines the stick spectrum with the convoluted spectrum (lorentzian or gaussian line shape). The script supports energy (wave number or electron-volt, cm-1 or eV) and wavelength (λ, nm) plots. The full spectrum or parts of the spectrum can be plotted. (TO UPDATE)
Start the script with:
python3 orca-uv.py [OPTION] filenameit will save the plot as SVG :
spectrum.svg
filename, required: filename (.out, .asc, .spectrum, .spectrum.rootX)-s, optional: shows thematplotlibwindow-n, optional: do not save the spectrum-acs, optional: format the plot to ACS publications standard format-ostr, optional: change the name of the savec spectrum-pnm, optional: plot the wavelength (λ, nm) spectrum (default)-pwn, optional: plot the wave number (energy, cm-1) spectrum-pev, optional: plot the electron-volt (energy, eV) spectrum-lsg, optional: use the gaussian line shape function (default is lorentzian line shape)-PL, optional: use the PL Intensity y-axis label (default is Absorbance)-wnmN, optional: line width of the line shape for the nm scale (default isN = 20)-wwnN, optional: line width of the line shape for the cm-1 scale (default isN = 1000)-wevN, optional: line width of the line shape for the eV scale (default isN = 0.1)-x0N, optional: start spectrum at N nm or N cm-1 (x0 => 0)-x1N, optional: end spectrum at N nm or N cm-1 (x1 => 0)-y1N, optional: end statically spectrum at N a.u. (y1 => 0)-swnN, optional: shift the spectrum by N cm-1 (default isN = 0)-sevN, optional: shift the spectrum by N eV (default isN = 0)
There are numerous ways to configure the spectrum in the script:
Check # plot config section - configure here in the script.
You can even configure the script to plot of the single line shape functions. (TO UPDATE)
Colors, line thickness, line styles, level of peak detection and more can be changed in the code directly. (TO UPDATE)
The SVG file will be replaced everytime you start the script with the same output file. If you want to keep the file, you have to rename it. The data are taken from the section "ABSORPTION SPECTRUM VIA TRANSITION ELECTRIC DIPOLE MOMENTS". (TO UPDATE)
-
sys -
re -
argparse -
numpy -
pandas -
matplotlib -
seaborn -
scipy
Contributed by Emmanuel Bourret
Based on orca_uv by Sebastian Dechert
-
Change the line color/style when the same type of data type is plotted multiple times.
-
Implement IR spectra (intensity and transmittance) as well as their VPT2 corrections.
-
Implement Raman spectra?
-
Update
README.md -
Add examples