Skip to content

Symmetryfunctions

Overview

There are several types of symmetry functions available in RuNNer. A detailed description of most of them can be found in J. Behler, J. Chem. Phys. 2011, 134, 074106. For high-dimensional neural network potentials there are radial and angular symmetry functions, which are all many-body functions and not to be confused with two- and three-body functions. In addition, spin-dependent atom-centered symmetry functions proposed in M. Eckhoff, J. Behler, npj Comput. Mater. 2021, 7, 170 take atomic spin degrees of freedom into account to represent different magnetic orders of collinear spin-polarized atoms. For systems with many different chemical elements, weighted symmetry functions are adapted from M. Eckhoff, M. Reiher, J Chem. Theory Comput. 2023, 19, 3509.

The Cutoff Function

The cutoff function is a central part of any symmetry function, because it defines the local atomic environments. In RuNNer there are several cutoff functions available, which are selected by the keywords

Cosine and hypertangent are well tested and recommended for applications. The other cutoff functions currently have an experimental status only and should be used with care.

For fc_cosine the function

\[f_c(r_{ij}) = \begin{cases} 1 & \text{if } r_{ij} < r_{ci} \\ \frac{1}{2}\left[\cos\left(\frac{\pi(r_{ij} - r_{ci})}{r_{co} - r_{ci}}\right) + 1\right] & \text{if } r_{ci} \leq r_{ij} \leq r_{co} \\ 0 & \text{if } r_{ij} > r_{co} \end{cases}\]

is used, where \(r_{ci}\) is the inner cutoff radius and \(r_{co}\) is the outer cutoff radius.

For fc_hypertangent it is the function

\[f_c(r_{ij}) = \begin{cases} \tanh^3(1) & \text{if } r_{ij} \leq r_{ci} \\ \tanh^3\left(1 - \frac{r_{ij} - r_{ci}}{r_{co} - r_{ci}}\right) & \text{if } r_{ci} < r_{ij} \leq r_{co} \\ 0 & \text{if } r_{ij} > r_{co} \end{cases}\]

where \(r_{ci}\) is the inner cutoff radius and \(r_{co}\) is the outer cutoff radius.

fc_hard is a step function where the cutoff function that abruptly transitions from 1 to 0 at the cutoff radius. This cutoff function has no smooth transition region. Mathematical Formula:

\[f_c(r_{ij}) = \begin{cases} 1 & \text{if } r_{ij} \leq r_{co} \\ 0 & \text{if } r_{ij} > r_{co} \end{cases}\]

where \(r_{co}\) is the cutoff radius.

fc_polynomial defines a polynomial cutoff function with smooth transition to zero at the cutoff radius. This cutoff function uses a polynomial function to smoothly decay from 1 to 0. Mathematical Formula:

\[f_c(r_{ij}) = \begin{cases} \left(1 - \frac{r_{ij}^2}{r_{co}^2}\right)^n & \text{if } r_{ij} \leq r_{co} \\ 0 & \text{if } r_{ij} > r_{co} \end{cases}\]

where \(r_{co}\) is the cutoff radius and \(n\) is the polynomial exponent (default: \(n = 2\)).

fc_vdw

Defines a van der Waals cutoff function with inner and outer cutoff radii and buffer zones. This specialized cutoff function is designed for van der Waals interactions with flexible transition regions.

Mathematical Formula:

\[f_c(r_{ij}) = \begin{cases} 0 & \text{if } r_{ij} \leq r_{ci} \text{ or } r_{ij} > r_{co} \\ 3r_{bi}^2 - 2r_{bi}^3 & \text{if } r_{ci} < r_{ij} \leq r_{ci} + d_{bi} \\ 1 & \text{if } r_{ci} + d_{bi} < r_{ij} \leq r_{co} - d_{bo} \\ 1 - 3r_{bo}^2 + 2r_{bo}^3 & \text{if } r_{co} - d_{bo} < r_{ij} \leq r_{co} \end{cases}\]

