Rewrote OPLS code without trig functions