The traditional way of parametrizing the dihedral term is to calculate the target data using high level quantum mechanics (QM) calculations, e.g. DFT calculation, followed by optimization to fit molecular mechanics dihedral parameters using MD simulation. In this study for the first time, OPLS-AA force field dihedral coefficients (K1, K2, K3, and K4) for a specific dihedral angle is calculated using a linear regression fit with cosine basis functions. The equation is attached as .png file.
More details can be found here:
OPLS dihedral equation.png