where: - \(r_{bi} = \frac{r_{ij} - r_{ci}}{d_{bi}}\) (inner buffer region) - \(r_{bo} = \frac{r_{ij} - r_{co} + d_{bo}}{d_{bo}}\) (outer buffer region) - \(r_{ci}\) is the inner cutoff radius, \(r_{co}\) is the outer cutoff radius - \(d_{bi}\) is the inner buffer width, \(d_{bo}\) is the outer buffer width

Usually, the inner cutoff \(r_{ci}\) is set to zero.

The following table shows a list of the functional forms of all cutoff functions within the cutoff radius and without the inner cutoff radius. Outside the cutoff radius the values are zero. In addition, please be aware that the inner cutoff radius must be smaller than the shortest bond length in the system in order to avoid losing information about the close atomic environment.

keyword Name Formula
fc_hard hard function 1
fc_cosine cosine function \(\frac{1}{2} [\cos(\frac{\pi(r_{ij} - r_{ci})}{r_{co} - r_{ci}})+1]\)
fc_hypertangent hypertangent function \(\tanh^3\left(1 - \frac{r_{ij}}{r_{co}}\right)\)
fc_hypertangent_approx approximate hypertangent function \(\left[x \frac{27 + x^2}{27 + 9x^2}\right]^3, \; x = 1 - \frac{r_{ij}}{r_{co}}\)
fc_polynomial polynomial function \(\left(1 - \frac{r_{ij}^2}{r_{co}^2}\right)^n \;\text{if } r_{ij} \le r_{co}\)
fc_vdw vdw \(3 r_{bi}^2 - 2 r_{bi}^3\)

Symmetry Functions

RuNNer has a variety of symmetry functions that transform the geometric information of the input structures to neural network-readable feature vectors. There are the radial and angular atom centered symmetry functions which also have modified versions for magnetic spin or element weighted symmetry functions. Another type of symmetry functions is the overlap matrix.

Radial Symmetry Functions

The radial functions describe the radial distribution of neighboring atoms of a specified element with respect to the central atom \(i\). They can often be interpreted as continuous coordination numbers of the central atom.

Radial Function Type 1

For the description of the environment of atom \(i\) type 1 is the plain cutoff function of fc_cosine 1. (no other cutoff type can be used here):

\[ \begin{align} G^1_i = \sum_j f_{\mathrm{c}}\left(R_{ij}\right) \end{align} \]

For \(R_{ij} < R_{\mathrm{c}}\) we then have

\[ \begin{align} G^{1}_i = \sum_j \frac{1}{2} \cdot \left[\cos{\left(\frac{\pi R_{ij}}{R_{\mathrm{c}}}\right)}+1\right] \end{align} \]

This symmetry function has a non-zero derivative with respect to the coordinates of the reference atom \(x_i\), \(y_i\), \(z_i\) and with respect to the coordinates of all atoms \(j\), \(x_j\), \(y_j\) and \(z_j\). The derivative dGdxyz with respect to a coordinate \(\alpha\) is then

\[ \begin{align} \frac{\partial G^1_i}{\partial \alpha} = -\sum_j \frac{1}{2} \sin{ \left( \frac{\pi R_{ij}}{R_{\mathrm{c}}} \right)} \cdot \frac{\pi}{R_{\mathrm{c}}} \cdot \frac{\partial R_{ij}}{\partial \alpha} \end{align} \]

where \(\alpha\) can be any of \(x_i\), \(y_i\), \(z_i\), \(x_j\), \(y_j\) or \(z_j\). With the definition of \(R_{ij}\)

\[\begin{align} R_{ij}=\sqrt{(x_i-x_j)^2+(y_i-y_j)^2+(z_i-z_j)^2} \end{align} \]

we then have

