I am trying to represent the difference between the an anharmonic and harmonic treatment of vibrations. The easiest way to do this is to present an example of a harmonic and anharmonic potential energy surface (PES).
I would like to present a figure similar to the one attached below (from Herzberg),$^1$ where we have the morse oscillator function presented with the vibrational energy levels indicated.
I have some spectroscopic data from an undergraduate experiment I did about $\ce{I2}$, and have the data points (or the equation) to draw the PES, and the energies of the vibrations in order to plot their values.
Is there any software which is able to generate something like this for me, or are there any tricks people know where this can be done in other graphing software (preferably Excel or Igor Pro)? The difference between the spacing of each successive overtone in an experimental vs. harmonic spectrum is part of the explanation, so it's important to illustrate that in the figure, if at all possible.
EDIT I have since come across a Python script which will do the job (see answer below); however, I'm sure that other ways to generate these diagrams that people know would be appreciated (particularly for people who do not know much about Python, such as myself...)!
- G. Herzberg, Spectra of Diatomic Molecules, Krieger Publishing Company, Malabar, Florida, Reprint edn., 1989.
=IF($B1>En0, NA(), En0)
for the values in column C whereEn0
is your first energy. Use the other columns for the additional eigenvalues and plot withScatter
. – Paul Jul 10 '23 at 10:59