I am studying statistical mechanics and force-fields, and I see a lot of this formula being thrown around with no explanation: $$U_{\mathrm{dihedral}} = \begin{cases} k(1+\cos (n\psi + \phi)),& n>0 \\ k(\psi - \phi)^2, & n=0 \\ \end{cases} $$ The only explanation I read is: this...