\[ \begin{align} \frac{\partial R_{ij}}{\partial x_i} & = \frac{1}{2\cdot \sqrt{(x_i-x_j)^2+(y_i-y_j)^2+(z_i-z_j)^2} } \cdot 2(x_i-x_j) \\ & = \frac{1}{R_{ij}}(x_i-x_j) \end{align} \]

and

\[ \begin{align} \frac{\partial R_{ij}}{\partial x_j} = -\frac{\partial R_{ij}}{\partial x_i} \end{align} \]

For the derivatives \(\frac{\partial G^{\mu}_i}{\partial \alpha}\) in RuNNer the array feature_derivatives(num_funcvalues, num_neighbors, 3) is used. Field 2 defines the number of the symmetry function (not its type number!), field 3 specifies the number of neighbors of the central atom, i.e., the atom that is characterized by the symmetry function, and field 1 specifies the coordinate of the derivative, so field 1 and 3 together define \(\alpha\).

The use of this function is discouraged, because for small cutoffs there can be problems in the accuracy of energies and forces. Therefore, the symmetry function has not yet been generalized to automatically adapt to the chosen cutoff type.

Radial Function Type 2

This function is the most important radial function. It is a sum of shifted Gaussians multiplied by the cutoff function. The result is a "shell" around the atom at a certain radius determined by the shift \(R_s\). The width of the Gaussian is determined by the parameter \(\eta\).

\[ \begin{align} G^2_i = \sum_{j} e^{-\eta \left(R_{ij}-R_{\mathrm{s}}\right)^2}\cdot f_{\mathrm{c}}\left(R_{ij}\right) . \end{align} \]

The derivative dGdxyz with respect to a coordinate \(\alpha\) is

\[ \begin{align} \frac{\partial G^2_i}{\partial \alpha} = \sum_j \left[-2 \eta \left(R_{ij}-R_s\right) f_{\mathrm c}(R_{ij})e^{-\eta \left(R_{ij}-R_s\right)^2} \cdot \frac{\partial R_{ij}}{\partial \alpha}+e^{-\eta \left(R_{ij}-R_s\right)^2} \cdot \frac{\partial f_{\mathrm c}(R_{ij})}{\partial \alpha}\right] \end{align} \]

A good starting point is to first try \(R_s=0\).

Radial Spin-dependent Functions

Spin-dependent atom-centered symmetry functions can distinguish different collinear atomic spin arrangements for the construction of magnetic high-dimensional neural network potentials. To represent the magnetic order, the atomic spin coordinate,

\[ \begin{align} s_i=\begin{cases}0&\mathrm{for}\ |{M_S}_i|<M_S^\mathrm{thres}\\\mathrm{sgn}({M_S}_i)&\mathrm{otherwise}\end{cases}\ , \end{align} \]

with

\[ \begin{align} {M_S}_i=\frac{\hbar}{2}\left(n_i^\uparrow-n_i^\downarrow\right)\ , \end{align} \]

is used. \(M_S\) equals the difference between the numbers of spin-up \(n_i^\uparrow\) and spin-down electrons \(n_i^\downarrow\) at an atom site \(i\) multiplied by the spin of an electron \(\tfrac{1}{2}\,\hbar\). The threshold \(M_S^\mathrm{thres}\) is set to \(0.25\,\hbar\). If the atomic spin is not smaller than \(M_S^\mathrm{thres}\), the atomic spin coordinate will be the sign of \(M_S\), i.e., \(-1\) or 1.

The radial spin-dependent symmetry functions are based on radial symmetry function type 2, but contain in addition a radial spin augmentation function \(M^\mathrm{x}\),

\[ \begin{align} G^{21-23}_{i}=\sum_jM^\mathrm{x}(s_i,s_j)\cdot\mathrm{e}^{-\eta R_{ij}^2}\cdot f_\mathrm{c}\left(R_{ij}\right)\ . \end{align} \]

Radial Spin-dependent Function Type 21 (\(M^\mathrm{0^*}\))

