xnn.ffnn.models.oplslib.fourier_to_rb#

xnn.ffnn.models.oplslib.fourier_to_rb(v)[source]#

Convert OPLS Fourier coefficients to Ryckaert-Bellemans form.

The OPLS proper-dihedral energy (all phase angles zero) is:

E = V0 + V1/2 (1+cos phi) + V2/2 (1-cos 2 phi)
      + V3/2 (1+cos 3 phi) + V4/2 (1-cos 4 phi)

with phi = 0 at cis; the Ryckaert-Bellemans form is E = sum_n C_n cos(psi)^n with psi = phi - 180. V0 is a constant offset (zero for original OPLS types; L-OPLS uses it to make the two forms match exactly).

Parameters:

v (sequence of float) – (V0, V1, V2, V3, V4).

Returns:

[C0, C1, C2, C3, C4, C5] in the same energy unit.

Return type:

list of float