I want to make a plot like the one in the picture, with bond lengths on top and a second one with bond angles. Again, plotting the molecule, calculating the bond angles and lengths is easy.
EDIT: I am going to post the derivation of the forces from this bond angle potential as presented by Swope and Ferguson 'Alternative Expressions for Energies and Forces Due to Angle Bending and Torsional Energy' 1992.
The only proper way to do it ab initio is to calculate the energy (E) for various internuclear distances (R) and then to approximate the equilibrium bond length by choosing the distance which has the lowest energy, or by fitting the E (R) points to something like a Morse potential (which is decent for short-distances), Lennard-Jones potential (which is decent for large distances), or the one ...
If you know the bond lengths of few such compounds, you can derive a very accurate linear correlation between the bond length and the frequency. So while you can't directly predict bond lengths from IR alone, you can likely develop a correlation between a particular IR frequency and bond length for a series of related compounds.
5 If your desire is to get the best bond length from that website, then I would begin by looking for the largest basis set (in this case it's aug-cc-pVQZ) and the method that is expected to recover the most correlation energy (in this case it's CCSD (T)=FULL), so the CCSD (T)=FULL/aug-cc-pVQZ bond length of 1.540 Å is a good starting point.
What is the bond length of O2--? - Matter Modeling Stack Exchange