The radial spin-dependent symmetry function type 21 uses the spin augmentation function

\[ \begin{align} M^\mathrm{0^*}(s_i,s_j)=1-\left|s_is_j\right|\ . \end{align} \]

This spin augmentation function represents only non-magnetic interactions.

Radial Spin-dependent Function Type 22 (\(M^\mathrm{+}\))

The radial spin-dependent symmetry function type 22 uses the spin augmentation function

\[ \begin{align} M^\mathrm{+}(s_i,s_j)=\tfrac{1}{2}\left|s_is_j\right|\cdot\left|s_i+s_j\right|\ . \end{align} \]

This spin augmentation function represents ferromagnetic interactions between a magnetic central atom and a magnetic neighbor atom.

Radial Spin-dependent Function Type 23 (\(M^\mathrm{-}\))

The radial spin-dependent symmetry function type 23 uses the spin augmentation function

\[ \begin{align} M^\mathrm{-}(s_i,s_j)=\tfrac{1}{2}\left|s_is_j\right|\cdot\left|s_i-s_j\right|\ . \end{align} \]

This spin augmentation function represents antiferromagnetic interactions between a magnetic central atom and a magnetic neighbor atom.

Weighted Radial Function Type 32 (weighted)

Element weighted radial symmetry functions can be used as a remedy for the combinatorial explosion if too many element species exist in one dataset. Typically, the cost of the weighted symmetry functions have a break even point at 5 different elements. Radial function type 32 is based on the radial function type 2 and introduces weights \(H_{ij}^{rad}\) depending on the valence electron structure of the neighbor atom \(j\). For scaling reasons a factor of \(\frac{1}{H_{max,i}^{rad}}\) is used.

\[ \begin{align} G^{32}_{i}=\frac{1}{H_{max,i}^{rad}}\sum_jH_{ij}^{rad}\cdot\mathrm{e}^{-\eta R_{ij}^2}\cdot f_\mathrm{c}\left(R_{ij}\right)\ . \end{align} \]
\[ H_{i,j}^{\mathrm{rad}} \in \left\{1,n_j,m_j,d_j,f_j,\bar{n}_j := X - n_j,\bar{m}_j := 9 - m_j,\bar{d}_j := 11 - d_j,\bar{f}_j := 15 - f_j\right\} \]

Angular Symmetry Functions

Angular Function Type 3

The angular terms are constructed for all triplets of atoms by summing the cosine values of the angles \(\theta_{ijk}=\frac{\bf{R}_{ij}\cdot\bf{R}_{ik}}{R_{ij} R_{ik}}\) centered at atom \(i\), with \(\bf{R}_{ij}=\bf{R}_i-\bf{R}_j\),

\[ \begin{align} G^{3}_{i} &=2^{1-\zeta}\sum_{j}\sum_k\left[ \left(1+\lambda \cdot\cos{\theta_{ijk}}\right)^{\zeta} \cdot e^{-\eta\left(R_{ij}^2+R_{ik}^2+R_{jk}^2\right)}\right. \notag \\ & \cdot \left.f_{\mathrm{c}}\left(R_{ij}\right) \cdot f_{\mathrm{c}}\left(R_{ik}\right) \cdot f_{\mathrm{c}}\left(R_{jk}\right)\right] \end{align} \]

\(\lambda\) can only have the values +1 and -1. The derivative dGdxyz with respect to a coordinate \(\alpha\) is

