e3x.nn.functions.cutoff.cosine_cutoff
- e3x.nn.functions.cutoff.cosine_cutoff(x, cutoff=1.0)[source]
Cosine cutoff function.
Computes the function
\[\begin{split}\mathrm{cosine\_cutoff}(x) = \begin{cases} \frac{1}{2}\cos\left(\pi\frac{x}{c}\right)+\frac{1}{2}, & x < c\\ 0, & x \ge c \end{cases}\end{split}\]which is zero beyond \(c\) =
cutoff.- Parameters:
x (
<class 'Float[Array, '...']'>) – Input array.cutoff (
Union[Float[Array, ''], float], default:1.0) – Cutoff value (must be larger than 0).
- Return type:
- Returns:
The function value.
- Raises:
ValueError – If
cutoffis smaller or equal to 0.