Background
I am trying to fit a set of energy vs. dihedral angle data obtained from the quantum mechanical software Gaussian. The data was obtained by rotating a certain group of atoms 10 degrees at a time relative to another certain group of atoms and calculating the energy at each rotation. The result is two peaks (corresponding to the symmetric, highest energy conformations) separated by a minimum (corresponding to the lowest energy conformation).
Data
The data are given below:
| Angle | Energy |
|---|---|
| -45.29984 | -0.50819 |
| -35.29987 | -0.51017 |
| -25.29983 | -0.51172 |
| -15.29985 | -0.51276 |
| -5.29986 | -0.5133 |
| 4.70011 | -0.51335 |
| 14.7001 | -0.51291 |
| 24.70008 | -0.51196 |
| 34.70007 | -0.51049 |
| 44.69999 | -0.50855 |
| 54.70017 | -0.50628 |
| 64.70004 | -0.50395 |
| 74.70002 | -0.50194 |
| 84.70007 | -0.50069 |
| 94.70016 | -0.50054 |
| 104.70017 | -0.50151 |
| 114.70015 | -0.50332 |
| 124.70016 | -0.50558 |
| 134.70014 | -0.50789 |
| 144.70018 | -0.50995 |
| 154.70013 | -0.51159 |
| 164.70015 | -0.51271 |
| 174.70014 | -0.51329 |
| -175.29989 | -0.51334 |
| -165.29991 | -0.51286 |
| -155.29992 | -0.51184 |
| -145.29994 | -0.51028 |
| -135.29997 | -0.50826 |
| -125.29997 | -0.50596 |
| -115.29995 | -0.50365 |
| -105.29993 | -0.50173 |
| -95.29982 | -0.50061 |
| -85.29985 | -0.5006 |
| -75.29985 | -0.50171 |
| -65.29985 | -0.50362 |
| -55.29986 | -0.50591 |
| -45.29987 | -0.50819 |
Note: By symmetry, in this case, I could just as easily take only the positive angles.
Fitting
The molecular modeling software LAMMPS uses the following expression to model dihedral energies for the OPLS forcefield (Optimized Potentials for Liquid Simulations; see Watkins and Jorgensen, J Phys Chem A, 105, 4118-4125, 2001) (https://docs.lammps.org/dihedral_opls.html):
$$E = \frac 12 K_1[1+cos(\phi)] +\frac 12 K_2[1-cos(2\phi)] + \frac 12 K_3[1+cos(3\phi)] + \frac 12 K_4[1-cos(4\phi)]$$
The expression requires the 4 K-values to be identified. Some may be zero.
I have tried using the Matlab curve fitting toolbox, but the straightforward approach of using sum of sines has not worked.
What is the best way to fit this data to this expression in order to identify the K-values?
Please note: This is my first time posting on math stackexchange. If this question is not considered sufficiently math-related, just let me know.