\[ \begin{align} \frac{\partial G^3_i}{\partial \alpha}=2^{1-\zeta}\sum_{j}\sum_k %\left[ \frac{\partial \left(1+\lambda\cdot\cos{\theta_{ijk}}\right)^{\zeta}}{\partial \alpha} \cdot e^{-\eta\left(R_{ij}^2+R_{ik}^2+R_{jk}^2\right)} \cdot f_{\mathrm{c}}\left(R_{ij}\right)\cdot f_{\mathrm{c}% }\left(R_{ik}\right)\cdot f_{\mathrm{c}}\left(R_{jk}\right) \nonumber \\ + \frac{\partial e^{-\eta\left(R_{ij}^2+R_{ik}^2+R_{jk}^2\right)} }{\partial \alpha} \cdot \left(1+\lambda\cdot\cos{\theta_{ijk}}\right)^{\zeta} \cdot f_{\mathrm{c}}\left(R_{ij}\right)\cdot f_{\mathrm{c}% }\left(R_{ik}\right)\cdot f_{\mathrm{c}}\left(R_{jk}\right) \nonumber \\ + \frac{\partial f_{\mathrm{c}}\left(R_{ij}\right)}{\partial \alpha} \cdot \left(1+\lambda\cdot\cos{\theta_{ijk}}\right)^{\zeta} \cdot e^{-\eta\left(R_{ij}^2+R_{jk}^2+R_{jk}^2\right)} \cdot f_{\mathrm{c} }\left(R_{ik}\right)\cdot f_{\mathrm{c}}\left(R_{jk}\right) \nonumber \\ + \frac{\partial f_{\mathrm{c}}\left(R_{ik}\right)}{\partial \alpha} \cdot \left(1+\lambda\cdot\cos{\theta_{ijk}}\right)^{\zeta} \cdot e^{-\eta\left(R_{ij}^2+R_{ik}^2+R_{jk}^2\right)} \cdot f_{\mathrm{c} }\left(R_{ij}\right)\cdot f_{\mathrm{c}}\left(R_{jk}\right) \nonumber \\ + \frac{\partial f_{\mathrm{c}}\left(R_{jk}\right)}{\partial \alpha} \cdot \left(1+\lambda\cdot\cos{\theta_{ijk}}\right)^{\zeta} \cdot e^{-\eta\left(R_{ij}^2+R_{ik}^2+R_{jk}^2\right)} \cdot f_{\mathrm{c} }\left(R_{ij}\right)\cdot f_{\mathrm{c}}\left(R_{ik}\right) %\right] \end{align} \]

Angular Function Type 8

This is an angular function with maxima at arbitrary angles, which is symmetric with respect to \(\alpha=\pi\) and \(\alpha=2\pi\).

\[ \begin{align} G^{8}_{i} &=\left[ e^{-\eta\cdot\left(\theta_{ijk}-\theta_{shift}\right)^2} +e^{-\eta\cdot\left(\theta_{ijk}-\left(360^\circ-\theta_{shift} \right)\right)^2} +e^{-\eta\cdot\left(\theta_{ijk}+\theta_{shift}\right)^2} +e^{-\eta\cdot\left(\theta_{ijk}-\left(360+\theta_{shift}\right)\right)^2} \right] \notag \\ & \cdot f_c\left(R_{ij}\right) \cdot f_c\left(R_{ik}\right) \cdot f_c\left(R_{jk}\right) \end{align} \]

Angular Function Type 9

This symmetry function is closely related to angular symmetry function 3, but is missing the terms depending on \(R_{jk}\).

\[ \begin{align} G^{9}_{i} = 2^{1-\zeta}\sum_{j}\sum_k\left[ \left(1+\lambda\cdot\cos{\theta_{ijk}}\right)^{\zeta} \cdot e^{-\eta\left(R_{ij}^2+R_{ik}^2\right)} \cdot f_{\mathrm{c}}\left(R_{ij}\right) \cdot f_{\mathrm{c}}\left(R_{ik}\right) \right] \end{align} \]

Due to the missing multiplication by \(f_{\mathrm{c} }\left(R_{jk}\right)\) also triples with distances between \(j\) and \(k\) being larger than the cutoff radius will be considered. Therefore the numerical values of this symmetry function will be generally larger.

Angular Spin-dependent Functions

The angular spin-dependent symmetry functions are based on angular symmetry function type 3, but contain in addition an angular spin augmentation function \(M^\mathrm{xx}\),

