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.

../_images/e3x.nn.functions.cutoff.cosine_cutoff_0_0.svg
Parameters:
Return type:

<class 'Float[Array, '...']'>

Returns:

The function value.

Raises:

ValueError – If cutoff is smaller or equal to 0.