Cutoff Functions
Cutoff functions that can be used with either two- or many-body descriptors.
Cut_Cos
-
class Cut_Cos : public Cut_Base
Cosine cutoff function.
The
Cut_Cos
class implements a smooth cosine cutoff function defined by:\[\begin{split} f_c(r) = \begin{cases} \dfrac{1}{2}\left[ \cos\left( \dfrac{\pi r}{r_c} \right) + 1 \right], & \text{if } r \leq r_c \\ 0, & \text{if } r > r_c \end{cases} \end{split}\]This function smoothly transitions from 1 to 0 over the interval \( 0 \leq r \leq r_c \). It is commonly used in molecular simulations to smoothly truncate interactions without introducing discontinuities in the potential energy or its derivatives.
Reference:
Behler, J., & Parrinello, M. (2007). Generalized neural-network representation of high-dimensional potential-energy surfaces. Physical Review Letters, 98(14), 146401. DOI:10.1103/PhysRevLett.98.146401
Cut_CosS
-
class Cut_CosS : public Cut_Base
Smooth cosine cutoff function with a smoothing interval.
The
Cut_CosS
class implements a smooth cosine cutoff function that transitions smoothly from 1 to 0 over a specified smoothing interval between the inner cutoff radius \( r_{\text{inner}} \) and the outer cutoff radius \( r_{\text{cut}} \) The function is defined as:\[\begin{split} f(r) = \begin{cases} 1, & \text{if } r \leq r_{\text{inner}} \\ \dfrac{1}{2}\left[1 + \cos\left( \dfrac{\pi (r - r_{\text{inner}})}{r_{\text{cut}} - r_{\text{inner}}} \right) \right], & \text{if } r_{\text{inner}} < r < r_{\text{cut}} \\ 0, & \text{if } r \geq r_{\text{cut}} \end{cases} \end{split}\]and its derivative:
\[\begin{split} f'(r) = \begin{cases} 0, & \text{if } r \leq r_{\text{inner}} \text{ or } r \geq r_{\text{cut}} \\ -\dfrac{\pi}{2 (r_{\text{cut}} - r_{\text{inner}})} \sin\left( \dfrac{\pi (r - r_{\text{inner}})}{r_{\text{cut}} - r_{\text{inner}}} \right), & \text{if } r_{\text{inner}} < r < r_{\text{cut}} \end{cases} \end{split}\]where:
\( r \) is the radial distance.
\( r_{\text{cut}} \) is the outer cutoff radius (
rcut
).\( r_{\text{inner}} \) is the inner cutoff radius (
rcut_inner
), defined as \( r_{\text{inner}} = r_{\text{cut}} - 1.0 \).
Characteristics:
For \( r \leq r_{\text{inner}} \) the function \( f(r) = 1 \) and \( f'(r) = 0 \)
For \( r_{\text{inner}} < r < r_{\text{cut}} \), the function transitions smoothly from 1 to 0.
For \( r \geq r_{\text{cut}} \), the function \( f(r) = 0 \) and \( f'(r) = 0 \).
Note: The function ensures continuity and smoothness in simulations or calculations where a smooth cutoff is required.
Cut_Dummy
-
class Cut_Dummy : public Cut_Base
Represents a basic cutoff function with a sharp transition at the cutoff radius.
The
Cut_Dummy
class implements a simple cutoff function defined by:\[\begin{split} f_c(r) = \begin{cases} 1, & \text{if } r \leq r_{\text{cut}} \\ 0, & \text{if } r > r_{\text{cut}} \end{cases} \end{split}\]and its derivative:
\[ f_c'(r) = 0 \]where:
\( r \) is the radial distance.
\( r_{\text{cut}} \) is the cutoff radius.
Characteristics:
The function value is constant (1) within the cutoff radius and zero beyond it.
The derivative of the function is zero everywhere except at \( r = r_{\text{cut}} \) where it is undefined due to the discontinuity.
Note: Since the function is discontinuous at \( r = r_{\text{cut}} \) its derivative is not defined at that point. In practical computations, the derivative function
calc_prime
returns0.0
for all \( r \)
Cut_Poly
-
class Cut_Poly : public Cut_Base
Represents a 5th order polynomial cutoff function with zero first and second derivatives at the cutoff radius.
This class implements a smooth cutoff function defined by:
\[\begin{split} f(r) = \begin{cases} 1 - 10 \left( \dfrac{r}{r_{\text{cut}}} \right)^3 + 15 \left( \dfrac{r}{r_{\text{cut}}} \right)^4 - 6 \left( \dfrac{r}{r_{\text{cut}}} \right)^5, & \text{for } r \leq r_{\text{cut}} \\ 0, & \text{for } r > r_{\text{cut}} \end{cases} \end{split}\]and its derivative:\[\begin{split} f'(r) = \begin{cases} \left( -30 \left( \dfrac{r}{r_{\text{cut}}} \right)^2 + 60 \left( \dfrac{r}{r_{\text{cut}}} \right)^3 - 30 \left( \dfrac{r}{r_{\text{cut}}} \right)^4 \right) \dfrac{1}{r_{\text{cut}}}, & \text{for } r \leq r_{\text{cut}} \\ 0, & \text{for } r > r_{\text{cut}} \end{cases} \end{split}\]where:\( r \) is the radial distance.
\( r_{\text{cut}} \) is the cutoff radius.
The function smoothly transitions from 1 to 0 within the cutoff radius \( r_{\text{cut}} \), ensuring that the function and its first and second derivatives are zero at \( r \geq r_{\text{cut}} \).
Cut_PolyS
-
class Cut_PolyS : public Cut_Base
Polynomial cutoff function ensuring smoothness up to the second derivative.
The
Cut_PolyS
class implements a polynomial cutoff function defined as:\[\begin{split} f_c(r) = \begin{cases} 1, & \text{if } r \leq r_{\text{inner}} \\ \left( r - r_c + 1 \right )^3 \left[ r \left( 15 - 6 r \right ) - 10 \right ] + 1, & \text{if } r_{\text{inner}} < r \leq r_c \\ 0, & \text{if } r > r_c \end{cases} \end{split}\]where:
\( r \) is the radial distance.
\( r_c \) is the cutoff radius.
\( r_{\text{inner}} = r_c - 1 \) is the inner cutoff radius.
This function provides a smooth transition from 1 to 0 between \( r_{\text{inner}} \) and \( r_c \), ensuring continuity and smoothness in the potential and its derivatives up to the second order.
Reference:
Singraber, A., Behler, J., & Dellago, C. (2019). Library-Based LAMMPS Implementation of High-Dimensional Neural Network Potentials. Journal of Chemical Theory and Computation, 15(1), 182–190. DOI:10.1021/acs.jctc.8b00770
Cut_PT
-
class Cut_PT : public Cut_Base
Represents a smooth cutoff function using hyperbolic tangent smoothing.
This class implements a smooth cutoff function defined by:
\[ f(r) = \dfrac{1}{2} + \dfrac{1}{2} \tanh\left( \dfrac{1}{2} \left( \dfrac{r_c}{r + \dfrac{r_c}{2}} + \dfrac{r_c}{r - r_c} \right) \right) \]and its derivative:\[ f'(r) = -\dfrac{r_c}{4} \left( \dfrac{1}{\cosh\left( \dfrac{r_c}{2} \left( \dfrac{1}{r + \dfrac{r_c}{2}} + \dfrac{1}{r - r_c} \right) \right)} \right)^2 \left( \dfrac{1}{\left( r + \dfrac{r_c}{2} \right)^2} + \dfrac{1}{\left( r - r_c \right)^2} \right) \]where:\( r \) is the radial distance.
\( r_c \) is the cutoff radius.
The cutoff function smoothly transitions from 1 to 0 between \( r = -\dfrac{r_c}{2} \) and \( r = r_c \).
Cut_Tanh
-
class Cut_Tanh : public Cut_Base
Hyperbolic tangent cutoff function.
The
Cut_Tanh
class implements a smooth cutoff function using the hyperbolic tangent, defined by:\[\begin{split} f_c(r) = \begin{cases} \tanh^3\left( 1 - \dfrac{r}{r_c} \right), & \text{if } r \leq r_c \\ 0, & \text{if } r > r_c \end{cases} \end{split}\]This function smoothly transitions from 1 to 0 over the interval \( 0 \leq r \leq r_c \), with the transition shape controlled by the cubic power of the hyperbolic tangent.
Reference:
Behler, J. (2011). Atom-centered symmetry functions for constructing high-dimensional neural network potentials. Journal of Chemical Physics, 134(7), 074106. DOI:10.1063/1.3553717