\[ \begin{align} G^{24-31}_{i}=2^{-\zeta}\sum_j\sum_{k\neq j}M^\mathrm{xx}(s_i,s_j,s_k)\cdot\left[1+\lambda\cos\left(\theta_{ijk}\right)\right]^\zeta\cdot\mathrm{e}^{-\eta\left(R_{ij}^2+R_{ik}^2+R_{jk}^2\right)}\cdot f_\mathrm{c}\left(R_{ij}\right)\cdot f_\mathrm{c}\left(R_{ik}\right)\cdot f_\mathrm{c}\left(R_{jk}\right)\ . \end{align} \]

Note: The sum over \(j\) and \(k\neq j\) takes into account all contributions of a \(j\times k\) matrix except for diagonal contributions (self-interaction). Therefore, \(2^{-\zeta}\) is used as prefactor instead of \(2^{1-\zeta}\) which is employed for the sum over \(j\) and \(k>j\). In the latter case only the upper triangular (all entries above the main diagonal) are used and multiplied by an additional factor \(2\) of the prefactor because these are typically identical to the lower triangular. The only exception is the angular spin-dependent symmetry function type 27 which requires to take into account all contributions explicitly.

Angular Spin-dependent Function Type 24 (\(M^\mathrm{00^*}\))

The angular spin-dependent symmetry function type 24 uses the spin augmentation function

\[ \begin{align} M^\mathrm{00^*}(s_i,s_j,s_k)=\left(1-\left|s_i\right|\right)+\left|s_i\right|\cdot\left(1-\left|s_j\right|\right)\cdot\left(1-\left|s_k\right|\right)\ . \end{align} \]

This spin augmentation function represents only non-magnetic interactions of the central atom with its neighbor atoms.

Angular Spin-dependent Function Type 25 (\(M^\mathrm{++}\))

The angular spin-dependent symmetry function type 25 uses the spin augmentation function

\[ \begin{align} M^\mathrm{++}(s_i,s_j,s_k)=\begin{cases}\tfrac{1}{2}\left|s_i\right|\cdot\left(\left|s_i+s_j+s_k\right|-1\right)&\hspace{-0.15cm}\begin{cases}\mathrm{for}\ s_{j}\neq0\land s_{k}\neq0\\ \mathrm{for}\ s_{j}=0\land s_{k}=0\end{cases}\\ \tfrac{1}{2}\left|s_i\right|\cdot\left|s_i+s_j+s_k\right|&\hspace{-0.15cm}\mathrm{otherwise}\end{cases}\ . \end{align} \]

This spin augmentation function represents interactions between three magnetic atoms of the same atomic spin coordinate. In addition, it describes ferromagnetic interactions between a magnetic central atom, one magnetic neighbor atom, and one non-magnetic neighbor atom.

Angular Spin-dependent Function Type 26 (\(M^\mathrm{--}\))

The angular spin-dependent symmetry function type 26 uses the spin augmentation function

\[ \begin{align} M^\mathrm{--}(s_i,s_j,s_k)=\begin{cases}\tfrac{1}{2}\left|s_i\right|\cdot\left(\left|s_i-s_j-s_k\right|-1\right)&\hspace{-0.15cm}\begin{cases}\mathrm{for}\ s_{j}\neq0\land s_{k}\neq0\\ \mathrm{for}\ s_{j}=0\land s_{k}=0\end{cases}\\ \tfrac{1}{2}\left|s_i\right|\cdot\left|s_i-s_j-s_k\right|&\hspace{-0.15cm}\mathrm{otherwise}\end{cases}\ . \end{align} \]

This spin augmentation function represents interactions between three magnetic atoms, whereby the atomic spin coordinate of the central atom is different to those of the neighbor atoms. In addition, it describes antiferromagnetic interactions between a magnetic central atom, one magnetic neighbor atom, and one non-magnetic neighbor atom.

