xnn.ffnn.models.terms.fourier_series#

xnn.ffnn.models.terms.fourier_series(cos1, k, n, sign)[source]#

sum_m k_m [1 + s_m cos(n_m phi)] per torsion, the phases zero (s = 1) or pi (s = -1).

cos(n phi) is the Chebyshev polynomial T_n(cos phi) (T_{n+1} = 2 c T_n - T_{n-1}), so the sine of the torsion is never needed.

Parameters:
  • cos1 (Tensor) – cos phi of the torsions (M,).

  • k (Tensor) – Barrier parameters (M, K).

  • n (list of int) – The multiplicity of each column of k.

  • sign (Tensor) – The sign s of each column, (K,) or (M, K).

Returns:

Energies (M,).

Return type:

Tensor