Angular Spin-dependent Function Type 27 (\(M^\mathrm{+-}\))

The angular spin-dependent symmetry function type 27 uses the spin augmentation function

\[ \begin{align} M^\mathrm{+-}(s_i,s_j,s_k)=\left|s_is_js_k\right|\cdot\left(\left|s_i+s_j-s_k\right|-1\right)\ . \end{align} \]

This spin augmentation function represents interactions between three magnetic atoms, whereby the two neighbor atoms exhibit different atomic spin coordinates.

Angular Spin-dependent Function Type 28 (\(M^\mathrm{2++}\))

The angular spin-dependent symmetry function type 28 uses the spin augmentation function

\[ \begin{align} M^\mathrm{2++}(s_i,s_j,s_k)=\tfrac{1}{2}\left|s_i\right|\cdot\left(1-\left|s_js_k\right|\right)\cdot\left(\left|s_j\right|+\left|s_k\right|\right)\cdot\left|s_i+s_j+s_k\right|\ . \end{align} \]

This spin augmentation function represents ferromagnetic interactions between a magnetic central atom, one magnetic neighbor atom, and one non-magnetic neighbor atom.

Angular Spin-dependent Function Type 29 (\(M^\mathrm{3++}\))

The angular spin-dependent symmetry function type 29 uses the spin augmentation function

\[ \begin{align} M^\mathrm{3++}(s_i,s_j,s_k)=\tfrac{1}{2}\left|s_is_js_k\right|\cdot\left(\left|s_i+s_j+s_k\right|-1\right)\ . \end{align} \]

This spin augmentation function represents interactions between three atoms of the same atomic spin coordinate.

Angular Spin-dependent Function Type 30 (\(M^\mathrm{2--}\))

The angular spin-dependent symmetry function type 30 uses the spin augmentation function

\[ \begin{align} M^\mathrm{2--}(s_i,s_j,s_k)=\tfrac{1}{2}\left|s_i\right|\cdot\left(1-\left|s_js_k\right|\right)\cdot\left(\left|s_j\right|+\left|s_k\right|\right)\cdot\left|s_i-s_j-s_k\right|\ . \end{align} \]

This spin augmentation function represents antiferromagnetic interactions between a magnetic central atom, one magnetic neighbor atom, and one non-magnetic neighbor atom.

Angular Spin-dependent Function Type 31 (\(M^\mathrm{3--}\))

The angular spin-dependent symmetry function type 31 uses the spin augmentation function

\[ \begin{align} M^\mathrm{3--}(s_i,s_j,s_k)=\tfrac{1}{2}\left|s_is_js_k\right|\cdot\left(\left|s_i-s_j-s_k\right|-1\right)\ . \end{align} \]

This spin augmentation function represents interactions between three magnetic atoms, whereby the atomic spin coordinate of the central atom is different to those of the neighbor atoms.

Weighted Angular Function Type 33 (weighted)

\[ \begin{align} G^{33}_{i} &=\frac{2^{1-\zeta}}{H_{max,i}^{\mathrm{ang}}}\sum_{j}\sum_kH_{ijk}^{\mathrm{ang}}\left[ \left(1+\lambda \cdot\cos{\theta_{ijk}}\right)^{\zeta} \cdot e^{-\eta\left(R_{ij}^2+R_{ik}^2+R_{jk}^2\right)}\right. \notag \\ & \cdot \left.f_{\mathrm{c}}\left(R_{ij}\right) \cdot f_{\mathrm{c}}\left(R_{ik}\right) \cdot f_{\mathrm{c}}\left(R_{jk}\right)\right] \end{align} \]

where

\[ \begin{align} H_{i,jk}^{\mathrm{ang}}=\left|H_{ij}^{\mathrm{rad}}+\gamma_i \,H_{ik}^{\mathrm{rad}}\right|+C_i \end{align} \]

with \(\gamma_i = ± 1\) and \(H_{ij}^{\mathrm{rad}}\) from weighted radial function 32 and

\[ \begin{align} C_i = \begin{cases} 0, & \text{for } \gamma_i = 1 \;\lor\; H_{ij}^{\mathrm{rad}} = H_{ik}^{\mathrm{rad}} = 0, \\[1ex] 1, & \text{otherwise} \end{cases} \end{align} \]

so

\[ H_{\max,i}^{\mathrm{ang}} = \begin{cases} 2\,H_{\max,i}^{\mathrm{rad}}, & \text{if } \gamma_i = 1, \\[2mm] H_{\max,i}^{\mathrm{rad}}, & \text{otherwise.} \end{cases} \]

Technical Notes on the Implementation of the Symmetry Functions

For each symmetry function specified in the input.nn file there is one symmetry function value per atom in case of a monocomponent system. In case of a general multicomponent system also all cross-terms have to be specified. The number of cross-terms is different for the radial and the angular symmetry functions. For a radial function there is one function value for each element in the system. For an angular function all permutations have to be considered, i.e., for a three-component system with the elements A, B and C we have the angular functions describing the angles A-A-A, A-B-B, A-C-C, A-A-B=A-B-A, A-A-C=A-C-A, and A-B-C=A-C-B, where the first letter indicates the central atom of the angle. For a system containing \(N_\mathrm{elem}\) elements we have

\[ \begin{align} N_\mathrm{sym} &= N_\mathrm{elem}\cdot N_\mathrm{rad} + N_\mathrm{elem}\cdot N_\mathrm{ang} + N_\mathrm{ang}\cdot \sum_{i=1}^{N_\mathrm{elem}-1}i\\ N_\mathrm{sym} &= N_\mathrm{elem} \cdot N_\mathrm{rad} + N_\mathrm{ang}\cdot \sum_{i=1}^{N_\mathrm{elem}}i \end{align} \]

symmetry functions. In RuNNer the symmetry functions and their derivatives are stored in the 'AtomicDescriptor' object for each atom. Symmetry functions are stored in the array features(num_features), where num_features specifies \(N_\mathrm{G}\). For a given structure the functions are calculated in the subroutine calculate_features or calculate_features_first_derivative of the FeatureCalculator. The calculation of the symmetry functions is done block-wise for a chunk of structures, where chunksize is the maximum number of structures being stored in the memory at the same time. The array storing the symmetry functions for a full set of structures for forward passing is called features(max_num_features_of_central_atoms, size(central_atom_ids_on_process)) and is constructed in pack_features_allocated from the symmetry function arrays of the individual atoms.

Scaling of the Symmetry Functions

For numerical reasons it may be advantageous to scale and/or center the range of symmetry function values. This is done with the keywords scale_feature_maps and center_feature_maps.

If the symmetry functions are just scaled (scale_feature_maps=.true. and center_feature_maps=.false.) then the range of values for each symmetry function is between 0 and 1 and the values are calculated according to

\[ \begin{align} G = \frac{G-G_{\rm min}}{G_{\rm max}-G_{\rm min}} \end{align} \]

If the symmetry functions are just centered (scale_feature_maps=.false. and center_feature_maps=.true.) then the average value of the centered symmetry function values is zero.

\[ \begin{align} G=G-G_{\rm average} \end{align} \]

If the symmetry functions are centered and scaled (scale_feature_maps=.true. and center_feature_maps=.true.) then the symmetry functions are

\[ \begin{align} G=\frac{G-G_{\rm average}}{G_{\rm max}-G_{\rm min}} \end{align} \]

and there are positive and negative values (the range is not -1 to 1!)

If the symmetry functions are scaled, also the derivatives dGdxyz have to be scaled to keep the gradients consistent with the original function.

\[ \begin{align} \frac{\partial G}{\partial \alpha} = \frac{\partial G}{\partial \alpha}\cdot\frac{1}{G_{\rm max}-G_{\rm min}} \end{align} \]