Introduction
Machine-learning potentials (MLPs) are rapidly becoming the gold standard for molecular dynamics and thermodynamical sampling in materials science [1 , 2 , 3 , 4 ] . The general idea is that of performing a high-dimension fit of the potential energy surface (PES) computed with an electronic ab-initio method, for instance with density functional theory (DFT), to obtain a numerical atomic energy functional for large-scale simulations. In particular, one aims at using a conveniently limited number of electronic structure data to interpolate the potential energy surface at an accuracy comparable with that of the electronic method itself. MLPs can thus be defined as parametric functions that associate to a given chemical structure the system energy. The mathematical relation between the input features describing a structure, often called descriptors , and the output target can be either linear [5 ] [6, 7] or non linear [8–10]. Furthermore, the target quantity may be different from the energy and may include electronic properties [11–14], or even tensorial quantities [15].
The specific descriptors choice is crucial to the construction of a MLP. It is commonly agreed that a strategy to drastically reduce the size of the training set and to improve the model accuracy is that of designing descriptors invariant with respect to the symmetries of the target quantity. In the case of the total energy, this results in descriptors, which are invariant for translations, rotations and permutations of identical atoms. In principle, one can then combine any choice of descriptors with any desired machine-learning model, going from simple regressions, to neural networks of various complexity, to kernel-based schemes. Typically, there is a subtle tradeoff between the model complexity, the descriptor type and the size and composition of the dataset needed to construct the MLP. Complex many-body descriptors [16] are usually combined with linear models, while simpler structure representations are used as input to deep-learning algorithms. In both cases, there may be issues of interpretability, namely it is not always transparent what is the level of physics learned by the model itself. As a consequence one often relies on numerical techniques to establish whether a particular atomic configuration is interpolated or extrapolated by the model [17].
In this work we introduce a novel linear model built over a set of descriptors derived from the energy cluster expansion. Our MLP, that we name the Jacobi-Legendre Potential (JLP), is close in spirit to the recently introduced Atomic Cluster Expansion (ACE) [5 ] [18]. In fact, given the completeness of the ACE [19], one can establish a one-to-one mapping between the two potentials. Importantly, our JLPs adopt internal coordinates, so that they are, in essence, expansions of the N N N -body potentials in orthogonal polynomials evaluated on distances and angles between atoms. As such, the JLPs are not affected by issues concerning the invariant coupling of different angular momenta channels [20, 21]. Our use of the internal coordinates is closer to the recently developed Proper Orthogonal Descriptors (PODs) [22, 23]. Here, however, we retain the spherical harmonics formalism by mean of the Legendre polynomials, so that a comparison between the JLPs and the other well-known potentials can be naturally drawn. Our scheme also makes extensive use of Jacobi polynomials, of which the Legendre ones are a particular case.
One of the most important property of MLPs is the achievement of linear scaling with respect to the number of atoms in the neighborhood of a chosen one. Here, we will show that linear scaling can be achieved for the JLPs too and, in doing so, we will establish a link between well-known MLPs and the internal coordinate representation used here.
The use of an explicit expansion over orthogonal and complete polynomials gives several advantages, such as the enforcement of symmetries and local constraints. Indeed, our potentials are constructed so that key properties, such the smooth vanishing contribution at the cut-off radius, arise naturally without the need of introducing ad-hoc cut-off functions. In fact, these properties are enforced by applying constrains on the expansion coefficients. Crucially, the procedure here presented is completely general, so that not only the number of coefficients to learn can be substantially reduced, but also the physical knowledge of the PESs can be introduced, in a natural way.
For instance, a desired feature arising from the choice of the Jacobi polynomials and of the constraining procedure, is that, by appropriately tuning the hyperparameters, a repulsive behaviour naturally emerges for the potential at small distances. This is also obtained without introducing any external repulsive function. Moreover, while it is not generally possible to completely separate the body-order contributions, we formally avoid any mixing between them. This allows us to reconstruct the N N N -body functional dependence in terms of the learned coefficients. As a consequence, by combining these two properties, one can introduce an inductive-bias in the models by selecting, for example, only the hyper-parameters that lead to a repulsive short-range behaviour of the two-body interaction. Since small distances are usually absent from the training set, a direct consequence is that the potentials naturally possess a physically meaningful behaviour in this extrapolated regime.
The paper is organized as follows. An extensive Methods section presents in detail each body-order of the expansion, with a discussion on the relevant properties of each term. Then, the potential is fitted to the carbon dataset used to train the GAP17 potential of Reference [24]. The result of the fit on energies, forces and stress are reported. Furthermore, we will close this case study by presenting the phonon dispersion curves for graphene and diamond predicted by the trained JLP model.
Methods
In this section, we introduce the JLPs. This class of potentials is based on the total energy cluster (many-body) expansion. Therefore, after a discussion of the main idea behind such strategy, we will proceed with the systematic introduction of each many-body term and their associated technical details. Note that a similar strategy can be also used to construct JLP-like model for quantities different from the energy, such as the charge density at a particular point in space [25]
Introduction
An overview of the strategy behind the construction of the JLPs is provided in Fig. 1. In general, it is reasonable to assume that a system total energy, E E E , can be partitioned into a short- and a long-range contribution. Our proposed MLP accounts only for short-ranged part, E s h o r t E_{\mathrm{short}} E short , that can be further expanded over terms vanishing at distances larger than a characteristic interaction range. In particular we follow the well-known strategy of a multi-body expansion for the energy and write
E s h o r t = E 1 + E 2 + E 3 + E 4 … (1) E_{\mathrm{short}} = E_1 + E_2 + E_3 + E_4 \ldots \tag*{(1)} E short = E 1 + E 2 + E 3 + E 4 … (1)
Here the single-body contribution, E 1 E_1 E 1 , is an energy offset depending on the number of atomic species present in the system, E 2 E_2 E 2 is the two-body (2B) energy, depending only on atoms pairs, E 3 E_3 E 3 is the three-body (3B) energy depending on triplets of atoms and, in general, E n E_n E n describes the n n n -body (n n n B) energy term.
A second essential assumption is that we can decompose each of the n n n B energy term in local quantities, such that each term can be written as a sum of atom-centered contributions. Explicitly, this writes
E n = ∑ i a t o m s ε i ( n ) , (2) E_n = \sum_i^{\mathrm{atoms}} \varepsilon_i^{(n)}, \tag*{(2)} E n = i ∑ atoms ε i ( n ) , (2)
with n ≥ 2 n \ge2 n ≥ 2 , and where the sum runs over all possible atoms in the system. Each local contribution, ε i ( n ) \varepsilon_i^{(n)} ε i ( n ) , depends only on the local neighborhood of the i i i -th atom (the red atom in Fig. 1), up to a cut-off distance r c u t r_{\mathrm{cut}} r cut .
In essence, the JLPs consist of a linear expansion of the ε i ( n ) \varepsilon_i^{(n)} ε i ( n ) contributions. As such, at the core, the JLP is closely related to linear MLPs such as the Spectral Neighbour Analysis Potential (SNAP)[6], the Moment Tensor Potentials (MTPs) [7], and the Atomic Cluster Expansion (ACE) [5 ] [18]. Since the successful generalization of the coupling scheme of the powerspectrum (a 3B representation) and the bispectrum (a 4B representation) [20, 21] to any higher-body order, first introduced in the ACE potentials, all new potentials build from the same set of assumptions (many-body expansion of the energy and locality), differ in the way of constructing the basis functions, or on the introduction of completely new basis sets [1 , 2 ] . The JLPs are not different in this regards. Based on a particular choice of basis functions (radial and angular), they are also complete, so that a one-to-one mapping between the terms of a JLP and the analogous ones of the ACE is possible. In particular, as the name suggests, we chose the Jacobi polynomials as radial basis and the Legendre polynomials as the angular one.
The choice of Jacobi polynomials [26], P n ( α , β ) ( x ) P_n^{(\alpha,\beta)}(x) P n ( α , β ) ( x ) , is motivated by their dependence on the two real parameters, α \alpha α and β \beta β , which can lead to a broad selection of different orthogonal polynomials. Two classical examples are the Legendre polynomials (α = β = 0 \alpha= \beta= 0 α = β = 0 ) and the Chebyshev polynomials of the second kind (α = β = 1 / 2 \alpha= \beta= 1/2 α = β = 1/2 ). Thus, treating α \alpha α and β \beta β as hyper-parameters allows one to optimize the radial basis set, and removes the need for manually choosing the best basis. In contrast, we have chosen the Legendre polynomials not only since they lead to a certain homogeneity in the representation (being the Legendre polynomials a particular instance of the Jacobi ones), but also for their strong relation with the spherical harmonics. This means that a spherical harmonics decomposition can always be performed, a key feature for achieving computational-linear scaling with respect to the number of atoms (neighbours) inside the interaction cut-off sphere.
Figure 1. The workflow of the linear model presented in this work. We first decompose the total energy over the terms of a local multi-body expansion, as in Eq. (1). Each contribution is then further expanded over atomic contributions [Eq. (2)], ε i ( n ) \varepsilon_i^{(n)} ε i ( n ) , which depend on the distances and the angles between a central atom (in red) and atoms in its neighborhood (in black). For instance, the two-body term consists only of one distance, the three-body one of two distances and one angle, etc. By assuming short-range interaction, the distances are then mapped onto the interval [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] , so that each distance-dependent term can be expanded as products of Jacobi polynomials. The angles are then mapped onto scalar products, so that the functional dependence on the angles can be similarly expanded in terms of Legendre polynomials. Crucially, the expansions on the distances is locally constrained, so that effective polynomials will be employed in place of the Jacobi polynomials.
After performing the expansion over the chosen basis, we will present a general way for constraining the expansion coefficients, so that known physical (and local) properties of the system can be encoded directly in the descriptors at any body order. As a bi-product of applying the constrain on Jacobi polynomials, we will show the natural emergence of the widely-used cut-off function, f c = ( 1 − cos ( x ) ) / 2 f_c = (1-\cos(x))/2 f c = ( 1 − cos ( x )) /2 . As far as we know, this is the only case in which a cut-off function, f c f_c f c , is not externally imposed on the basis set, but instead emerges naturally from the formalism.
Finally, since it has been proved that all four-body descriptors mentioned before are not complete, in the sense that one could find two distinct local environments with the same set of descriptors [27], or manifold with slow-varying fingerprints with respect to a similarity measure [28, 29], we will explicitly investigate the JLP up to the five-body order term, E 5 E_5 E 5 . We will then briefly discuss that the internal coordinates constitute an over-complete set at the five-body level, so that the coupling introduced in ACE is preferred to the one presented here. However, we anticipate that the choice of the Jacobi polynomial as a basis set, and the associated constraining procedure, can be applied also to other potentials. Indeed, they can be exported easily to other multi-body expansion approaches, so that, for example, one could use the constrained-Jacobi basis as a radial basis for ACE.
Figure 2. First five Jacobi polynomials, P n ( α , β ) P_n^{(\alpha,\beta)} P n ( α , β ) , with α = β = 1 \alpha= \beta= 1 α = β = 1 . In the plot the functions are composed with a cosine, so to give a better idea of the representation used in the expansion of Eq. (8). It can be appreciated how the derivative is zero at both edges of the domain.
The Two-Body Term
In this section we introduce the expansion of the two-body energy term, E 2 E_2 E 2 . Since the total energy is a scalar, it must be invariant under translations and rotations of the reference frame. A possible way to satisfy such invariance is to assume that the energy depends only on the distances between atom pairs, and that this dependency is realized by a continuous function (potential), v ( 2 ) v^{(2)} v ( 2 ) . Furthermore, we assume that the actual functional form depends only on the atomic species of the atoms involved, so that, if Z i Z_i Z i is the atomic number of the atom located at the position r i \mathbf{r}_i r i , and r j i = ∣ r j − r i ∣ r_{ji} = \lvert\mathbf{r}_j - \mathbf{r}_i \rvert r j i = ∣ r j − r i ∣ , we have
v ( 2 ) ≡ v ( 2 ) ( r j i ; Z j , Z i ) ≡ v Z j Z i ( 2 ) ( r j i ) , (3) v^{(2)} \equiv v^{(2)}(r_{ji}; Z_j, Z_i) \equiv v_{Z_j Z_i}^{(2)}(r_{ji}), \tag*{(3)} v ( 2 ) ≡ v ( 2 ) ( r j i ; Z j , Z i ) ≡ v Z j Z i ( 2 ) ( r j i ) , (3)
and
E 2 = ∑ i ∑ j ≠ i v Z j Z i ( 2 ) ( r j i ) . (4) E_2 = \sum_i \sum_{j \ne i} v_{Z_j Z_i}^{(2)}(r_{ji}). \tag*{(4)} E 2 = i ∑ j = i ∑ v Z j Z i ( 2 ) ( r j i ) . (4)
The two-body potentials, v Z j Z i ( 2 ) v_{Z_j Z_i}^{(2)} v Z j Z i ( 2 ) , is thus defined symmetric under the exchange Z j ↔ Z i Z_j \leftrightarrow Z_i Z j ↔ Z i , namely v Z j Z i ( 2 ) = v Z i Z j ( 2 ) v_{Z_j Z_i}^{(2)} = v_{Z_i Z_j}^{(2)} v Z j Z i ( 2 ) = v Z i Z j ( 2 ) . Note that, in principle, one can still explicitly distinguish nonequivalent atoms belonging to the same specie, by introducing “virtual” species.
It is useful to remark that the 2B term in Eq. (4) can be re-casted in the form of Eq. (2), where ε i = ∑ j ≠ i v Z j Z i ( 2 ) ( r j i ) \varepsilon_i = \sum_{j \ne i} v_{Z_j Z_i}^{(2)}(r_{ji}) ε i = ∑ j = i v Z j Z i ( 2 ) ( r j i ) is the energy associated to the i i i -th atom resulting from the pairwise interaction with its local atomic neighbourhood. Note that that these local contributions are well defined because of the short-ranged
nature of the interaction. Thus, there exists a natural cut-off radius r c u t r_{\mathrm{cut}} r cut , such that v Z j Z i ( 2 ) ( r j i ) ≃ 0 v_{Z_j Z_i}^{(2)}(r_{ji}) \simeq0 v Z j Z i ( 2 ) ( r j i ) ≃ 0 for r j i > r c u t r_{ji} > r_{\mathrm{cut}} r j i > r cut .
We now provide the proposed expansion for the potentials v Z j Z i ( 2 ) v_{Z_j Z_i}^{(2)} v Z j Z i ( 2 ) , followed by its derivation. The expansion is
v Z j Z i ( 2 ) ( r j i ) = ∑ n = 1 n max a n Z j Z i P ~ n ( α , β ) ( cos ( π r j i − r min r c u t − r min ) ) , (5) v_{Z_j Z_i}^{(2)}(r_{ji}) = \sum_{n=1}^{n_{\max}} a_n^{Z_j Z_i} \widetilde{P}_n^{(\alpha,\beta)}\left(\cos\left(\pi\frac{r_{ji} - r_{\min}}{r_{\mathrm{cut}} - r_{\min}}\right)\right), \tag*{(5)} v Z j Z i ( 2 ) ( r j i ) = n = 1 ∑ n m a x a n Z j Z i P n ( α , β ) ( cos ( π r cut − r m i n r j i − r m i n ) ) , (5)
where the sum is truncated to a suitable polynomial order, n max n_{\max} n m a x , and where a n Z j Z i a_n^{Z_j Z_i} a n Z j Z i are the expansion coefficients for the n n n -th order. The vanishing-Jacobi polynomials, P ~ n ( α , β ) \widetilde{P}_n^{(\alpha,\beta)} P n ( α , β ) , employed here are defined in terms of the Jacobi polynomials, P n ( α , β ) P_n^{(\alpha,\beta)} P n ( α , β ) , as
P ~ n ( α , β ) ( x ) = P n ( α , β ) ( x ) − P n ( α , β ) ( − 1 ) for − 1 ≤ x ≤ 1 , (6) \widetilde{P}_n^{(\alpha,\beta)}(x) = P_n^{(\alpha,\beta)}(x) - P_n^{(\alpha,\beta)}(-1) \quad\text{for } -1 \le x \le1, \tag*{(6)} P n ( α , β ) ( x ) = P n ( α , β ) ( x ) − P n ( α , β ) ( − 1 ) for − 1 ≤ x ≤ 1 , (6)
for n ≥ 1 n \ge1 n ≥ 1 . Thus, the P ~ n ( α , β ) \widetilde{P}_n^{(\alpha,\beta)} P n ( α , β ) have the property to vanish at the right-hand side extreme of their domain, namely at r c u t r_{\mathrm{cut}} r cut . The Jacobi polynomials are shown in Fig. (2), while the corresponding vanishing-Jacobi polynomials are in Figure 3 . The expansion presents five hyper-parameters, α \alpha α , β \beta β , r c u t r_{\mathrm{cut}} r cut , r min r_{\min} r m i n and n max n_{\max} n m a x , with α \alpha α and β \beta β being real numbers greater than − 1 -1 − 1 . We will refer to Eq. (5) as the 2B-Jacobi-Legendre (2B-JL) expansion.
Figure 3. First five vanishing-Jacobi polynomials, P ~ n ( α , β ) \widetilde{P}_n^{(\alpha,\beta)} P n ( α , β ) (α = β = 1 \alpha= \beta= 1 α = β = 1 ) as defined in Eq. (6), derived from the Jacobi polynomials of Fig. 2. These polynomials are constrained to vanish at the right-hand side edge of the domain.
At this point, it should be noted that there can be a different set of hyper-parameters for each different atomic species. As such, in the case of many-species compounds the hyper-parameter space can potentially become rather large. Then, it may be desirable to take system-based approximations or to perform features selection.
We will now present the arguments leading to Eq. (5). In order to make the formalism more readable, we define the compact notation
P ~ n j i ( α , β ) ≡ P ~ n ( α , β ) ( cos ( π r j i − r min r c u t − r min ) ) (7) \widetilde{P}_{nji}^{(\alpha,\beta)} \equiv\widetilde{P}_{n}^{(\alpha,\beta)}\left(\cos\left(\pi\frac{r_{ji}-r_{\min}}{r_{\mathrm{cut}}-r_{\min}}\right)\right) \tag*{(7)} P nj i ( α , β ) ≡ P n ( α , β ) ( cos ( π r cut − r m i n r j i − r m i n ) ) (7)
which will be widely used throughout this work. As already remarked, the potentials should vanish for distances larger than the interaction cut-off radius. With only this constrain in mind, we can expand the potential in terms of Jacobi polynomials as
v ( 2 ) ( r ) = ∑ n = 0 n max a n P n ( α , β ) ( cos ( π r / r c u t ) ) (8) v^{(2)}(r)=\sum_{n=0}^{n_{\max}}a_nP_n^{(\alpha,\beta)}\left(\cos\left(\pi r/r_{\mathrm{cut}}\right)\right) \tag*{(8)} v ( 2 ) ( r ) = n = 0 ∑ n m a x a n P n ( α , β ) ( cos ( π r / r cut ) ) (8)
where, for simplicity, we set r min = 0 r_{\min}=0 r m i n = 0 and omit the explicit dependence on the atomic species.
We have chosen the Jacobi polynomials, P n ( α , β ) ( x ) P_n^{(\alpha,\beta)}(x) P n ( α , β ) ( x ) , since they are complete and orthogonal over the interval x ∈ [ − 1 , 1 ] x\in[-1,1] x ∈ [ − 1 , 1 ] . Furthermore, as already noted, their generality, parameterised through the real coefficients α \alpha α and β \beta β , allows one to perform automatic searches of the most efficient basis set, without any additional hypothesis. We found that, in most cases, there is a large range of optimal α \alpha α and β \beta β values, so that we usually reduce the number of hyper-parameters by constraining the search to α = β \alpha=\beta α = β .
Note that we are not introducing any cut-off function in the expansion to force a smooth-vanishing behaviour at the cut-off radius. Also, the a 0 a_0 a 0 coefficient is not present in the sum of Eq. (5), while still appears in Eq. (8). We will now impose the right behaviour on the expansion coefficients, so that the resulting potential vanishes by construction at the cut-off radius. The result of this approach is similar, in a sense, to models with naturally vanishing radial functions, such as the Spherical-Bessel descriptors [30]. Explicitly, we constrain the expression in Eq. (8) to satisfy the condition v ( 2 ) ( r c u t ) = 0 v^{(2)}(r_{\mathrm{cut}})=0 v ( 2 ) ( r cut ) = 0 . Then, since P 0 ( α , β ) = 1 P_0^{(\alpha,\beta)}=1 P 0 ( α , β ) = 1 , we obtain that the first coefficient must satisfy
a 0 = − ∑ n ≥ 1 n max a n P n ( α , β ) ( − 1 ) . (9) a_0=-\sum_{n\geq1}^{n_{\max}}a_nP_n^{(\alpha,\beta)}(-1). \tag*{(9)} a 0 = − n ≥ 1 ∑ n m a x a n P n ( α , β ) ( − 1 ) . (9)
By inserting this expression back into Eq. (8), we finally obtain Eq. (5). It is worth mentioning that this procedure can be easily generalized to impose any constrain to the functional form of the potential, so that local physical knowledge of the system can be enforced in the description itself. An example of a further constrain will be shown for higher-body terms.
We can then interpret the vanishing Jacobi polynomials, defined in Eq. (6), as the radial basis obtained when expanding functions vanishing at the left-hand side limit of the interval [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] (the point x = − 1 x=-1 x = − 1 is mapped onto the cut-off distance in our representation). As a final remark, the expansion coefficients a n Z j Z i a_n^{Z_jZ_i} a n Z j Z i inherit the same symmetry properties of the potential, namely they
are symmetric under the exchange of the atomic species, a n Z j Z i = a n Z i Z j a_n^{Z_jZ_i}=a_n^{Z_iZ_j} a n Z j Z i = a n Z i Z j .
In closing this section, it must be mentioned that the 2B-JL expansion suffers from the same scaling problem of most of the established MLPs when dealing with multiple species. In fact, the number of pair-wise potentials that one can define scales quadratically with the number of species, so that system-based approximations are required for complex chemical compositions. This problem will become more severe for the higher-body terms.
Emergence of the cut-off function from the constrains
A relevant property of the 2B-JL expansion is that, as rigorously proved in Appendix A, we can factorize the vanishing Jacobi polynomials as
P ~ n ( α , β ) ( cos x ) = f c ( x ) Q n ( α , β ) ( cos ( x ) ) , (10) \widetilde{P}_n^{(\alpha,\beta)}(\cos x)=f_c(x)Q_n^{(\alpha,\beta)}(\cos(x)), \tag*{(10)} P n ( α , β ) ( cos x ) = f c ( x ) Q n ( α , β ) ( cos ( x )) , (10)
where f c ( x ) f_c(x) f c ( x ) is the well-know cut-off function f c ( x ) = ( 1 + cos ( x ) ) / 2 f_c(x)=(1+\cos(x))/2 f c ( x ) = ( 1 + cos ( x )) /2 , first introduced in reference [31], and the Q n ( α , β ) ( cos ( x ) ) Q_n^{(\alpha,\beta)}(\cos(x)) Q n ( α , β ) ( cos ( x )) are functions explicitly defined in Appendix A. As far as we know, the functions Q n ( α , β ) Q_n^{(\alpha,\beta)} Q n ( α , β ) are not equivalent to other functions already used in the MLPs literature. While the property described by Eq. (10) establishes a strong connection between our expansion and other potentials, which use the cut-off function, it is important to stress that with the JLPs f c f_c f c arises naturally from the choice of the radial basis and the constraining method implemented. As such, it is not an embedding function, as one can clearly see in Figure 3 . Among the advantages of this approach there is that, since the Jacobi polynomials are already complete and orthogonal, no further orthogonalization procedure has to take place. Also, we do not have to explicitly evaluate the derivative of the cut-off function when calculating the forces, since we can simply use the derivative of the (vanishing-) Jacobi polynomials. Finally, by imposing the constrain of Eq. (9), we are reducing the number of coefficients to learn; this is particularly relevant for higher-body terms, as it will be shown in the following sections.
The Three-Body Term
In this section we will discuss the linear expansion of the three-body energy term, E 3 E_3 E 3 . While the core strategy is the same as the one employed in the previous section, for E 3 E_3 E 3 here we will introduce a Legendre expansion for the angular dependence of the cluster, we will impose a further constrain on the Jacobi polynomials and we will discuss the role of symmetries when considering atoms of the same species.
Following the same approach introduced in the previous section, we assume that E 3 E_3 E 3 can be written as a sum of local 3B potentials, v ( 3 ) v^{(3)} v ( 3 ) , as
E 3 = ∑ i atoms ∑ ( j , k ) i v Z j Z k Z i ( 3 ) ( r j i , r k i , r ^ j i ⋅ r ^ k i ) , (11) E_{3}=\sum_{i}^{\text{atoms}}\sum_{(j,k)_{i}}v_{Z_{j}Z_{k}Z_{i}}^{(3)}(r_{ji},r_{ki},\hat{\mathbf{r}}_{ji}\cdot\hat{\mathbf{r}}_{ki}), \tag*{(11)} E 3 = i ∑ atoms ( j , k ) i ∑ v Z j Z k Z i ( 3 ) ( r j i , r k i , r ^ j i ⋅ r ^ k i ) , (11)
where the first sum runs over all the atoms in the system and the second one runs over all the atoms pairs in the neighbourhood (within r c u t r_{\mathrm{cut}} r cut ) of the i i i -th atom (the red atom in Fig. 1). Here, in order to ensure the translational and rotational invariance of the descriptors, we consider only internal coordinates between the central atom i i i and the atoms j j j and k k k in the surroundings. Therefore, only the distances r j i r_{ji} r j i and r k i r_{ki} r k i and the scalar products r ^ j i ⋅ r ^ k i \hat{\mathbf{r}}_{ji}\cdot\hat{\mathbf{r}}_{ki} r ^ j i ⋅ r ^ k i (essentially the angle defining a three-body cluster), are taken into consideration.
The functional form of the potential v Z j Z k Z i ( 3 ) v_{Z_{j}Z_{k}Z_{i}}^{(3)} v Z j Z k Z i ( 3 ) depends on the ordering of the atomic species numbers Z j Z_{j} Z j , Z k Z_{k} Z k and Z i Z_{i} Z i . Specifically, the first atomic species refers to the first distances, the second atomic species to the second distance, while the last one refers to the central atom. Thus, it holds that
v Z k Z j Z i ( 3 ) ( r k i , r j i , s j k i ) = v Z j Z k Z i ( 3 ) ( r j i , r k i , s j k i ) , (12) v_{Z_{k}Z_{j}Z_{i}}^{(3)}(r_{ki},r_{ji},s_{jki})=v_{Z_{j}Z_{k}Z_{i}}^{(3)}(r_{ji},r_{ki},s_{jki}), \tag*{(12)} v Z k Z j Z i ( 3 ) ( r k i , r j i , s j k i ) = v Z j Z k Z i ( 3 ) ( r j i , r k i , s j k i ) , (12)
where s j k i s_{jki} s j k i is a short-hand notation for r ^ j i ⋅ r ^ k i \hat{\mathbf{r}}_{ji}\cdot\hat{\mathbf{r}}_{ki} r ^ j i ⋅ r ^ k i . Put it in words, if we exchange the species of the atoms in the environment, we will also have to exchange their distances. From now on, we will use v j k i ( 3 ) v_{jki}^{(3)} v j k i ( 3 ) as a shorthand notation for v Z j Z k Z i ( 3 ) v_{Z_{j}Z_{k}Z_{i}}^{(3)} v Z j Z k Z i ( 3 ) .
By adopting the same workflow followed in constructing the 2B case, we now give an expression for the 3B JL expansion, and then we provide its derivation. The 3B-JL expansion reads
v j k i ( 3 ) ( r j i , r k i , s j k i ) = ∑ n 1 , n 2 = 2 n max ∑ l = 0 l max a n 1 n 2 l j k i P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) P l j k i , (13) v_{jki}^{(3)}(r_{ji},r_{ki},s_{jki})=\sum_{n_{1},n_{2}=2}^{n_{\max}}\sum_{l=0}^{l_{\max}}a_{n_{1}n_{2}l}^{jki}\overline{P}_{n_{1}ji}^{(\alpha,\beta)}\overline{P}_{n_{2}ki}^{(\alpha,\beta)}P_{l}^{jki}, \tag*{(13)} v j k i ( 3 ) ( r j i , r k i , s j k i ) = n 1 , n 2 = 2 ∑ n m a x l = 0 ∑ l m a x a n 1 n 2 l j k i P n 1 j i ( α , β ) P n 2 k i ( α , β ) P l j k i , (13)
where P l j k i = P l ( s j k i ) P_{l}^{jki}=P_{l}(s_{jki}) P l j k i = P l ( s j k i ) is the Legendre Polynomial, P l P_{l} P l , evaluated on the scalar product s j k i s_{jki} s j k i . The sum runs on all the n 1 n_{1} n 1 and n 2 n_{2} n 2 in the interval [ 2 , n max ] [2,n_{\max}] [ 2 , n m a x ] . The 3B expansion introduces a new hyperparameter, l max l_{\max} l m a x , which sets the level of truncation of the angular expansion. The coefficients a n 1 n 2 l j k i a_{n_{1}n_{2}l}^{jki} a n 1 n 2 l j k i have to be intended as a compact form for a n 1 n 2 l Z j Z k Z i a_{n_{1}n_{2}l}^{Z_{j}Z_{k}Z_{i}} a n 1 n 2 l Z j Z k Z i . Crucially, we use here the double-vanishing Jacobi polynomials, P ‾ n ( α , β ) ( x ) \overline{P}_{n}^{(\alpha,\beta)}(x) P n ( α , β ) ( x ) , which can be defined in terms of the vanishing ones (see Figure 4 )
Figure 4. The first five double-vanishing Jacobi polynomials, P ‾ n ( α , β ) \overline{P}_{n}^{(\alpha,\beta)} P n ( α , β ) (here plotted for α = β = 1 \alpha=\beta=1 α = β = 1 ) as defined in Eq. (13) derived from the vanishing ones shown in Figure 3 . The polynomials are constrained to vanish at both edges of the domain.
P ‾ n ( α , β ) ( x ) = P ~ n ( α , β ) ( x ) − P ~ n ( α , β ) ( 1 ) P ~ 1 ( α , β ) ( 1 ) P ~ 1 ( α , β ) ( x ) , (14) \overline{P}_{n}^{(\alpha,\beta)}(x)=\widetilde{P}_{n}^{(\alpha,\beta)}(x)-\frac{\widetilde{P}_{n}^{(\alpha,\beta)}(1)}{\widetilde{P}_{1}^{(\alpha,\beta)}(1)}\widetilde{P}_{1}^{(\alpha,\beta)}(x), \tag*{(14)} P n ( α , β ) ( x ) = P n ( α , β ) ( x ) − P 1 ( α , β ) ( 1 ) P n ( α , β ) ( 1 ) P 1 ( α , β ) ( x ) , (14)
for n ≥ 2 n\ge2 n ≥ 2 . From this definition it can be seen that the double-vanishing polynomials not only vanish smoothly at the cut-off distance (x = − 1 x=-1 x = − 1 ) but also for small distances (x = 1 x=1 x = 1 ). By employing these polynomials, the repulsive behaviour at short distances is not influenced by the 3B-JL expansion and, as such, is completely determined by the 2B expansion. Note that these polynomials has been devised for the case in which r min r_{\min} r m i n is small. If this hypothesis does not hold, we suggest a case-by-case investigation of the most appropriate polynomials or constraints to use.
The derivation of the expansion in Eq. (13) follows the same strategy presented in detail for the derivation of the 2B-JL expansion, Eq. (5). Since the distances and the scalar product are independent variables, we expand the functional dependence of the potential on the distances in terms of a product of two Jacobi polynomials, one for each distance. Then, the scalar product dependence is expanded in terms of Legendre polynomials. Analogously to the constraint adopted in the 2B case, we constrain the expansion to vanish at the cut-off radius. Here, however, we impose the potential to vanish when at least one of the distances approaches the cut-off, independently of the value of the other distance or of the angular part. Crucially, applying independent constrains on the variables at play, allows us to severely reduce the number of free coefficients, when compared to the 2B case. Indeed, the constrains explicitly read [please, compare with the constrain introduced in Eq. (9)]
{ a 0 n 2 l = − ∑ n 1 ≥ 1 n max a n 1 n 2 l P n 1 ( α , β ) ( − 1 ) for all n 2 , l , a n 1 0 l = − ∑ n 2 ≥ 1 n max a n 1 n 2 l P n 2 ( α , β ) ( − 1 ) for all n 1 , l , \begin{cases}
a_{0n_{2}l}=-\sum_{n_{1}\ge1}^{n_{\max}}a_{n_{1}n_{2}l}P_{n_{1}}^{(\alpha,\beta)}(-1) & \text{for all }n_{2},l,\\
a_{n_{1}0l}=-\sum_{n_{2}\ge1}^{n_{\max}}a_{n_{1}n_{2}l}P_{n_{2}}^{(\alpha,\beta)}(-1) & \text{for all }n_{1},l,
\end{cases} { a 0 n 2 l = − ∑ n 1 ≥ 1 n m a x a n 1 n 2 l P n 1 ( α , β ) ( − 1 ) a n 1 0 l = − ∑ n 2 ≥ 1 n m a x a n 1 n 2 l P n 2 ( α , β ) ( − 1 ) for all n 2 , l , for all n 1 , l ,
so that the expression can be re-casted in terms of products of vanishing Jacobi polynomials and Legendre polynomials only. However, we can further constrain the number of free coefficients by imposing that the potentials also vanish when at least one of the distances approaches zero. In this way we impose a condition also on the a 1 n 2 l j k i a^{jki}_{1n_2l} a 1 n 2 l j k i and a n 1 1 l j k i a^{jki}_{n_11l} a n 1 1 l j k i coefficients. In doing so, we obtain the double-vanishing polynomials and the 3B-JL expansion of Eq. (13). Note that in the unconstrained case we have ( n max + 1 ) 2 ( l max + 1 ) (n_{\max}+1)^2(l_{\max}+1) ( n m a x + 1 ) 2 ( l m a x + 1 ) free coefficients, while in the double-constrained one these are only ( n max − 1 ) 2 ( l max + 1 ) (n_{\max}-1)^2(l_{\max}+1) ( n m a x − 1 ) 2 ( l m a x + 1 ) . As such, we deduce that the reduction in the number of coefficients is quite severe for relatively low n max n_{\max} n m a x . Another relevant reduction in the number of free parameters is induced through the symmetries of the coefficients, when atoms of the same species are taken into account, as explained in detail in the following section.
Symmetries of the coefficients
We can explicitly read the role of the indexes in the expansion coefficients a n 1 n 2 l j k i a^{jki}_{n_1n_2l} a n 1 n 2 l j k i of Eq. (13), by noticing that the first index, n 1 n_1 n 1 , refers to the expansion on the first argument of the potential v j k i ( 3 ) v^{(3)}_{jki} v j k i ( 3 ) (the distance between the atoms j j j and i i i ), while the second one expands the second distance. Thus, the symmetry property of the potentials described by Eq. (12) directly implies that a n 1 n 2 l j k i = a n 2 n 1 l k j i a^{jki}_{n_1n_2l}=a^{kji}_{n_2n_1l} a n 1 n 2 l j k i = a n 2 n 1 l k j i , namely that the expansion coefficients are symmetric for simultaneous exchange of the species indexes Z j ↔ Z k Z_j \leftrightarrow Z_k Z j ↔ Z k and of the Jacobi indexes, n 1 ↔ n 2 n_1 \leftrightarrow n_2 n 1 ↔ n 2 . While this is effectively just a reordering of the arguments of the potential, with appropriate re-labelling, it becomes relevant in the case of identical atoms. Indeed, if the atoms j j j and k k k belong to the same atomic species Z Z Z , then they are indistinguishable, making the potential invariant under the exchange of the first and the second argument (the two distances). Then, one needs to enforce the same symmetry on the coefficients, namely they must be symmetric under Jacobi-index exchange alone, a n 1 n 2 l Z Z i = a n 2 n 1 l Z Z i a^{ZZi}_{n_1n_2l}=a^{ZZi}_{n_2n_1l} a n 1 n 2 l Z Z i = a n 2 n 1 l Z Z i .
We can then re-cast the 3B-JL expansion for the same atom species, Z j = Z k = Z Z_j=Z_k=Z Z j = Z k = Z , as
v Z Z Z i ( 3 ) ( r j i , r k i , s j k i ) = ∑ n 1 = 2 n max ∑ l = 0 l max a n 1 n 1 l Z Z Z i P ‾ n 1 j i ( α , β ) P ‾ n 1 k i ( α , β ) P l j k i + ∑ n 1 = 2 n 1 > n 2 n max ∑ n 2 = 2 n max ∑ l = 0 l max a n 1 n 2 l Z j Z k i [ P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) + P ‾ n 2 j i ( α , β ) P ‾ n 1 k i ( α , β ) ] P l j k i . (15) \begin{aligned}
v^{(3)}_{ZZZi}(r_{ji},r_{ki},s_{jki})={}& \sum_{n_1=2}^{n_{\max}}\sum_{l=0}^{l_{\max}}a^{ZZZi}_{n_1n_1l}\overline{P}^{(\alpha,\beta)}_{n_1ji}\overline{P}^{(\alpha,\beta)}_{n_1ki}P^{jki}_l \\
&+\sum_{\substack{n_1=2\\n_1>n_2}}^{n_{\max}}\sum_{n_2=2}^{n_{\max}}\sum_{l=0}^{l_{\max}}a^{ZjZki}_{n_1n_2l}\left[\overline{P}^{(\alpha,\beta)}_{n_1ji}\overline{P}^{(\alpha,\beta)}_{n_2ki}+\overline{P}^{(\alpha,\beta)}_{n_2ji}\overline{P}^{(\alpha,\beta)}_{n_1ki}\right]P^{jki}_l . \tag*{(15)}
\end{aligned} v Z Z Z i ( 3 ) ( r j i , r k i , s j k i ) = n 1 = 2 ∑ n m a x l = 0 ∑ l m a x a n 1 n 1 l Z Z Z i P n 1 j i ( α , β ) P n 1 k i ( α , β ) P l j k i + n 1 = 2 n 1 > n 2 ∑ n m a x n 2 = 2 ∑ n m a x l = 0 ∑ l m a x a n 1 n 2 l Z j Z k i [ P n 1 j i ( α , β ) P n 2 k i ( α , β ) + P n 2 j i ( α , β ) P n 1 k i ( α , β ) ] P l j k i . (15)
(60) explicitly shows the application of the symmetries for n 1 ≠ n 2 n_1\ne n_2 n 1 = n 2 . Now, we can introduce the more practical expression
v Z j Z k Z i ( 3 ) ( r j i , r k i , s j k i ) = ∑ n 1 n 2 l u n i q u e a n 1 n 2 l Z j Z k Z i ∑ s y m m . ( P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) P l j k i ) , (16) v^{(3)}_{ZjZkZi}(r_{ji},r_{ki},s_{jki})=\sum_{n_1n_2l}^{\mathrm{unique}}a^{ZjZkZi}_{n_1n_2l}\sum_{\mathrm{symm.}}\left(\overline{P}^{(\alpha,\beta)}_{n_1ji}\overline{P}^{(\alpha,\beta)}_{n_2ki}P^{jki}_l\right), \tag*{(16)} v Z j Z k Z i ( 3 ) ( r j i , r k i , s j k i ) = n 1 n 2 l ∑ unique a n 1 n 2 l Z j Z k Z i symm. ∑ ( P n 1 j i ( α , β ) P n 2 k i ( α , β ) P l j k i ) , (16)
which encompasses also the cases for different species and it is easily generalized to higher-body order expansion terms. Here, the first sum runs over indexes that lead to non-equivalent coefficients with respect to the symmetries of the potential (in this case, indexes such that n 1 ≥ n 2 n_1\ge n_2 n 1 ≥ n 2 ), while the second sum runs over all the permutations of indexes that refers to equivalent coefficients (in this case the exchange n 1 ↔ n 2 n_1\leftrightarrow n_2 n 1 ↔ n 2 ). If the atoms j j j and k k k belong to two different species, then the expression reduces to the simple form of Eq. (13). In contrast, if the j j j -th and k k k -th atoms are of the same species, we end up with the formula in Eq. (15). It must be noted that, not only this expression is crucial to enforce the role of identical atoms, but it also roughly halve the number of free coefficients in the expansion. Finally, we conclude by noting that, while in the case of the 3B expansion, there is no difference between the symmetrization in Eq. (16) and the lexicographic order introduced for the ACE coefficients (see Reference [32] for details), these are indeed different in the generalization to the 4B case, as will be shown in § 14 E.
Linear Scaling and the JL Atomic Basis
Before presenting the 4B-JL expansion, we discuss here the scaling of the 3B-JL expansion, with respect to the number of neighbours inside the cut-off volume. Indeed, by inserting Eq. (16) into the expression of Eq. (11) for the 3B energy, E 3 E_3 E 3 , it is clear that the computational time to evaluate the 3B-JL expansion scales quadratically with the number of neighbours surrounding a central atom. This is because one has to explicitly look around for all the possible pairs of atoms. Such scaling makes the formalism impractical, when the number of atoms inside the cut-off sphere becomes relatively large. Most of the MLPs used in literature have solved this problem by achieving linear scaling with respect to the number of neighbors. Importantly, also the 3B-JL expansion, being strictly tied to the powerspectrum components [21], can be rearranged so to reach the same scaling. In this rather technical section, we will mainly discuss the results of such “linearization”, laying down the formalism for a similar discussion in the 4B case. The formal derivation is then presented in the Supplementary Information (SI). As such, what presented here can be considered as a short review of the results obtained for other MLPs, in particular for the powerspectrum case. Crucially, we will maintain the equivalence with the “internal coordinates representation” of the 3B term, Eq. (16), so that one could freely move between the linear scaling formalism and the internal coordinates one, being the latter more advantageous for a small number of neighbours inside the cut-off volume.
We start by remarking that the choice of Legendre polynomial as an expansion basis was primarily driven by their natural decomposition in terms of a sum of products of spherical harmonics, Y l m Y_l^m Y l m , namely
P l ( r ^ 1 ⋅ r ^ 2 ) = 4 π 2 l + 1 ∑ m = − l l ( − 1 ) m Y l m ( r ^ 1 ) Y l − m ( r ^ 2 ) . (17) P_l(\hat{\mathbf{r}}_1 \cdot\hat{\mathbf{r}}_2) = \frac{4\pi}{2l+1} \sum_{m=-l}^{l} (-1)^m Y_l^m(\hat{\mathbf{r}}_1)Y_l^{-m}(\hat{\mathbf{r}}_2). \tag*{(17)} P l ( r ^ 1 ⋅ r ^ 2 ) = 2 l + 1 4 π m = − l ∑ l ( − 1 ) m Y l m ( r ^ 1 ) Y l − m ( r ^ 2 ) . (17)
By exploiting this property, and by combining Eq. (16) with Eq. (11), one can prove that the 3B local energy term, ε i ( 3 ) \varepsilon_i^{(3)} ε i ( 3 ) , (defined so that E 3 = ∑ i ε i ( 3 ) E_3 = \sum_i \varepsilon_i^{(3)} E 3 = ∑ i ε i ( 3 ) ), can be written as
ε i ( 3 ) = ∑ Z 1 ≥ Z 2 ∑ n 1 n 2 l u n i q u e b n 1 n 2 l Z 1 Z 2 Z i [ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 − S i n 1 n 2 ( 3 ) , Z 1 Z 2 ] . (18) \varepsilon_i^{(3)} = \sum_{Z_1 \ge Z_2} \sum_{n_1 n_2 l}^{\mathrm{unique}} b_{n_1 n_2 l}^{Z_1 Z_2 Z_i} \left[C_{i n_1 n_2 l}^{(3),Z_1 Z_2} - S_{i n_1 n_2}^{(3),Z_1 Z_2}\right]. \tag*{(18)} ε i ( 3 ) = Z 1 ≥ Z 2 ∑ n 1 n 2 l ∑ unique b n 1 n 2 l Z 1 Z 2 Z i [ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 − S i n 1 n 2 ( 3 ) , Z 1 Z 2 ] . (18)
where the first sum runs over the atomic species present in the system. The coefficients b n 1 n 2 l Z 1 Z 2 Z i b_{n_1 n_2 l}^{Z_1 Z_2 Z_i} b n 1 n 2 l Z 1 Z 2 Z i are simply proportional to a n 1 n 2 l Z 1 Z 2 Z i a_{n_1 n_2 l}^{Z_1 Z_2 Z_i} a n 1 n 2 l Z 1 Z 2 Z i , as shown in the SI, so that the equivalence in going from Eqs. (11)–(13) to Eq. (18), is preserved. We refer to the coefficient C i n 1 n 2 l ( 3 ) , Z 1 Z 2 C_{i n_1 n_2 l}^{(3),Z_1 Z_2} C i n 1 n 2 l ( 3 ) , Z 1 Z 2 as the coupling term, which is obtained by including, on top of proper pairs of neighbor atoms, also the degenerate terms in which the central atom is allowed to interact twice with the same atom in the environment, namely we accept the cases ( j , j ) (j,j) ( j , j ) in the sum of Eq. (11). These “self-interacting” terms, S i n 1 n 2 ( 3 ) , Z 1 Z 2 S_{i n_1 n_2}^{(3),Z_1 Z_2} S i n 1 n 2 ( 3 ) , Z 1 Z 2 , must be then removed, and so they are subtracted in Eq. (18).
Explicitly, the coupling and the self interacting term are written as
C i n 1 n 2 l ( 3 ) , Z 1 Z 2 = 4 π 2 l + 1 ∑ m = − l l ( − 1 ) m A i n 1 l m Z 1 A i n 2 l − m Z 2 , (19) C_{i n_1 n_2 l}^{(3),Z_1 Z_2} = \frac{4\pi}{2l+1} \sum_{m=-l}^{l} (-1)^m A_{i n_1 l m}^{Z_1} A_{i n_2 l-m}^{Z_2}, \tag*{(19)} C i n 1 n 2 l ( 3 ) , Z 1 Z 2 = 2 l + 1 4 π m = − l ∑ l ( − 1 ) m A i n 1 l m Z 1 A i n 2 l − m Z 2 , (19)
and
S i n 1 n 2 ( 3 ) , Z 1 Z 2 = δ Z 1 Z 2 ∑ j ∈ Z 1 P ‾ n 1 j i ( α , β ) P ‾ n 2 j i ( α , β ) , (20) S_{i n_1 n_2}^{(3),Z_1 Z_2} = \delta_{Z_1 Z_2} \sum_{j\in Z_1} \overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ji}^{(\alpha,\beta)}, \tag*{(20)} S i n 1 n 2 ( 3 ) , Z 1 Z 2 = δ Z 1 Z 2 j ∈ Z 1 ∑ P n 1 j i ( α , β ) P n 2 j i ( α , β ) , (20)
where δ Z 1 Z 2 \delta_{Z_1 Z_2} δ Z 1 Z 2 is the Kronecker-delta. Here, we have adopted a “species-wise” atomic basis from the one defined for the ACE potential (see Ref. [5 ] ), namely
A i n l m Z = ∑ j ∈ Z P ‾ n j i ( α , β ) Y l m ( r ^ j i ) , (21) A_{inlm}^{Z} = \sum_{j\in Z} \overline{P}_{nji}^{(\alpha,\beta)}Y_l^m(\hat{\mathbf{r}}_{ji}), \tag*{(21)} A in l m Z = j ∈ Z ∑ P nj i ( α , β ) Y l m ( r ^ j i ) , (21)
where the radial basis has been specialized to the double-vanishing Jacobi polynomials. Also, we note that Eq. (19) is proportional to the powerspectrum components [21], or to the analogous rotationally-invariant product B i n 1 n 2 l ( 2 ) B_{i n_1 n_2 l}^{(2)} B i n 1 n 2 l ( 2 ) introduced for the ACE potential. The crucial point here is that the coupling term in Eq. (19) is written over the species-wise atomic basis of Eq. (21). Since the A i n l m Z A_{inlm}^{Z} A in l m Z basis scales linearly with the number of neighbours of the i i i -th atom, then we can evaluate the coupling term with a linear cost. This, together with the fact that also the self energy scales linearly with respect to the number of neighbours, makes the computational scaling of the entire local energy, Eq. (18), linear in the numbers of neighbor atoms.
Incidentally, we note that we can write the product of the double-vanishing Jacobi polynomials in Eq. (20) in terms of a linear combination of double-vanishing Jacobi polynomials, namely there are coefficients c n n 1 n 2 c_n^{n_1 n_2} c n n 1 n 2 , such that
P ‾ n 1 j i ( α , β ) P ‾ n 2 j i ( α , β ) = ∑ n = 2 n 1 + n 2 c n n 1 n 2 P ‾ n j i ( α , β ) . (22) \overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ji}^{(\alpha,\beta)} = \sum_{n=2}^{n_1+n_2} c_n^{n_1 n_2}\overline{P}_{nji}^{(\alpha,\beta)}. \tag*{(22)} P n 1 j i ( α , β ) P n 2 j i ( α , β ) = n = 2 ∑ n 1 + n 2 c n n 1 n 2 P nj i ( α , β ) . (22)
The coefficients c n n 1 n 2 c_n^{n_1 n_2} c n n 1 n 2 are usually calculated by numerical integration. This shows that the self-energy term can be re-casted as a linear combination of A i n 00 Z A_{in00}^{Z} A in 00 Z too, and that it is, as expected, an effective 2B contribution. However, given the possible different cut-off radii of the 2B and 3B potentials and the relative different truncation, n max n_{\max} n m a x , we will keep the body orders as formally separated as possible, and we will not absorb the self-interaction terms back into lower body orders [33].
Let us now define a practical extension of the atomic basis A i n l m Z A_{inlm}^{Z} A in l m Z , so to simplify the discussion for higher-order terms. We define the JL-atomic basis as
( J p L q ) n 1 … n p l 1 … l q m q i , Z = ∑ j ∈ Z [ ∏ r = 1 p P ‾ n r j i ( α , β ) ] [ ∏ s = 1 q Y l s m s ( r ^ j i ) ] . (23) (J_pL_q)_{n_1\ldots n_p l_1\ldots l_q m_q}^{i,Z} = \sum_{j\in Z} \left[\prod_{r=1}^{p}\overline{P}_{n_rji}^{(\alpha,\beta)}\right]\left[\prod_{s=1}^{q}Y_{l_s}^{m_s}(\hat{\mathbf{r}}_{ji})\right]. \tag*{(23)} ( J p L q ) n 1 … n p l 1 … l q m q i , Z = j ∈ Z ∑ [ r = 1 ∏ p P n r j i ( α , β ) ] [ s = 1 ∏ q Y l s m s ( r ^ j i ) ] . (23)
This also includes the atomic basis A i n l m Z A_{inlm}^{Z} A in l m Z , since
( J 1 L 1 ) n l m i , Z = A i n l m Z . (24) (J_1L_1)_{nlm}^{i,Z} = A_{inlm}^{Z}. \tag*{(24)} ( J 1 L 1 ) n l m i , Z = A in l m Z . (24)
However, the definition in Eq. (24) allows us to take more than one double-vanishing Jacobi and one Legendre polynomial at once.
By looking at Eq. (22) (the same property holds for the Legendre polynomials) one could appreciate how all the components of Eq. (23) can be reduced to linear combinations of A i n l m Z A_{inlm}^{Z} A in l m Z . Therefore, the definition of the JL-basis could appear unnecessary. However, since the coefficients c n n 1 n 2 c_n^{n_1 n_2} c n n 1 n 2 must be evaluated by integration, it can be more convenient to use directly the JL-atomic basis instead than performing the necessary integrations and contractions. It is important to notice that evaluating the elements of the JL-atomic basis is still linear with the number of neighbours of the i i i -th atom: the only scaling affected is in terms of the number of components involved, namely the number of polynomials in the product.
Finally, we can now write the coupling term and the self energy over the JL-atomic basis as
{ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 = 4 π 2 l + 1 ∑ m = − l l ( − 1 ) m ( J 1 L 1 ) n 1 l m i , Z 1 ( J 1 L 1 ) n 1 l , − m i , Z 2 , S i n 1 n 2 ( 3 ) , Z 1 Z 2 = δ Z 1 Z 2 ( J 2 L 0 ) n 1 n 2 i , Z 1 . (25) \begin{cases}
C_{i n_1 n_2 l}^{(3),Z_1 Z_2} = \dfrac{4\pi}{2l+1}\sum_{m=-l}^{l}(-1)^m(J_1L_1)_{n_1 l m}^{i,Z_1}(J_1L_1)_{n_1 l,-m}^{i,Z_2},\\
S_{i n_1 n_2}^{(3),Z_1 Z_2} = \delta_{Z_1 Z_2}(J_2L_0)_{n_1 n_2}^{i,Z_1}. \tag*{(25)}
\end{cases} ⎩ ⎨ ⎧ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 = 2 l + 1 4 π ∑ m = − l l ( − 1 ) m ( J 1 L 1 ) n 1 l m i , Z 1 ( J 1 L 1 ) n 1 l , − m i , Z 2 , S i n 1 n 2 ( 3 ) , Z 1 Z 2 = δ Z 1 Z 2 ( J 2 L 0 ) n 1 n 2 i , Z 1 . (25)
The JL-atomic basis will be used as the general framework for the analogous analysis of the linear scaling in the 4B case.
The Four-Body Term
For the 4B case we will follow the very same steps presented for the 3B one. We start by expanding the 4B energy contribution, E 4 E_4 E 4 , as
E 4 = ∑ i a t o m s ∑ ( j , k , p ) i v j k p i ( 4 ) ( r j i , r k i , r p i , s j k i , s k p i , s j p i ) , (26) E_4 = \sum_i^{\mathrm{atoms}} \sum_{(j,k,p)_i} v_{jkpi}^{(4)}(r_{ji},r_{ki},r_{pi},s_{jki},s_{kpi},s_{jpi}), \tag*{(26)} E 4 = i ∑ atoms ( j , k , p ) i ∑ v j k p i ( 4 ) ( r j i , r k i , r p i , s j k i , s k p i , s j p i ) , (26)
where, analogously to E 3 E_3 E 3 in Eq. (11), the second sum runs over all the triplets of atoms in the neighborhood of the i i i -th atom. As for the 3B case, v j k p i ( 4 ) v_{jkpi}^{(4)} v j k p i ( 4 ) is a shorthand form for v Z j Z k Z p Z i ( 4 ) v_{Z_j Z_k Z_p Z_i}^{(4)} v Z j Z k Z p Z i ( 4 ) .
The 4B potential, v ( 4 ) v^{(4)} v ( 4 ) , depends on 3 distance and 3 angles, so that any triplets of atoms in the neighborhood of the i i i -th one is uniquely determined up to a reflection. The JL-4B expansion is then simply obtained by generalizing Eq. (16) to the case in which we have three double-vanishing Jacobi polynomials and as many Legendre polynomials, namely
v j k p i ( 4 ) ( r j i , r k i , r p i , s j k i , s k p i , s j p i ) = = ∑ n 1 n 2 n 3 l 1 l 2 l 3 u n i q u e a n 1 n 2 n 3 j k p i l 1 l 2 l 3 ∑ s y m m . ( P ‾ n 1 ( α , β ) ( r j i ) P ‾ n 2 ( α , β ) ( r k i ) P ‾ n 3 ( α , β ) ( r p i ) P l 1 j k p i P l 2 j p i P l 3 k p i ) . (27) \begin{aligned}
v_{jkpi}^{(4)}(r_{ji},r_{ki},r_{pi},s_{jki},s_{kpi},s_{jpi}) = \\
&= \sum_{\substack{n_1 n_2 n_3\\ l_1 l_2 l_3}}^{\mathrm{unique}} a_{n_1 n_2 n_3}^{jkpi}{}_{l_1 l_2 l_3}
\sum_{\mathrm{symm.}}
\left(\overline{P}_{n_1}^{(\alpha,\beta)}(r_{ji})\overline{P}_{n_2}^{(\alpha,\beta)}(r_{ki})\overline{P}_{n_3}^{(\alpha,\beta)}(r_{pi})P_{l_1}^{jkpi}P_{l_2}^{jpi}P_{l_3}^{kpi}\right). \tag*{(27)}
\end{aligned} v j k p i ( 4 ) ( r j i , r k i , r p i , s j k i , s k p i , s j p i ) = = n 1 n 2 n 3 l 1 l 2 l 3 ∑ unique a n 1 n 2 n 3 j k p i l 1 l 2 l 3 symm. ∑ ( P n 1 ( α , β ) ( r j i ) P n 2 ( α , β ) ( r k i ) P n 3 ( α , β ) ( r p i ) P l 1 j k p i P l 2 j p i P l 3 k p i ) . (27)
The range of the Jacobi indexes is again [ 2 , n max ] [2,n_{\max}] [ 2 , n m a x ] , while that of the Legendre ones is [ 0 , l max ] [0,l_{\max}] [ 0 , l m a x ] , where both n max n_{\max} n m a x and l max l_{\max} l m a x require optimization. By adopting the same formalism of Eq. (16), the symmetries of the potential are implemented in the expansion by construction. As for the 3B case, we have that a n 1 n 2 n 3 j k p i l 1 l 2 l 3 a_{n_1n_2n_3}^{jkpi}{}_{l_1l_2l_3} a n 1 n 2 n 3 j k p i l 1 l 2 l 3 is a shorthand for a n 1 n 2 n 3 Z j Z k Z p Z i l 1 l 2 l 3 a_{n_1n_2n_3}^{Z_jZ_kZ_pZ_i}{}_{l_1l_2l_3} a n 1 n 2 n 3 Z j Z k Z p Z i l 1 l 2 l 3 .
It is useful to explicitly investigate the symmetries for the case in which the atoms in the neighborhood belong to the same species. By associating the Jacobi indexes n 1 n_1 n 1 , n 2 n_2 n 2 and n 3 n_3 n 3 to the first, second and third distances respectively, and analogously associating the Legendre indexes to the scalar products, we impose the following symmetries on the expansion coefficients
a n 1 n 2 n 3 l 1 l 2 l 3 = a n 2 n 1 n 3 l 1 l 3 l 2 = a n 3 n 2 n 1 l 3 l 2 l 1 = a n 1 n 3 n 2 l 2 l 1 l 3 = a n 2 n 3 n 1 l 3 l 1 l 2 = a n 3 n 1 n 2 l 2 l 3 l 1 . (28) \begin{aligned}
a_{n_1n_2n_3}^{l_1l_2l_3}=a_{n_2n_1n_3}^{l_1l_3l_2}=a_{n_3n_2n_1}^{l_3l_2l_1} \\
&= a_{n_1n_3n_2}^{l_2l_1l_3}=a_{n_2n_3n_1}^{l_3l_1l_2}=a_{n_3n_1n_2}^{l_2l_3l_1}. \tag*{(28)}
\end{aligned} a n 1 n 2 n 3 l 1 l 2 l 3 = a n 2 n 1 n 3 l 1 l 3 l 2 = a n 3 n 2 n 1 l 3 l 2 l 1 = a n 1 n 3 n 2 l 2 l 1 l 3 = a n 2 n 3 n 1 l 3 l 1 l 2 = a n 3 n 1 n 2 l 2 l 3 l 1 . (28)
The first identity states that, when exchanging the first two atoms, we have to simultaneously exchange the relative distances from the central atom (swapping the Jacobi indexes n 1 n_1 n 1 and n 2 n_2 n 2 ) and the angles formed with the remaining atom (exchanging the Legendre indexes l 2 l_2 l 2 and l 3 l_3 l 3 ). All the other identities can be interpreted in a similar way. The equivalences in Eq. (28) give us the unique set of indexes to use in Eq. (27), so that the number of parameters to learn is reduced by roughly a fact six. The second sum in Eq. (27) will then run over all the indexes permutations involved in Eq. (28), mostly resulting in a sum of six terms, similarly to what was explicitly shown in Eq. (15).
4B Linear Scaling: connection with the Bispectrum
A linear scaling with the number of atoms in the neighbourhood volume can also be achieved for the 4B case. Indeed, this is even more important than for lower-body orders, since otherwise the scaling would be cubic with the number of neighbors. The backbone of the demonstration is similar to the one adopted for the 3B case, so that, by using the property of Eq. (16) and the JL-atomic basis defined in Eq. (23), we can write the local energy term, ε i ( 4 ) \varepsilon_i^{(4)} ε i ( 4 ) , as
ε i ( 4 ) = ∑ Z 1 ≥ Z 2 ≥ Z 3 ∑ n 1 n 2 n 3 l 1 l 2 l 3 u n i q u e b n 1 n 2 n 3 Z 1 Z 2 Z 3 l 1 l 2 l 3 × [ C i , l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 − S i , l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 ] , (29) \varepsilon_i^{(4)} =
\sum_{Z_1\ge Z_2\ge Z_3}
\sum_{\substack{n_1n_2n_3\\l_1l_2l_3}}^{\mathrm{unique}}
b_{n_1n_2n_3}^{Z_1Z_2Z_3}{}_{l_1l_2l_3}
\times
\left[
C_{i,l_1l_2l_3}^{(4),Z_1Z_2Z_3}
-
S_{i,l_1l_2l_3}^{(4),Z_1Z_2Z_3}
\right], \tag*{(29)} ε i ( 4 ) = Z 1 ≥ Z 2 ≥ Z 3 ∑ n 1 n 2 n 3 l 1 l 2 l 3 ∑ unique b n 1 n 2 n 3 Z 1 Z 2 Z 3 l 1 l 2 l 3 × [ C i , l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 − S i , l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 ] , (29)
where the coupling term for the 4B is given by
C i , l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = ( 4 π ) 3 ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) × ∑ m 1 m 2 m 3 ( − 1 ) m 1 + m 2 + m 3 ( J 1 L 2 ) m 1 l 1 l 2 − m 2 i , Z 1 × ( J 1 L 2 ) m 2 l 2 l 3 m 3 i , Z 2 ( J 1 L 2 ) m 1 l 2 l 3 − m 3 i , Z 3 . (30) C_{i,l_1l_2l_3}^{(4),Z_1Z_2Z_3}
=
\frac{(4\pi)^3}{(2l_1+1)(2l_2+1)(2l_3+1)}
\times
\sum_{m_1m_2m_3}
(-1)^{m_1+m_2+m_3}
(J_1L_2)_{m_1l_1l_2-m_2}^{i,Z_1}
\times
(J_1L_2)_{m_2l_2l_3m_3}^{i,Z_2}
(J_1L_2)_{m_1l_2l_3-m_3}^{i,Z_3}. \tag*{(30)} C i , l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) ( 4 π ) 3 × m 1 m 2 m 3 ∑ ( − 1 ) m 1 + m 2 + m 3 ( J 1 L 2 ) m 1 l 1 l 2 − m 2 i , Z 1 × ( J 1 L 2 ) m 2 l 2 l 3 m 3 i , Z 2 ( J 1 L 2 ) m 1 l 2 l 3 − m 3 i , Z 3 . (30)
The corresponding expression for the self-energy, S i ( 4 ) S_i^{(4)} S i ( 4 ) , is more involved and, for the sake of brevity, is reported in the SI. Here, we just wish to mention that it is obtained from linear combinations of products of the basis terms ( J 1 L 2 ) (J_1L_2) ( J 1 L 2 ) , ( J 2 L 2 ) (J_2L_2) ( J 2 L 2 ) and ( J 3 L 0 ) (J_3L_0) ( J 3 L 0 ) .
The coupling scheme described in Eq. (30) differs from the bispectrum-components coupling scheme [6, 21], while being strictly related to it. Indeed, the bispectrum writes in the ACE flavour [5 ] as,
B i , l 1 l 2 l 3 ( 3 ) , Z 1 Z 2 Z 3 = ∑ m 1 m 2 m 3 ( l 1 l 2 l 3 m 1 m 2 m 3 ) × A i n 1 l 1 m 1 Z 1 A i n 2 l 2 m 2 Z 2 A i n 3 l 3 m 3 Z 3 , (31) B_{i,l_1l_2l_3}^{(3),Z_1Z_2Z_3}
=
\sum_{m_1m_2m_3}
\begin{pmatrix}
l_1 & l_2 & l_3\\
m_1 & m_2 & m_3
\end{pmatrix}
\times
A_{in_1l_1m_1}^{Z_1}A_{in_2l_2m_2}^{Z_2}A_{in_3l_3m_3}^{Z_3}, \tag*{(31)} B i , l 1 l 2 l 3 ( 3 ) , Z 1 Z 2 Z 3 = m 1 m 2 m 3 ∑ ( l 1 m 1 l 2 m 2 l 3 m 3 ) × A i n 1 l 1 m 1 Z 1 A i n 2 l 2 m 2 Z 2 A i n 3 l 3 m 3 Z 3 , (31)
where the 3j-Wigner symbol [34] is introduced and A i n l m A_{inlm} A in l m is the atomic basis of Eq. (21). Furthermore, the JL-atomic basis terms, ( J 1 L 2 ) (J_1L_2) ( J 1 L 2 ) , can be written as a linear combination of the A i n l m Z A^{Z}_{i n l m} A in l m Z ,
( J 1 J 2 ) n 1 l 1 m 1 l 2 m 2 i , Z = ∑ l m ( − 1 ) m ( 2 l + 1 ) ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) 4 π ( l 1 l 2 l 0 0 0 ) ( l 1 l 2 l m 1 m 2 − m ) A i n l m Z . (32) \left(J_1 J_2\right)^{i,Z}_{n_1 l_1 m_1 l_2 m_2}
=
\sum_{l m}(-1)^m\sqrt{\frac{(2l+1)(2l_1+1)(2l_2+1)}{4\pi}}
\begin{pmatrix} l_1 & l_2 & l \\ 0 & 0 & 0 \end{pmatrix}
\begin{pmatrix} l_1 & l_2 & l \\ m_1 & m_2 & -m \end{pmatrix}
A^{Z}_{i n l m}. \tag*{(32)} ( J 1 J 2 ) n 1 l 1 m 1 l 2 m 2 i , Z = l m ∑ ( − 1 ) m 4 π ( 2 l + 1 ) ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( l 1 0 l 2 0 l 0 ) ( l 1 m 1 l 2 m 2 l − m ) A in l m Z . (32)
This is directly derived from the product rule for two spherical harmonics (see SI). From this expression, one could write the coupling terms C i ( 4 ) C_i^{(4)} C i ( 4 ) as a linear combination of bispectrum components B i ( 3 ) B_i^{(3)} B i ( 3 ) , as reported in the SI. This linear combination represents the way of combining the bispectrum components so that the final result is explicitly written in terms of internal coordinates only. Crucially, our argument shows that adopting the coupling scheme in C i ( 4 ) C_i^{(4)} C i ( 4 ) could give an advantage over the bispectrum components, since it allows us to maintain the equivalence between the expression in Eq. (30) and the analogous one from Eqs. (26)–(27). Then, an intuitive and equivalent closed expression (in terms of internal coordinates) remains available for any case in which the number of atoms in the neighbours is relatively small, so that one could opt between Eq. (29) and Eqs. (26)–(27) at need.
The Five-Body Term
The 5B term can be obtained by direct generalization of the 4B case. Indeed, the procedure is analogous, namely the energy contribution, E 5 E_5 E 5 , is partitioned in local components, which consist of a sum of local 5B potentials, v j k p q i ( 5 ) v^{(5)}_{jkpqi} v j k pq i ( 5 ) . These depend on four distances and six angles, so that they can be expanded as a linear combination of products of four double-vanishing Jacobi polynomials and six Legendre polynomials. The resulting expression is analogous to the one obtained in Eq. (18) for the 4B case. The symmetry properties of the potentials are also treated in the same way, resulting in a reduction of the number of coefficients up to roughly a factor 24 when dealing with identical atoms.
Behaviour at the origin
A common practice in MLPs is to introduce an external function so to impose a repulsive behaviour when the interatomic distance becomes small. Here, since we are using the double-vanishing Jacobi polynomials for all body orders beyond two, the only term affecting the behaviour at small distances is the two-body one, given in Eq. (5). We can then obtain some insight into the behaviour of the potential by evaluating Eq. (5) at the origin. Indeed, if r min = 0 r_{\min}=0 r m i n = 0 , we obtain
v Z j Z i ( 2 ) ( 0 ) = ∑ n = 1 n max a n Z j Z i P ~ n ( α , β ) ( 1 ) . (33) v^{(2)}_{Z_j Z_i}(0)=\sum_{n=1}^{n_{\max}}a^{Z_j Z_i}_n\widetilde{P}^{(\alpha,\beta)}_n(1). \tag*{(33)} v Z j Z i ( 2 ) ( 0 ) = n = 1 ∑ n m a x a n Z j Z i P n ( α , β ) ( 1 ) . (33)
From the identity
P ~ n ( α , β ) ( 1 ) = ( n + α n ) − ( − 1 ) n ( n + β n ) , \widetilde{P}^{(\alpha,\beta)}_n(1)=\binom{n+\alpha}{n}-(-1)^n\binom{n+\beta}{n}, P n ( α , β ) ( 1 ) = ( n n + α ) − ( − 1 ) n ( n n + β ) ,
we can conclude that the magnitude of the potential at the origin can become very large for an high enough n n n . Therefore, by biasing the hyper-parameters so that the potential is positive at the origin, we can produce a strongly repulsive behaviour almost by construction, with no use of any external function. This observation must be checked on a case-by-case base, an operation that can be performed visually by simply looking at the potential. Indeed, once the best expansion coefficients are available, it is possible to plot the function
v Z j Z i ( 2 ) ( x ) = ∑ n = 1 n max a n Z j Z i P ~ n ( α , β ) ( cos ( π x / r c u t ) ) . (34) v^{(2)}_{Z_j Z_i}(x)=\sum_{n=1}^{n_{\max}}a^{Z_j Z_i}_n\widetilde{P}^{(\alpha,\beta)}_n\left(\cos\left(\pi x/r_{\mathrm{cut}}\right)\right). \tag*{(34)} v Z j Z i ( 2 ) ( x ) = n = 1 ∑ n m a x a n Z j Z i P n ( α , β ) ( cos ( π x / r cut ) ) . (34)
and analyse the behaviour near the origin. Since small distances are usually in an extrapolation region of the potential, with little to no data corresponding to such distances present in the training set, a visual investigation of the 2B potential could also return us some intuition on the behaviour of the model when dealing with extrapolation attempts to unseen atomic distributions.
Forces and Stress
In this section we outline the general recipe to calculate the forces and the virial-stress tensor. Given the linearity of the expressions associated with the JL expansion, one only needs the derivative of the (double-)vanishing Jacobi and of the Legendre polynomials, from which all the relevant quantities can be evaluated.
Since the multi-body expansion of the energy, Eq. (1), and the fact that E 1 E_1 E 1 is just an energy offset, the n n n -body contribution to the force of an atom at position r a \mathbf{r}_a r a , is given by
F a ( n ) = − ∂ E n ∂ r a , (35) \mathbf{F}^{(n)}_a=-\frac{\partial E_n}{\partial\mathbf{r}_a}, \tag*{(35)} F a ( n ) = − ∂ r a ∂ E n , (35)
whereas the total force is obtained by summing up over all the n n n -body contributions, F a = ∑ n F a ( n ) \mathbf{F}_a=\sum_n\mathbf{F}^{(n)}_a F a = ∑ n F a ( n ) . As it can be seen from Eq. (4) and Eq. (5), the evaluation of the 2B force contribution, F a ( 2 ) \mathbf{F}^{(2)}_a F a ( 2 ) , requires only the application of the chain rule and the derivative of the vanishing polynomials, namely
d d x P ~ n ( α , β ) ( cos ( x ) ) = d d x P n ( α , β ) ( cos ( x ) ) = − α + β + n + 1 2 sin ( x ) P n − 1 ( α + 1 , β + 1 ) ( cos ( x ) ) . (36) \frac{\mathrm{d}}{\mathrm{d}x}\widetilde{P}^{(\alpha,\beta)}_n(\cos(x))
=
\frac{\mathrm{d}}{\mathrm{d}x}P^{(\alpha,\beta)}_n(\cos(x))
=
-\frac{\alpha+\beta+n+1}{2}\sin(x)P^{(\alpha+1,\beta+1)}_{n-1}(\cos(x)). \tag*{(36)} d x d P n ( α , β ) ( cos ( x )) = d x d P n ( α , β ) ( cos ( x )) = − 2 α + β + n + 1 sin ( x ) P n − 1 ( α + 1 , β + 1 ) ( cos ( x )) . (36)
This expression shows that the derivative of the potential smoothly vanishes (F a ( 2 ) = 0 F_a^{(2)} = 0 F a ( 2 ) = 0 ) at the cut-off radius and at the origin (when x = 0 , π x = 0, \pi x = 0 , π ). Furthermore, from Eq. (36) we can appreciate that the force can be written solely in terms of Jacobi polynomials. This results in a linear expansion that can be easily implemented or analytically investigated.
Analogously, we can evaluate the 3B contribution to the forces by differentiating the E 3 E_3 E 3 term. This implies that we need to calculate [see Eq. (13) and Eq. (16)]
∂ ∂ r a ∑ s y m m . ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) = ∑ s y m m . ∂ ∂ r a ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) , (37) \frac{\partial}{\partial r_a}\sum_{\mathrm{symm.}}\left(\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}\right)
=
\sum_{\mathrm{symm.}}\frac{\partial}{\partial r_a}\left(\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}\right), \tag*{(37)} ∂ r a ∂ symm. ∑ ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) = symm. ∑ ∂ r a ∂ ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) , (37)
where we are able to exchange the sum and the derivative, since the former acts only on the Jacobi and Legendre indexes. Therefore, in evaluating the derivative of the product, we can use again the chain-rule and the differentiation formula for the Legendre polynomials, namely
d d x P l ( x ) = d d x P l ( 0 , 0 ) ( x ) = l + 1 2 P l − 1 ( 1 , 1 ) ( x ) , (38) \frac{\mathrm{d}}{\mathrm{d}x}P_l(x)=\frac{\mathrm{d}}{\mathrm{d}x}P_l^{(0,0)}(x)=\frac{l+1}{2}P_{l-1}^{(1,1)}(x), \tag*{(38)} d x d P l ( x ) = d x d P l ( 0 , 0 ) ( x ) = 2 l + 1 P l − 1 ( 1 , 1 ) ( x ) , (38)
where we have used the fact that the Legendre polynomials are obtained from the Jacobi polynomials by setting α = β = 0 \alpha= \beta= 0 α = β = 0 . Finally, we also need the differentiation rule for double-vanishing Jacobi polynomials
d d x P ˉ n ( α , β ) ( cos ( x ) ) = − sin ( x ) 2 ( ( α + β + n + 1 ) P n − 1 ( α + 1 , β + 1 ) ( cos ( x ) ) − ( α + β + 2 ) P ~ n ( α , β ) ( − 1 ) P ~ 1 ( α , β ) ( − 1 ) ) . (39) \frac{\mathrm{d}}{\mathrm{d}x}\bar{P}_n^{(\alpha,\beta)}(\cos(x))
=
-\frac{\sin(x)}{2}\left((\alpha+\beta+n+1)P_{n-1}^{(\alpha+1,\beta+1)}(\cos(x))-(\alpha+\beta+2)\frac{\widetilde{P}_n^{(\alpha,\beta)}(-1)}{\widetilde{P}_1^{(\alpha,\beta)}(-1)}\right). \tag*{(39)} d x d P ˉ n ( α , β ) ( cos ( x )) = − 2 sin ( x ) ( ( α + β + n + 1 ) P n − 1 ( α + 1 , β + 1 ) ( cos ( x )) − ( α + β + 2 ) P 1 ( α , β ) ( − 1 ) P n ( α , β ) ( − 1 ) ) . (39)
The 4B and 5B contributions to the forces are evaluated in the same way, and these do not introduce any further ingredient to obtain an analytical form. The expression for the forces in the case of the JL-atomic basis will be explicitly discussed in future works. Finally, we can also obtain the virial-stress tensor by mean of the formula discussed in reference [35] [see Eq. (25)].
Linear Regression
In order to select the optimal expansion coefficients for each body term, we minimise the widely used loss function
L = ∥ E − J E a ∥ 2 2 + c F ∥ F − J F a ∥ 2 2 + c W ∥ W − J W a ∥ 2 2 , L=\lVert E-J_Ea\rVert_2^2+c_F\lVert F-J_Fa\rVert_2^2+c_W\lVert W-J_Wa\rVert_2^2, L = ∥ E − J E a ∥ 2 2 + c F ∥ F − J F a ∥ 2 2 + c W ∥ W − J W a ∥ 2 2 ,
where the vector E E E represents all the energies in the training set (obtained by ab-initio calculations), a a a is the vector of all the coefficients of the expansion, J E J_E J E is the matrix, whose rows contain the set of descriptors for one configuration of the training set. Similarly F F F is the vector of all the forces of the dataset, while J F J_F J F are the appropriate differentiated descriptors. Note that, explicitly, we will train on each components of the forces for each atom in the system. This means that, if the i i i -th configuration has N i N_i N i atoms, we will have 3 N i 3N_i 3 N i forces associated to that configuration. The vector of the components of the stress tensor for each training point is W W W . In this case, we will train independently on each of the six components, for any of the configurations in the training set. Finally c F c_F c F and c W c_W c W are coupling constants to be optimized, and ∥ ⋅ ∥ 2 2 \lVert\cdot\rVert_2^2 ∥ ⋅ ∥ 2 2 is the square of the vector 2-norm. While the use of a multi-target scheme, embedded in a non-linear function, can be used to increase the accuracy of the model [36], we remark that we follow here a simple linear approach.
Table 1. Details of the JLP trained on the carbon dataset from [24]. In order to reduce the number of hyper parameters, we fix α \alpha α and β \beta β to be equal, and r min = 0 r_{\min} = 0 r m i n = 0 . The model is relatively compact and comprises 465 (464 plus the intercept) features.
The minimization procedure that will be adopted for the remainder of this work, where results on a mono-species system are shown, will be based on the Singular Value Decomposition (SVD). We stress that we will not regularise the energy offset, E 1 E_1 E 1 . Furthermore, instead of using the total energies, we will always consider the energy per atom in the training set.
Here we wish to remark that the coupling constants, c F c_F c F and c W c_W c W , can also depend on the specific configuration, a fact that can be seen as a configuration-wise re-scaling of the descriptors and targets. This is useful, in particular, when the configurations have a different number of atoms. As a direct example, the loss function used in the next section, will have all the forces and the relative descriptors divided by 3 N i \sqrt{3N_i} 3 N i , where N i N_i N i is the number of atoms in the configuration. This is performed in order to weight the energies, forces and stress, on a similar footing in the minimization procedure. Another advantage of such a configuration-wise weighting scheme is that the energy offset per atom, E 1 E_1 E 1 , can be written analytically in terms of the per-atom average energy, average descriptors and the linear fitting coefficients.
A JLP for Carbon
As an application of the method described here, we have fitted a JLP on the carbon dataset used to fit the GAP17 potential of [24]. We have opted for this dataset, since it presents several challenges. Firstly, the dataset is made of different phases of carbon, ranging from crystalline structures (graphene, graphite, diamond), to surfaces and amorphous phases. In addition, some phases present a relative large distance for the decay of the forces between two atoms, as explicitly shown in the same Ref. [24]. This is mirrored in the choice of the appropriate cut-off radius. For the fit we have removed all the carbon dimers (config_type=cluster) and any structures with absolute maximum force components greater than 30 eV/A ˚ \mathrm{\AA} A ˚ . In total we have thus removed 37 structures of which 30 are the carbon dimers used to fit the two body GAP and 7 other structures, which do not satisfy the maximum force criteria. The remaining 4,043 structures are split into a training set of 2,830 and a testing one of 1,213. The structure index of all the training and testing structures are given in the SI.
We use energy, forces and virial stress to fit the linear model. The hyper-parameters for the final potential are summarised in Table I. Following the analysis on the locality of Ref. [24], we have kept the same cut-off radius as for the GAP17 model, namely 3.7 A ˚ \mathrm{\AA} A ˚ . The coupling constant c F c_F c F and c W c_W c W , of the loss function, are 0.5 and 0.075 respectively. Finally, the descriptors have been calculated in their internal coordinate form and the cluster expansion is truncated at the four-body order. This gives us a potential defined over 465 features.
For the fitted model, we find that the training-set Root Mean Squared Errors (RMSEs) are 43.9 meV/atom for the energy, 0.779 eV/A ˚ \mathrm{\AA} A ˚ for the forces and 6.62 eV for the stress. As shown in Figure 5 , reporting the parity plots for the test set, the corresponding RMSEs are
Figure 5. Parity plots computed over the test set for the (a) energies, (b) forces, (c) virial stress. The Mean Absolute Errors (MAEs) and Root Mean Square Error (RMSE) are reported for each plot, alongside with the error on the worst prediction. The color code indicates the data density (number of points).
46.6 meV/atom for the energy, 0.781 eV/A ˚ \mathrm{\AA} A ˚ for the forces and 6.15 eV for the stress, namely they are of the same quality as for the training set (the parity plots for the training set are reported in the SI). We observe that the structures, which deviate the most from the energy-parity plot in Figure 5 (a), correspond to all carbon in the amorphous phase. These appear to be slightly more difficult to be dealt with by the JLP. Furthermore, we wish to remark that, as it can be appreciated in Figure 5 (c), the predicted components of the virial-stress appear to be in good agreement with the DFT ones.
In Figure 6 we report the cumulative distribution of the error on the forces for the test set. The curve represents the percentage of structures, which have an error below the one indicated. As a reference, we explicitly consider the case of 1 eV/A ˚ \mathrm{\AA} A ˚ , which was taken as reference for the GAP17 potential (see Ref. [24]). The remarkable high value of 81.97% shows the capability of the JLP in correctly predicting the forces components.
Figure 6. The cumulative distribution of the test-set predicted forces. The model shows that approximately 81.97% of the structures have an error below 1 eV/A ˚ \mathrm{\AA} A ˚ .
As remarked in § 14 H, the JL potential naturally shows a repulsive behaviour at short distance, without the inclusion of any external fast-varying function. This is made clear in Figure 7 , where we show the C-C potential obtained by plotting Eq. (34) with the fitted 2B-expansion coefficients. From the figure one can clearly identify the short-distance repulsive behaviour of the 2B potential, which arises naturally from the 2B expansion coefficients. Furthermore, the potential shows a shallow minimum close to the the first peak in the radial distribution function computed over the fitting dataset (blue shadow). We stress here once again that the repulsive behaviour is completely determined by the 2B coefficients, since all the other body-order terms are written in term of the double-vanishing Jacobi polynomials, which vanish at short distances. As a consequence, Figure 7 gives us complete information about the repulsive behaviour of the entire potential.
Figure 7. Reconstruction of the 2B potential from Eq. (34) (red curve). The inset show a magnification around the minimum, while the histogram reports the pair-distance distribution of the entire dataset. Qualitatively, the potential shows a strong repulsive behaviour for small distances and a minimum, which is consistent with the position of the first peak in the pair-distances distribution.
We then employed the optimized JLP, to predict the phonons dispersion curves for graphene and diamond, using the phono3py package [37, 38]. The results are reported in Figure 8 , where the reference phonon dispersion for crystalline diamond (mp-66) was obtained from materials project [39] and for graphene was obtained from the phonon website [40]. These reference calculations have performed using density functional perturbation theory using the ABINIT code [41].
Figure 8. Phonon spectra for (a) graphene and (b) diamond computed with the optimised JLP described in the text (red lines). The reference DFT calculations (black lines) have been obtained with density functional perturbation theory as implemented in the ABINIT code.
As one can appreciate from the figure, the agreement between the JLP-computed phonon bands and the DFT reference ones is quite remarkable, for both the acoustic and optical branches. The largest disagreement is generally found for the optical branches and it is of the order of 2 cm− 1 ^{-1} − 1 (see, for instance, the graphene bands at around 45 cm− 1 ^{-1} − 1 ). Note that this is a particular challenging test, since the training dataset has an energy spread of several eV/atom, while the energy differences computed in the finite-difference scheme used here are a few meV/atom from the equilibrium energy. This means that our JLP is able to describe, on the same footing, both the low-energy physics of crystalline carbon around equilibrium,
and high-energy liquid and amorphous structures. Note also that perfect agreement is not even expected. In fact, the DFT dataset used to train the JPL model was obtained with the CASTEP code [42] and the phonon via finite differences, while our DFT reference has been generated with ABINIT [41] and density functional perturbation theory. Additional differences can also be ascribed to the different pseudopotentials used and to details in the DFT implementation.
Conclusions
In conclusion, we have introduced all the necessary formalism to develop a general cluster expansion for the total energy, where the different body-order terms are systematically separated. This is designed for the shortrange chemical-bond-related part of the total energy, which is written as the sum of individual atomic contributions. The core idea is then that of expanding the different body-order terms, representing the inter-atomic distances over Jacobi polynomials and the structural angles over Legendre polynomials, which are a special case of the Jacobi ones. This is an extremely general representation, giving us ample flexibility when constructing the potential.
An important feature is that one can impose both constrains and symmetries on the coefficients of the expansion, a practice that allows us to implement desired behaviours of the potential in a natural way. For example, one can impose the potential to vanish at a desired cut-off distance, by simply imposing a set of conditions over the zero-order coefficients of the Jacobi polynomial expansion. In a similar way, one can constrain the expansion of all the body-order terms larger than two to vanish at the origin, so that the short-distance behaviour of the potential is solely determined by the two-body contribution. This, in turn, can be designed to display a repulsive behaviour at short distances.
Furthermore, the implementation of physical symmetries over the expansion allows us to drastically reduce the number of independent coefficients to determine. As a result, the number of features that uniquely define the cluster expansion is demonstrated to scale linearly with the number of atoms in the cut-off volume. The demonstration of such scaling is rooted in the decomposition of the Legendre polynomials over spherical harmonics, a feature, which allows us to map our representation on known many-body atomic bases such as the powerspectrum, the bispectrum and those introduced in the atomic cluster expansion method.
The formalism introduced here is put to the test for a quite complex dataset, namely the carbon one used to construct the GAP17 potential. This comprises crystalline graphite and diamond, as well as a multitude of liquid and amorphous carbon structures. We then show that a four-body relatively compact model, containing 465 features and trained over energies, forces and stress tensor, is capable of achieving extremely competitive RMSEs across all quantities. Furthermore, the same potential reproduces quite accurately the zero-temperature phonon band structure of both graphene and diamond, demonstrating accuracy both at low and high energy. We believe that the JLP introduced here adds to the burgeoning field of machine-learning potentials, bringing a versatile tool where symmetry and constraints can be implemented in a natural and efficient way. The ability to separate the different body orders and the possibility to construct relatively compact models, make the JLP a strong candidate for the calculation of potential energy surfaces both in data-reach and data-poor situations.
Acknowledgments
This work has been supported by the Irish Research Council Advanced Laureate Award (IRCLA/2019/127), and by the Irish Research Council postgraduate program (MC). UP acknowledge the Qatar National Research fund for additional financial support (grant no. NPRP12S-0209-190063). We acknowledge the DJEI/DES/SFI/HEA Irish Centre for High-End Computing (ICHEC) and Trinity Centre for High Performance Computing (TCHPC) for the provision of computational resources. We acknowledge support from ICHEC via the academic flagship program (Project Number - EuroCC-AF-3). We have extensively used numpy [43], cython [44], scikit-learn [45] and matplotlib [46].
Proof of property
We derive here a series expansion for the vanishing Jacobi polynomials and we will prove the property (10). The series expansion for the Jacobi Polynomials is (Ref. [26])
P n ( α , β ) ( x ) = 1 2 n ∑ j = 0 n ( n + α j ) ( n + β n − j ) ( x − 1 ) n − j ( x + 1 ) j . (40) P_n^{(\alpha,\beta)}(x) = \frac{1}{2^n} \sum_{j=0}^{n} \binom{n+\alpha}{j} \binom{n+\beta}{n-j} (x-1)^{n-j}(x+1)^j . \tag*{(40)} P n ( α , β ) ( x ) = 2 n 1 j = 0 ∑ n ( j n + α ) ( n − j n + β ) ( x − 1 ) n − j ( x + 1 ) j . (40)
Performing the substitution x → cos x x \to\cos x x → cos x , where x = π ( r − r min ) / ( r c u t − r min ) x = \pi(r-r_{\min})/(r_{\mathrm{cut}}-r_{\min}) x = π ( r − r m i n ) / ( r cut − r m i n ) , we get
P n ( α , β ) ( cos x ) = ∑ j = 0 n ( − 1 ) n − j ( n + α j ) ( n + β n − j ) sin 2 ( n − j ) ( x / 2 ) cos 2 j ( x / 2 ) . (41) \begin{aligned}
P_n^{(\alpha,\beta)}(\cos x) \\
&= \sum_{j=0}^{n} (-1)^{n-j} \binom{n+\alpha}{j} \binom{n+\beta}{n-j} \sin^{2(n-j)}(x/2) \cos^{2j}(x/2) . \tag*{(41)}
\end{aligned} P n ( α , β ) ( cos x ) = j = 0 ∑ n ( − 1 ) n − j ( j n + α ) ( n − j n + β ) sin 2 ( n − j ) ( x /2 ) cos 2 j ( x /2 ) . (41)
Evaluating the expression on x = π x = \pi x = π , which means to evaluate the polynomial at the cut-off, makes all the terms of the summation vanish except for the case j = 0 j = 0 j = 0 . Therefore, by mean of (6), we get a series expansion for the vanishing Jacobi Polynomials.
P ~ n ( α , β ) ( cos x ) = ∑ j = 1 n ( − 1 ) n − j ( n + α j ) ( n + β n − j ) sin 2 ( n − j ) ( x / 2 ) cos 2 j ( x / 2 ) + ( − 1 ) n ( n + α n ) ( sin 2 ( x / 2 ) − 1 ) . (42) \begin{aligned}
\widetilde{P}_n^{(\alpha,\beta)}(\cos x) \\
&= \sum_{j=1}^{n} (-1)^{n-j} \binom{n+\alpha}{j} \binom{n+\beta}{n-j} \sin^{2(n-j)}(x/2) \cos^{2j}(x/2)
+(-1)^n \binom{n+\alpha}{n}\left(\sin^2(x/2)-1\right) . \tag*{(42)}
\end{aligned} P n ( α , β ) ( cos x ) = j = 1 ∑ n ( − 1 ) n − j ( j n + α ) ( n − j n + β ) sin 2 ( n − j ) ( x /2 ) cos 2 j ( x /2 ) + ( − 1 ) n ( n n + α ) ( sin 2 ( x /2 ) − 1 ) . (42)
Finally, by using the identity
sin 2 n ( x / 2 ) − 1 = − cos 2 ( x / 2 ) ∑ j = 1 n sin 2 ( n − j ) ( x / 2 ) , (43) \sin^{2n}(x/2)-1 = -\cos^2(x/2) \sum_{j=1}^{n} \sin^{2(n-j)}(x/2), \tag*{(43)} sin 2 n ( x /2 ) − 1 = − cos 2 ( x /2 ) j = 1 ∑ n sin 2 ( n − j ) ( x /2 ) , (43)
we prove the property (10)
P ~ n ( α , β ) ( cos x ) = f c ( x ) Q n ( α , β ) ( cos ( x ) ) , (44) \widetilde{P}_n^{(\alpha,\beta)}(\cos x) = f_c(x)Q_n^{(\alpha,\beta)}(\cos(x)) , \tag*{(44)} P n ( α , β ) ( cos x ) = f c ( x ) Q n ( α , β ) ( cos ( x )) , (44)
where
Q n ( α , β ) ( cos ( x ) ) = ∑ j = 1 n [ ( − 1 ) n − j ( n + α j ) ( n + β n − j ) cos 2 ( j − 1 ) ( x / 2 ) + ( − 1 ) n ( n + β n ) sin 2 ( n − j ) ( x / 2 ) , ] (45) Q_n^{(\alpha,\beta)}(\cos(x)) = \sum_{j=1}^{n} \left[ (-1)^{n-j} \binom{n+\alpha}{j} \binom{n+\beta}{n-j} \cos^{2(j-1)}(x/2) + (-1)^n \binom{n+\beta}{n} \sin^{2(n-j)}(x/2), \right] \tag*{(45)} Q n ( α , β ) ( cos ( x )) = j = 1 ∑ n [ ( − 1 ) n − j ( j n + α ) ( n − j n + β ) cos 2 ( j − 1 ) ( x /2 ) + ( − 1 ) n ( n n + β ) sin 2 ( n − j ) ( x /2 ) , ] (45)
and f c ( x ) = cos 2 ( x / 2 ) = ( 1 + cos ( x ) ) / 2 f_c(x) = \cos^2(x/2) = (1+\cos(x))/2 f c ( x ) = cos 2 ( x /2 ) = ( 1 + cos ( x )) /2 .
Supplementary Material
Linear Scaling
Three-body
In this section we will prove that the two expressions
ε i ( 3 ) = ∑ ( j , k ) i ∑ n 1 n 2 l u n i q u e a n 1 n 2 l Z j Z k Z i ∑ s y m m . ( P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) P l j k i ) , (46) \varepsilon_i^{(3)} = \sum_{(j,k)_i} \sum_{n_1n_2l}^{\mathrm{unique}} a_{n_1n_2l}^{Z_jZ_kZ_i} \sum_{\mathrm{symm.}} \left(\overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}\right), \tag*{(46)} ε i ( 3 ) = ( j , k ) i ∑ n 1 n 2 l ∑ unique a n 1 n 2 l Z j Z k Z i symm. ∑ ( P n 1 j i ( α , β ) P n 2 k i ( α , β ) P l j k i ) , (46)
and
ε i ( 3 ) = ∑ Z 1 , Z 2 Z 1 ≥ Z 2 ∑ n 1 n 2 l u n i q u e b n 1 n 2 l Z 1 Z 2 Z i [ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 − S i n 1 n 2 ( 3 ) , Z 1 Z 2 ] , (47) \varepsilon_i^{(3)} = \sum_{\substack{Z_1,Z_2\\ Z_1 \ge Z_2}} \sum_{n_1n_2l}^{\mathrm{unique}} b_{n_1n_2l}^{Z_1Z_2Z_i}\left[C_{in_1n_2l}^{(3),Z_1Z_2}-S_{in_1n_2}^{(3),Z_1Z_2}\right], \tag*{(47)} ε i ( 3 ) = Z 1 , Z 2 Z 1 ≥ Z 2 ∑ n 1 n 2 l ∑ unique b n 1 n 2 l Z 1 Z 2 Z i [ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 − S i n 1 n 2 ( 3 ) , Z 1 Z 2 ] , (47)
where the coupling term C i n 1 n 2 l ( 3 ) , Z 1 Z 2 C_{in_1n_2l}^{(3),Z_1Z_2} C i n 1 n 2 l ( 3 ) , Z 1 Z 2 and the self energy term S i n 1 n 2 ( 3 ) , Z 1 Z 2 S_{in_1n_2}^{(3),Z_1Z_2} S i n 1 n 2 ( 3 ) , Z 1 Z 2 are written in terms of the JL-atomic basis
( J p L q ) n 1 … n p l 1 m 1 … l q m q i , Z = ∑ j ∈ Z [ ∏ r = 1 p P n r j i ( α , β ) ] [ ∏ s = 1 q Y l s m s ( r ^ j i ) ] , (48) (J_pL_q)_{n_1\ldots n_p l_1m_1\ldots l_qm_q}^{i,Z} = \sum_{j \in Z} \left[\prod_{r=1}^{p} P_{n_rji}^{(\alpha,\beta)}\right]\left[\prod_{s=1}^{q}Y_{l_s}^{m_s}(\hat{r}_{ji})\right], \tag*{(48)} ( J p L q ) n 1 … n p l 1 m 1 … l q m q i , Z = j ∈ Z ∑ [ r = 1 ∏ p P n r j i ( α , β ) ] [ s = 1 ∏ q Y l s m s ( r ^ j i ) ] , (48)
as
{ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 = 4 π 2 l + 1 ∑ m = − l l ( − 1 ) m ( J 1 L 1 ) n 1 l m i , Z 1 ( J 1 L 1 ) n 2 l − m i , Z 2 , S i n 1 n 2 ( 3 ) , Z 1 Z 2 = δ Z 1 Z 2 ( J 2 L 0 ) n 1 n 2 i , Z 1 , (49) \begin{cases}
C_{in_1n_2l}^{(3),Z_1Z_2} = \dfrac{4\pi}{2l+1}\sum_{m=-l}^{l}(-1)^m(J_1L_1)_{n_1lm}^{i,Z_1}(J_1L_1)_{n_2l-m}^{i,Z_2},\\
S_{in_1n_2}^{(3),Z_1Z_2} = \delta_{Z_1Z_2}(J_2L_0)_{n_1n_2}^{i,Z_1}, \tag*{(49)}
\end{cases} ⎩ ⎨ ⎧ C i n 1 n 2 l ( 3 ) , Z 1 Z 2 = 2 l + 1 4 π ∑ m = − l l ( − 1 ) m ( J 1 L 1 ) n 1 l m i , Z 1 ( J 1 L 1 ) n 2 l − m i , Z 2 , S i n 1 n 2 ( 3 ) , Z 1 Z 2 = δ Z 1 Z 2 ( J 2 L 0 ) n 1 n 2 i , Z 1 , (49)
are equivalent. The relation between the coefficients a a a and b b b can be found in eq. (9).
Starting from (1), we have that the sum on ( j , k ) i (j,k)_i ( j , k ) i , namely all the proper pairs of atoms in the neighborhood of the i i i -th atom, can be re-arranged so that we always consider atoms such that their atomic number is in decreasing order. Therefore we can have the ordering
∑ ( j , k ) i = ∑ Z 1 , Z 2 Z 1 ≥ Z 2 ∑ ( j , k ) i j ∈ Z 1 , k ∈ Z 2 , (50) \sum_{(j,k)_i} = \sum_{\substack{Z_1,Z_2\\ Z_1\ge Z_2}}\sum_{\substack{(j,k)_i\\ j\in Z_1,k\in Z_2}}, \tag*{(50)} ( j , k ) i ∑ = Z 1 , Z 2 Z 1 ≥ Z 2 ∑ ( j , k ) i j ∈ Z 1 , k ∈ Z 2 ∑ , (50)
and we can now separate in cases with atoms belonging to same species or to different ones. For the latter, we have that no symmetries among the coefficients is present, and therefore
∑ n 1 n 2 l u n i q u e a n 1 n 2 l Z 1 Z 2 Z i ∑ s y m m . ( P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) P l j k i ) = ∑ n 1 n 2 l u n i q u e a n 1 n 2 l Z 1 Z 2 Z i P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) P l j k i , (51) \sum_{n_1n_2l}^{\mathrm{unique}}a_{n_1n_2l}^{Z_1Z_2Z_i}\sum_{\mathrm{symm.}}\left(\overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}\right)
=
\sum_{n_1n_2l}^{\mathrm{unique}}a_{n_1n_2l}^{Z_1Z_2Z_i}\overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}, \tag*{(51)} n 1 n 2 l ∑ unique a n 1 n 2 l Z 1 Z 2 Z i symm. ∑ ( P n 1 j i ( α , β ) P n 2 k i ( α , β ) P l j k i ) = n 1 n 2 l ∑ unique a n 1 n 2 l Z 1 Z 2 Z i P n 1 j i ( α , β ) P n 2 k i ( α , β ) P l j k i , (51)
where the sum here is not constrained by any symmetries. Here the atoms j and the atom k are necessarily different, belonging to different atomic species. Thus in this case we can freely sum all the atoms in the environment, so that, from the re-arrangement (5), we get
ε i ( 3 ) = ∑ Z 1 , Z 2 Z 1 > Z 2 ∑ j ∈ Z 1 ∑ k ∈ Z 2 ∑ n 1 , n 2 , l u n i q u e a n 1 n 2 l Z 1 Z 2 Z i P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i + ∑ Z 1 ∑ ( j , k ) i j ∈ Z 1 k ∈ Z 2 ∑ n 1 , n 2 , l u n i q u e a n 1 n 2 l Z 1 Z 1 Z i ∑ s y m m . ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) . (52) \varepsilon_i^{(3)} = \sum_{\substack{Z_1,Z_2\\ Z_1>Z_2}} \sum_{j\in Z_1} \sum_{k\in Z_2} \sum_{n_1,n_2,l}^{\mathrm{unique}} a_{n_1n_2l}^{Z_1Z_2Z_i} \bar{P}_{n_1ji}^{(\alpha,\beta)} \bar{P}_{n_2ki}^{(\alpha,\beta)} P_l^{jki} + \sum_{Z_1} \sum_{\substack{(j,k)_i\\ j\in Z_1\\ k\in Z_2}} \sum_{n_1,n_2,l}^{\mathrm{unique}} a_{n_1n_2l}^{Z_1Z_1Z_i} \sum_{\mathrm{symm.}} \left(\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}\right). \tag*{(52)} ε i ( 3 ) = Z 1 , Z 2 Z 1 > Z 2 ∑ j ∈ Z 1 ∑ k ∈ Z 2 ∑ n 1 , n 2 , l ∑ unique a n 1 n 2 l Z 1 Z 2 Z i P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i + Z 1 ∑ ( j , k ) i j ∈ Z 1 k ∈ Z 2 ∑ n 1 , n 2 , l ∑ unique a n 1 n 2 l Z 1 Z 1 Z i symm. ∑ ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) . (52)
Dealing with the same species case, the second addend of the above equation, we have
∑ Z 1 ∑ ( j , k ) i j ∈ Z 1 k ∈ Z 1 ∑ n 1 , n 2 , l u n i q u e a n 1 n 2 l Z 1 Z 1 Z i ∑ s y m m . ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) = ∑ Z 1 ∑ ( j , k ) i j ∈ Z 1 k ∈ Z 1 [ ∑ n 1 , n 2 , l n 1 > n 2 a n 1 n 2 l Z 1 Z 1 Z i ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) + P ˉ n 2 j i ( α , β ) P ˉ n 1 k i ( α , β ) ) P l j k i + ∑ n 1 , l a n 1 n 1 l Z 1 Z 1 Z i P ˉ n 1 j i ( α , β ) P ˉ n 1 k i ( α , β ) P l j k i ] . (53) \begin{aligned}
\sum_{Z_1}\sum_{\substack{(j,k)_i\\ j\in Z_1\\ k\in Z_1}}\sum_{n_1,n_2,l}^{\mathrm{unique}}a_{n_1n_2l}^{Z_1Z_1Z_i}\sum_{\mathrm{symm.}}\left(\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}\right) \\
&= \sum_{Z_1}\sum_{\substack{(j,k)_i\\ j\in Z_1\\ k\in Z_1}}\left[\sum_{\substack{n_1,n_2,l\\ n_1>n_2}}a_{n_1n_2l}^{Z_1Z_1Z_i}\left(\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}+\bar{P}_{n_2ji}^{(\alpha,\beta)}\bar{P}_{n_1ki}^{(\alpha,\beta)}\right)P_l^{jki}+\sum_{n_1,l}a_{n_1n_1l}^{Z_1Z_1Z_i}\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_1ki}^{(\alpha,\beta)}P_l^{jki}\right]. \tag*{(53)}
\end{aligned} Z 1 ∑ ( j , k ) i j ∈ Z 1 k ∈ Z 1 ∑ n 1 , n 2 , l ∑ unique a n 1 n 2 l Z 1 Z 1 Z i symm. ∑ ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i ) = Z 1 ∑ ( j , k ) i j ∈ Z 1 k ∈ Z 1 ∑ n 1 , n 2 , l n 1 > n 2 ∑ a n 1 n 2 l Z 1 Z 1 Z i ( P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) + P ˉ n 2 j i ( α , β ) P ˉ n 1 k i ( α , β ) ) P l j k i + n 1 , l ∑ a n 1 n 1 l Z 1 Z 1 Z i P ˉ n 1 j i ( α , β ) P ˉ n 1 k i ( α , β ) P l j k i . (53)
The terms inside the curly bracket here can be seen as the swapping between j and k, so that we can un-restrict the sum on ( j , k ) i (j,k)_i ( j , k ) i so that each proper pairs is counted once. However, the second addend, will be now be counted twice, therefore we can introduce the coefficients
b n 1 n 2 l Z 1 Z 2 Z i = a n 1 n 2 l Z 1 Z 2 Z i 1 + δ Z 1 Z 2 δ n 1 n 2 , (54) b_{n_1n_2l}^{Z_1Z_2Z_i}=\frac{a_{n_1n_2l}^{Z_1Z_2Z_i}}{1+\delta_{Z_1Z_2}\delta_{n_1n_2}}, \tag*{(54)} b n 1 n 2 l Z 1 Z 2 Z i = 1 + δ Z 1 Z 2 δ n 1 n 2 a n 1 n 2 l Z 1 Z 2 Z i , (54)
where we used the δ \delta δ -Kronecker to halve the coefficients when needed, so that the expression (8) can be written as
( 8 ) = ∑ Z 1 ∑ j ∈ Z 1 k ∈ Z 1 j ≠ k ∑ n 1 , n 2 , l u n i q u e b n 1 n 2 l Z 1 Z 1 Z i P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i . (55) (8)=\sum_{Z_1}\sum_{\substack{j\in Z_1\\ k\in Z_1\\ j\ne k}}\sum_{n_1,n_2,l}^{\mathrm{unique}}b_{n_1n_2l}^{Z_1Z_1Z_i}\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}. \tag*{(55)} ( 8 ) = Z 1 ∑ j ∈ Z 1 k ∈ Z 1 j = k ∑ n 1 , n 2 , l ∑ unique b n 1 n 2 l Z 1 Z 1 Z i P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i . (55)
We now remove the restriction j ≠ k j\ne k j = k by adding and subtracting the term j = k j=k j = k , so that the expression becomes
( 10 ) = ∑ Z 1 ∑ n 1 , n 2 , l u n i q u e b n 1 n 2 l Z 1 Z 1 Z i [ ∑ j ∈ Z 1 k ∈ Z 1 P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i − ∑ j ∈ Z 1 P ˉ n 1 j i ( α , β ) P ˉ n 2 j i ( α , β ) ] . (56) (10)=\sum_{Z_1}\sum_{n_1,n_2,l}^{\mathrm{unique}}b_{n_1n_2l}^{Z_1Z_1Z_i}\left[\sum_{\substack{j\in Z_1\\ k\in Z_1}}\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}-\sum_{j\in Z_1}\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ji}^{(\alpha,\beta)}\right]. \tag*{(56)} ( 10 ) = Z 1 ∑ n 1 , n 2 , l ∑ unique b n 1 n 2 l Z 1 Z 1 Z i j ∈ Z 1 k ∈ Z 1 ∑ P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i − j ∈ Z 1 ∑ P ˉ n 1 j i ( α , β ) P ˉ n 2 j i ( α , β ) . (56)
Plugging this expression back in (7), and using the definition of the b b b coefficients (9), we get
ε i ( 3 ) = ∑ Z 1 , Z 2 Z 1 ≥ Z 2 ∑ n 1 , n 2 , l u n i q u e b n 1 n 2 l Z 1 Z 2 Z i [ ∑ j ∈ Z 1 k ∈ Z 2 P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i − δ Z 1 Z 2 ∑ j ∈ Z 1 P ˉ n 1 j i ( α , β ) P ˉ n 2 j i ( α , β ) ] . (57) \varepsilon_i^{(3)}=\sum_{\substack{Z_1,Z_2\\ Z_1\ge Z_2}}\sum_{n_1,n_2,l}^{\mathrm{unique}}b_{n_1n_2l}^{Z_1Z_2Z_i}\left[\sum_{\substack{j\in Z_1\\ k\in Z_2}}\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ki}^{(\alpha,\beta)}P_l^{jki}-\delta_{Z_1Z_2}\sum_{j\in Z_1}\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ji}^{(\alpha,\beta)}\right]. \tag*{(57)} ε i ( 3 ) = Z 1 , Z 2 Z 1 ≥ Z 2 ∑ n 1 , n 2 , l ∑ unique b n 1 n 2 l Z 1 Z 2 Z i j ∈ Z 1 k ∈ Z 2 ∑ P ˉ n 1 j i ( α , β ) P ˉ n 2 k i ( α , β ) P l j k i − δ Z 1 Z 2 j ∈ Z 1 ∑ P ˉ n 1 j i ( α , β ) P ˉ n 2 j i ( α , β ) . (57)
Finally, by using the addition theorem of the spherical harmonics [1 ]
P l j k i = P l ( r ^ j i ⋅ r ^ k i ) = 4 π 2 l + 1 ∑ m = − l l ( − 1 ) m Y l m ( r ^ j i ) Y l − m ( r ^ k i ) , (58) P_l^{jki}=P_l(\hat{r}_{ji}\cdot\hat{r}_{ki})=\frac{4\pi}{2l+1}\sum_{m=-l}^{l}(-1)^mY_l^m(\hat{r}_{ji})Y_l^{-m}(\hat{r}_{ki}), \tag*{(58)} P l j k i = P l ( r ^ j i ⋅ r ^ k i ) = 2 l + 1 4 π m = − l ∑ l ( − 1 ) m Y l m ( r ^ j i ) Y l − m ( r ^ k i ) , (58)
we can separate the single contributions of (12) as
ε i ( 3 ) = ∑ Z 1 , Z 2 Z 1 ≥ Z 2 ∑ n 1 , n 2 , l u n i q u e b n 1 n 2 l Z 1 Z 2 Z i [ 4 π 2 l + 1 ∑ m = − l l ( − 1 ) m ( ∑ j ∈ Z 1 P ˉ n 1 j i ( α , β ) Y l m ( r ^ j i ) ) ( ∑ k ∈ Z 2 P ˉ n 2 k i ( α , β ) Y l − m ( r ^ k i ) ) − δ Z 1 Z 2 ∑ j ∈ Z 1 P ˉ n 1 j i ( α , β ) P ˉ n 2 j i ( α , β ) ] . (59) \varepsilon_i^{(3)}=\sum_{\substack{Z_1,Z_2\\ Z_1\ge Z_2}}\sum_{n_1,n_2,l}^{\mathrm{unique}}b_{n_1n_2l}^{Z_1Z_2Z_i}\left[\frac{4\pi}{2l+1}\sum_{m=-l}^{l}(-1)^m\left(\sum_{j\in Z_1}\bar{P}_{n_1ji}^{(\alpha,\beta)}Y_l^m(\hat{r}_{ji})\right)\left(\sum_{k\in Z_2}\bar{P}_{n_2ki}^{(\alpha,\beta)}Y_l^{-m}(\hat{r}_{ki})\right)-\delta_{Z_1Z_2}\sum_{j\in Z_1}\bar{P}_{n_1ji}^{(\alpha,\beta)}\bar{P}_{n_2ji}^{(\alpha,\beta)}\right]. \tag*{(59)} ε i ( 3 ) = Z 1 , Z 2 Z 1 ≥ Z 2 ∑ n 1 , n 2 , l ∑ unique b n 1 n 2 l Z 1 Z 2 Z i 2 l + 1 4 π m = − l ∑ l ( − 1 ) m j ∈ Z 1 ∑ P ˉ n 1 j i ( α , β ) Y l m ( r ^ j i ) ( k ∈ Z 2 ∑ P ˉ n 2 k i ( α , β ) Y l − m ( r ^ k i ) ) − δ Z 1 Z 2 j ∈ Z 1 ∑ P ˉ n 1 j i ( α , β ) P ˉ n 2 j i ( α , β ) . (59)
so that, using the definition of the JL-atomic basis ((4))
{ ( J 1 L 1 ) n l m i , Z = ∑ j ∈ Z P ‾ n 1 j i ( α , β ) Y l m ( r ^ j i ) , ( J 2 L 0 ) n 1 n 2 i , Z = ∑ j ∈ Z P ‾ n 1 j i ( α , β ) P ‾ n 2 j i ( α , β ) , (60) \begin{cases}
(J_1L_1)_{nlm}^{i,Z} = \sum_{j\in Z} \overline{P}_{n_1ji}^{(\alpha,\beta)}Y_l^m(\hat{r}_{ji}),\\
(J_2L_0)_{n_1n_2}^{i,Z} = \sum_{j\in Z}\overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ji}^{(\alpha,\beta)}, \tag*{(60)}
\end{cases} { ( J 1 L 1 ) n l m i , Z = ∑ j ∈ Z P n 1 j i ( α , β ) Y l m ( r ^ j i ) , ( J 2 L 0 ) n 1 n 2 i , Z = ∑ j ∈ Z P n 1 j i ( α , β ) P n 2 j i ( α , β ) , (60)
ends the proof.
We remark that ( J 1 L 1 ) n l m i , Z (J_1L_1)_{nlm}^{i,Z} ( J 1 L 1 ) n l m i , Z is equivalent to the atomic basis presented in ACE [2 ] , A i n l m Z A_{inlm}^{Z} A in l m Z . Also the ( J 2 L 0 ) n 1 n 2 i , Z (J_2L_0)_{n_1n_2}^{i,Z} ( J 2 L 0 ) n 1 n 2 i , Z can be written in terms of the same atomic basis. Indeed, we have
P ‾ n 1 j i ( α , β ) P ‾ n 2 j i ( α , β ) = ∑ n = 2 c n n 1 n 2 P ‾ n j i ( α , β ) , (61) \overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ji}^{(\alpha,\beta)}=\sum_{n=2}c_n^{n_1n_2}\overline{P}_{nji}^{(\alpha,\beta)}, \tag*{(61)} P n 1 j i ( α , β ) P n 2 j i ( α , β ) = n = 2 ∑ c n n 1 n 2 P nj i ( α , β ) , (61)
since the Jacobi polynomials are complete. We use the double-vanishing Jacobi polynomials in the expansion since product on the LHS still vanishes at both the origin and the cut-off radius. The coefficients c n n 1 n 2 c_n^{n_1n_2} c n n 1 n 2 can be evaluated by mean of the integral
c n n 1 n 2 = A n ( α , β ) ∫ − 1 1 ( 1 − x ) α ( 1 + x ) β P ‾ n 1 ( α , β ) ( x ) P ‾ n 2 ( α , β ) ( x ) P n ( α , β ) ( x ) d x , (62) c_n^{n_1n_2}=A_n^{(\alpha,\beta)}\int_{-1}^{1}(1-x)^\alpha(1+x)^\beta\overline{P}_{n_1}^{(\alpha,\beta)}(x)\overline{P}_{n_2}^{(\alpha,\beta)}(x)P_n^{(\alpha,\beta)}(x)\,dx, \tag*{(62)} c n n 1 n 2 = A n ( α , β ) ∫ − 1 1 ( 1 − x ) α ( 1 + x ) β P n 1 ( α , β ) ( x ) P n 2 ( α , β ) ( x ) P n ( α , β ) ( x ) d x , (62)
where the normalization constant A n ( α , β ) A_n^{(\alpha,\beta)} A n ( α , β ) is [3 ]
A n ( α , β ) = 2 n + α + β + 1 2 α + β + 1 Γ ( n + α + β + 1 ) n ! Γ ( n + α + 1 ) Γ ( n + β + 1 ) , A_n^{(\alpha,\beta)}=\frac{2n+\alpha+\beta+1}{2^{\alpha+\beta+1}}\frac{\Gamma(n+\alpha+\beta+1)n!}{\Gamma(n+\alpha+1)\Gamma(n+\beta+1)}, A n ( α , β ) = 2 α + β + 1 2 n + α + β + 1 Γ ( n + α + 1 ) Γ ( n + β + 1 ) Γ ( n + α + β + 1 ) n ! ,
being Γ ( x ) \Gamma(x) Γ ( x ) the Gamma function. We then deduce that we can write
( J 2 L 0 ) n 1 n 2 i , Z = ∑ n = 2 c n n 1 n 2 ( J 1 L 1 ) n l 0 i , Z = ∑ n = 2 c n n 1 n 2 A i n l 0 Z . (63) (J_2L_0)_{n_1n_2}^{i,Z}=\sum_{n=2}c_n^{n_1n_2}(J_1L_1)_{nl0}^{i,Z}=\sum_{n=2}c_n^{n_1n_2}A_{inl0}^{Z}. \tag*{(63)} ( J 2 L 0 ) n 1 n 2 i , Z = n = 2 ∑ c n n 1 n 2 ( J 1 L 1 ) n l 0 i , Z = n = 2 ∑ c n n 1 n 2 A in l 0 Z . (63)
However evaluating the coefficients c n n 1 n 2 c_n^{n_1n_2} c n n 1 n 2 is not more efficient than simply perform the products of polynomials and keep more indexes. Also, by mean of eq. (18), we can say the self energy is effectively a 2B term and, as such, could be re-absorbed in lower order terms. However, not only the 2B cases do not necessarily share the same basis (the implied hyperparameters α \alpha α , β \beta β and the cut-off could all be different), but also, the maximum degree should be much larger than the one of the 3B cases. For these reasons, we introduced the JL-atomic basis in the first place, and we argue that the self-energy should be considered separately and subtracted explicitly. In this way, also the equivalence proved in this section is preserved, so that one could jump from the JL-atomic basis representation to the internal coordinate expansion at any moment, e.g. if the number of atoms in the neighborhood is small and, as such, the linear scaling is unnecessary.
Four-body
For the 4B local energy, ε i ( 4 ) \varepsilon_i^{(4)} ε i ( 4 ) , the equivalent expressions that one can use to go from the internal coordinate representation to the JL-atomic basis are
ε i ( 4 ) = ∑ ( j , k , p ) i ∑ n 1 n 2 n 3 l 1 l 2 l 3 u n i q u e a n 1 n 2 n 3 l 1 l 2 l 3 Z j Z k Z p Z i ∑ s y m m . ( P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) P ‾ n 3 p i ( α , β ) p l 1 j k i p l 2 j p i p l 3 k p i ) , (64) \varepsilon_i^{(4)}=\sum_{(j,k,p)_i}\sum_{\substack{n_1n_2n_3\\l_1l_2l_3}}^{\mathrm{unique}}a_{n_1n_2n_3l_1l_2l_3}^{Z_jZ_kZ_pZ_i}\sum^{\mathrm{symm.}}\left(\overline{P}_{n_1ji}^{(\alpha,\beta)}\overline{P}_{n_2ki}^{(\alpha,\beta)}\overline{P}_{n_3pi}^{(\alpha,\beta)}p_{l_1}^{jki}p_{l_2}^{jpi}p_{l_3}^{kpi}\right), \tag*{(64)} ε i ( 4 ) = ( j , k , p ) i ∑ n 1 n 2 n 3 l 1 l 2 l 3 ∑ unique a n 1 n 2 n 3 l 1 l 2 l 3 Z j Z k Z p Z i ∑ symm. ( P n 1 j i ( α , β ) P n 2 k i ( α , β ) P n 3 p i ( α , β ) p l 1 j k i p l 2 j p i p l 3 k p i ) , (64)
and
ε i ( 4 ) = ∑ Z 1 ≥ Z 2 ≥ Z 3 ∑ n 1 n 2 n 3 l 1 l 2 l 3 u n i q u e b n 1 n 2 n 3 l 1 l 2 l 3 Z 1 Z 2 Z 3 Z i [ C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 − S i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 ] . (65) \varepsilon_i^{(4)}=\sum_{Z_1\ge Z_2\ge Z_3}\sum_{\substack{n_1n_2n_3\\l_1l_2l_3}}^{\mathrm{unique}}b_{n_1n_2n_3l_1l_2l_3}^{Z_1Z_2Z_3Z_i}\left[C_{i,n_1n_2n_3l_1l_2l_3}^{(4),Z_1Z_2Z_3}-S_{i,n_1n_2n_3l_1l_2l_3}^{(4),Z_1Z_2Z_3}\right]. \tag*{(65)} ε i ( 4 ) = Z 1 ≥ Z 2 ≥ Z 3 ∑ n 1 n 2 n 3 l 1 l 2 l 3 ∑ unique b n 1 n 2 n 3 l 1 l 2 l 3 Z 1 Z 2 Z 3 Z i [ C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 − S i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 ] . (65)
where relation between coefficients is
b n 1 n 2 n 3 n i l 1 l 2 l 3 Z 1 Z 2 Z 3 Z i = [ 1 + δ Z 1 Z 2 δ n 1 n 2 δ l 2 l 3 + δ Z 2 Z 3 δ n 2 n 3 δ l 1 l 2 + δ Z 1 Z 2 δ Z 2 Z 3 ( δ n 1 n 3 δ l 1 l 3 + 2 δ n 1 n 3 δ n 2 n 3 δ l 1 l 3 δ l 1 l 2 ) ] − 1 a n 1 n 2 n 3 n i l 1 l 2 l 3 Z 1 Z 2 Z 3 Z i (66) b^{Z_{1}Z_{2}Z_{3}Z_{i}}_{n_{1}n_{2}n_{3}n_{i}l_{1}l_{2}l_{3}} = \left[1+\delta_{Z_{1}Z_{2}}\delta_{n_{1}n_{2}}\delta_{l_{2}l_{3}}+\delta_{Z_{2}Z_{3}}\delta_{n_{2}n_{3}}\delta_{l_{1}l_{2}}+\delta_{Z_{1}Z_{2}}\delta_{Z_{2}Z_{3}}\left(\delta_{n_{1}n_{3}}\delta_{l_{1}l_{3}}+2\delta_{n_{1}n_{3}}\delta_{n_{2}n_{3}}\delta_{l_{1}l_{3}}\delta_{l_{1}l_{2}}\right)\right]^{-1}a^{Z_{1}Z_{2}Z_{3}Z_{i}}_{n_{1}n_{2}n_{3}n_{i}l_{1}l_{2}l_{3}} \tag*{(66)} b n 1 n 2 n 3 n i l 1 l 2 l 3 Z 1 Z 2 Z 3 Z i = [ 1 + δ Z 1 Z 2 δ n 1 n 2 δ l 2 l 3 + δ Z 2 Z 3 δ n 2 n 3 δ l 1 l 2 + δ Z 1 Z 2 δ Z 2 Z 3 ( δ n 1 n 3 δ l 1 l 3 + 2 δ n 1 n 3 δ n 2 n 3 δ l 1 l 3 δ l 1 l 2 ) ] − 1 a n 1 n 2 n 3 n i l 1 l 2 l 3 Z 1 Z 2 Z 3 Z i (66)
which takes care of the division by 2 or by 6 when necessary (to properly take into account the symmetric cases), the coupling term is
C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = ( 4 π ) 3 ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) ∑ m 1 m 2 m 3 ( − 1 ) m 1 + m 2 + m 3 ( J 1 L 2 ) n 1 l 1 m 1 l 2 − m 2 i , Z 1 ( J 1 L 2 ) n 2 l 3 m 3 l 1 − m 1 i , Z 2 ( J 1 L 2 ) n 3 l 2 m 2 l 3 − m 3 i , Z 3 (67) C^{(4),Z_{1}Z_{2}Z_{3}}_{i,n_{1}n_{2}n_{3}l_{1}l_{2}l_{3}}=\frac{(4\pi)^{3}}{(2l_{1}+1)(2l_{2}+1)(2l_{3}+1)}\sum_{m_{1}m_{2}m_{3}}(-1)^{m_{1}+m_{2}+m_{3}}(J_{1}L_{2})^{i,Z_{1}}_{n_{1}l_{1}m_{1}l_{2}-m_{2}}(J_{1}L_{2})^{i,Z_{2}}_{n_{2}l_{3}m_{3}l_{1}-m_{1}}(J_{1}L_{2})^{i,Z_{3}}_{n_{3}l_{2}m_{2}l_{3}-m_{3}} \tag*{(67)} C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) ( 4 π ) 3 m 1 m 2 m 3 ∑ ( − 1 ) m 1 + m 2 + m 3 ( J 1 L 2 ) n 1 l 1 m 1 l 2 − m 2 i , Z 1 ( J 1 L 2 ) n 2 l 3 m 3 l 1 − m 1 i , Z 2 ( J 1 L 2 ) n 3 l 2 m 2 l 3 − m 3 i , Z 3 (67)
and the self energy term is
S i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = δ Z 1 Z 2 ( 4 π ) 2 ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) ∑ m 2 m 3 ( − 1 ) m 2 + m 3 ( J 2 L 2 ) n 1 n 2 l 2 m 2 l 3 m 3 i , Z 1 ( J 1 L 2 ) n 3 l 2 − m 2 l 3 − m 3 i , Z 3 + δ Z 2 Z 3 ( 4 π ) 2 ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ∑ m 1 m 2 ( − 1 ) m 1 + m 2 ( J 2 L 2 ) n 2 n 3 l 1 m 1 l 2 m 2 i , Z 2 ( J 1 L 2 ) n 1 l 1 − m 1 l 2 − m 2 i , Z 1 + δ Z 1 Z 2 δ Z 2 Z 3 [ ( 4 π ) 2 ( 2 l 1 + 1 ) ( 2 l 3 + 1 ) ∑ m 1 m 3 ( − 1 ) m 1 + m 3 ( J 2 L 2 ) n 1 n 3 l 1 m 1 l 3 m 3 i , Z 1 ( J 1 L 2 ) n 2 l 1 − m 1 l 3 − m 3 i , Z 1 + ( J 3 L 0 ) n 1 n 2 n 3 i , Z 1 ] (68) S^{(4),Z_{1}Z_{2}Z_{3}}_{i,n_{1}n_{2}n_{3}l_{1}l_{2}l_{3}}=\delta_{Z_{1}Z_{2}}\frac{(4\pi)^{2}}{(2l_{2}+1)(2l_{3}+1)}\sum_{m_{2}m_{3}}(-1)^{m_{2}+m_{3}}(J_{2}L_{2})^{i,Z_{1}}_{n_{1}n_{2}l_{2}m_{2}l_{3}m_{3}}(J_{1}L_{2})^{i,Z_{3}}_{n_{3}l_{2}-m_{2}l_{3}-m_{3}}
+\delta_{Z_{2}Z_{3}}\frac{(4\pi)^{2}}{(2l_{1}+1)(2l_{2}+1)}\sum_{m_{1}m_{2}}(-1)^{m_{1}+m_{2}}(J_{2}L_{2})^{i,Z_{2}}_{n_{2}n_{3}l_{1}m_{1}l_{2}m_{2}}(J_{1}L_{2})^{i,Z_{1}}_{n_{1}l_{1}-m_{1}l_{2}-m_{2}}
+\delta_{Z_{1}Z_{2}}\delta_{Z_{2}Z_{3}}\left[\frac{(4\pi)^{2}}{(2l_{1}+1)(2l_{3}+1)}\sum_{m_{1}m_{3}}(-1)^{m_{1}+m_{3}}(J_{2}L_{2})^{i,Z_{1}}_{n_{1}n_{3}l_{1}m_{1}l_{3}m_{3}}(J_{1}L_{2})^{i,Z_{1}}_{n_{2}l_{1}-m_{1}l_{3}-m_{3}}+(J_{3}L_{0})^{i,Z_{1}}_{n_{1}n_{2}n_{3}}\right] \tag*{(68)} S i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = δ Z 1 Z 2 ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) ( 4 π ) 2 m 2 m 3 ∑ ( − 1 ) m 2 + m 3 ( J 2 L 2 ) n 1 n 2 l 2 m 2 l 3 m 3 i , Z 1 ( J 1 L 2 ) n 3 l 2 − m 2 l 3 − m 3 i , Z 3 + δ Z 2 Z 3 ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( 4 π ) 2 m 1 m 2 ∑ ( − 1 ) m 1 + m 2 ( J 2 L 2 ) n 2 n 3 l 1 m 1 l 2 m 2 i , Z 2 ( J 1 L 2 ) n 1 l 1 − m 1 l 2 − m 2 i , Z 1 + δ Z 1 Z 2 δ Z 2 Z 3 [ ( 2 l 1 + 1 ) ( 2 l 3 + 1 ) ( 4 π ) 2 m 1 m 3 ∑ ( − 1 ) m 1 + m 3 ( J 2 L 2 ) n 1 n 3 l 1 m 1 l 3 m 3 i , Z 1 ( J 1 L 2 ) n 2 l 1 − m 1 l 3 − m 3 i , Z 1 + ( J 3 L 0 ) n 1 n 2 n 3 i , Z 1 ] (68)
The derivation of the equivalence between (19) and (20), closely follows the one for the 3B case. The only remark is that here we choose the arrangement
∑ ( j , k , p ) i = ∑ Z 1 , Z 2 , Z 3 Z 1 ≥ Z 2 ≥ Z 3 ∑ ( j , k , p ) i j ∈ Z 1 , k ∈ Z 2 , p ∈ Z 3 (69) \sum_{(j,k,p)_{i}}=\sum_{\substack{Z_{1},Z_{2},Z_{3}\\ Z_{1}\ge Z_{2}\ge Z_{3}}}\sum_{\substack{(j,k,p)_{i}\\ j\in Z_{1},k\in Z_{2},p\in Z_{3}}} \tag*{(69)} ( j , k , p ) i ∑ = Z 1 , Z 2 , Z 3 Z 1 ≥ Z 2 ≥ Z 3 ∑ ( j , k , p ) i j ∈ Z 1 , k ∈ Z 2 , p ∈ Z 3 ∑ (69)
implying that one have to consider explicitly when in presence of atoms of the same species. This gives raise to all the possible cases that are present in the coefficients relation (21) and in the self energy (23). The coupling term will be compared to the one proposed for the Bispectrum components [4 ] , and so it is useful to explicitly show that, once the rearrangement is made and the constraints on the summations over the atoms in the neighborhood are relieved, one obtains
C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = ∑ j ∈ Z 1 k ∈ Z 2 p ∈ Z 3 P ‾ n 1 j i ( α , β ) P ‾ n 2 k i ( α , β ) P ‾ n 3 p i ( α , β ) P l 1 j k i P l 2 j p i P l 3 k p i . (70) C^{(4),Z_{1}Z_{2}Z_{3}}_{i,n_{1}n_{2}n_{3}l_{1}l_{2}l_{3}}=\sum_{\substack{j\in Z_{1}\\ k\in Z_{2}\\ p\in Z_{3}}}\overline{P}^{(\alpha,\beta)}_{n_{1}ji}\overline{P}^{(\alpha,\beta)}_{n_{2}ki}\overline{P}^{(\alpha,\beta)}_{n_{3}pi}P^{jki}_{l_{1}}P^{jpi}_{l_{2}}P^{kpi}_{l_{3}}. \tag*{(70)} C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 = j ∈ Z 1 k ∈ Z 2 p ∈ Z 3 ∑ P n 1 j i ( α , β ) P n 2 k i ( α , β ) P n 3 p i ( α , β ) P l 1 j k i P l 2 j p i P l 3 k p i . (70)
Now, by applying the addition theorem for spherical harmonics (13) three times, and by separating the contributions for each atoms, we get (22). From here, it is clear why we use the terms ( J 1 L 2 ) i , Z (J_{1}L_{2})^{i,Z} ( J 1 L 2 ) i , Z : indeed, for each atoms, the expression presents one double-vanishing Jacobi polynomials and two Legendre polynomials. Moreover, by using the property
Y l 1 m 1 ( r ^ ) Y l 2 m 2 ( r ^ ) = ∑ l m ( − 1 ) m ( 2 l + 1 ) ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) 4 π ( l 1 l 2 l 0 0 0 ) ( l 1 l 2 l m 1 m 2 − m ) Y l m ( r ^ ) , (71) Y^{m_{1}}_{l_{1}}(\hat{r})Y^{m_{2}}_{l_{2}}(\hat{r})=\sum_{lm}(-1)^{m}\sqrt{\frac{(2l+1)(2l_{1}+1)(2l_{2}+1)}{4\pi}}\begin{pmatrix}l_{1}&l_{2}&l\\0&0&0\end{pmatrix}\begin{pmatrix}l_{1}&l_{2}&l\\m_{1}&m_{2}&-m\end{pmatrix}Y^{m}_{l}(\hat{r}), \tag*{(71)} Y l 1 m 1 ( r ^ ) Y l 2 m 2 ( r ^ ) = l m ∑ ( − 1 ) m 4 π ( 2 l + 1 ) ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( l 1 0 l 2 0 l 0 ) ( l 1 m 1 l 2 m 2 l − m ) Y l m ( r ^ ) , (71)
for the product of two spherical harmonics (with the use of the 3j-Wigner symbols [1 ] ), one can deduce the analogous relation between ( J 1 L 2 ) n l 1 m 1 l 2 m 2 i , Z (J_{1}L_{2})^{i,Z}_{nl_{1}m_{1}l_{2}m_{2}} ( J 1 L 2 ) n l 1 m 1 l 2 m 2 i , Z and the atomic basis A i n l m Z A^{Z}_{inlm} A in l m Z
( J 1 L 2 ) n l 1 m 1 l 2 m 2 i , Z = ∑ l m ( − 1 ) m ( 2 l + 1 ) ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) 4 π ( l 1 l 2 l 0 0 0 ) ( l 1 l 2 l m 1 m 2 − m ) A i n l m Z . (72) (J_{1}L_{2})^{i,Z}_{nl_{1}m_{1}l_{2}m_{2}}=\sum_{lm}(-1)^{m}\sqrt{\frac{(2l+1)(2l_{1}+1)(2l_{2}+1)}{4\pi}}\begin{pmatrix}l_{1}&l_{2}&l\\0&0&0\end{pmatrix}\begin{pmatrix}l_{1}&l_{2}&l\\m_{1}&m_{2}&-m\end{pmatrix}A^{Z}_{inlm}. \tag*{(72)} ( J 1 L 2 ) n l 1 m 1 l 2 m 2 i , Z = l m ∑ ( − 1 ) m 4 π ( 2 l + 1 ) ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( l 1 0 l 2 0 l 0 ) ( l 1 m 1 l 2 m 2 l − m ) A in l m Z . (72)
Connecting the internal coordinate representation with the bispectrum components
In this section, we report how the 4B coupling term, C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 C^{(4),Z_{1}Z_{2}Z_{3}}_{i,n_{1}n_{2}n_{3}l_{1}l_{2}l_{3}} C i , n 1 n 2 n 3 l 1 l 2 l 3 ( 4 ) , Z 1 Z 2 Z 3 , can be written as a linear combination of bispectrum components. The expression shows how to sum bispectrum components so that the result is cast in terms of internal coordinate only (resulting in the coupling term). We note that, while the bispectrum components are more general, because they can distinguish reflections, the internal-coordinate representation lacks this property. Writing the bispectrum components in the ACE formalism, that is, by using the 3j-Wigner symbols, as
Figure 1 (PDF p. 21). Parity plots on the training set for (a) energies, (b) forces, (c) virial stress.
B i , n 1 n 2 n 3 ( 3 ) , Z 1 Z 2 Z 3 l 1 l 2 l 3 = ∑ m 1 m 2 m 3 ( l 1 l 2 l 3 m 1 m 2 m 3 ) A i n 1 l 1 m 1 Z 1 A i n 2 l 2 m 2 Z 2 A i n 3 l 3 m 3 Z 3 , (73) B^{(3),Z_{1}Z_{2}Z_{3}}_{i,n_{1}n_{2}n_{3}}{}_{l_{1}l_{2}l_{3}} = \sum_{m_{1}m_{2}m_{3}} \begin{pmatrix} l_{1} & l_{2} & l_{3} \\ m_{1} & m_{2} & m_{3} \end{pmatrix} A^{Z_{1}}_{in_{1}l_{1}m_{1}} A^{Z_{2}}_{in_{2}l_{2}m_{2}} A^{Z_{3}}_{in_{3}l_{3}m_{3}}, \tag*{(73)} B i , n 1 n 2 n 3 ( 3 ) , Z 1 Z 2 Z 3 l 1 l 2 l 3 = m 1 m 2 m 3 ∑ ( l 1 m 1 l 2 m 2 l 3 m 3 ) A i n 1 l 1 m 1 Z 1 A i n 2 l 2 m 2 Z 2 A i n 3 l 3 m 3 Z 3 , (73)
it holds that
C i , n 1 n 2 n 3 ( 4 ) , Z 1 Z 2 Z 3 l 1 l 2 l 3 = ( 4 π ) 3 ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) ∑ L 1 L 2 L 3 w l 1 l 2 l 3 L 1 L 2 L 3 B i , L 1 L 2 L 3 ( 3 ) , Z 1 Z 2 Z 3 , (74) C^{(4),Z_{1}Z_{2}Z_{3}}_{i,n_{1}n_{2}n_{3}}{}_{l_{1}l_{2}l_{3}} = \frac{(4\pi)^3}{(2l_{1}+1)(2l_{2}+1)(2l_{3}+1)} \sum_{L_{1}L_{2}L_{3}} w^{L_{1}L_{2}L_{3}}_{l_{1}l_{2}l_{3}} B^{(3),Z_{1}Z_{2}Z_{3}}_{i,L_{1}L_{2}L_{3}}, \tag*{(74)} C i , n 1 n 2 n 3 ( 4 ) , Z 1 Z 2 Z 3 l 1 l 2 l 3 = ( 2 l 1 + 1 ) ( 2 l 2 + 1 ) ( 2 l 3 + 1 ) ( 4 π ) 3 L 1 L 2 L 3 ∑ w l 1 l 2 l 3 L 1 L 2 L 3 B i , L 1 L 2 L 3 ( 3 ) , Z 1 Z 2 Z 3 , (74)
with the expansion coefficients, w l 1 l 2 l 3 L 1 L 2 L 3 w^{L_{1}L_{2}L_{3}}_{l_{1}l_{2}l_{3}} w l 1 l 2 l 3 L 1 L 2 L 3 , defined as
w l 1 l 2 l 3 L 1 L 2 L 3 = ( − 1 ) L 1 + L 2 + L 3 + l 1 + l 2 + l 3 ( l 1 l 2 L 1 0 0 0 ) ( l 3 l 1 L 2 0 0 0 ) ( l 2 l 3 L 3 0 0 0 ) { L 3 L 2 L 1 l 1 l 2 l 3 } . (75) w^{L_{1}L_{2}L_{3}}_{l_{1}l_{2}l_{3}} = (-1)^{L_{1}+L_{2}+L_{3}+l_{1}+l_{2}+l_{3}} \begin{pmatrix} l_{1} & l_{2} & L_{1} \\ 0 & 0 & 0 \end{pmatrix} \begin{pmatrix} l_{3} & l_{1} & L_{2} \\ 0 & 0 & 0 \end{pmatrix} \begin{pmatrix} l_{2} & l_{3} & L_{3} \\ 0 & 0 & 0 \end{pmatrix} \left\{ \begin{matrix} L_{3} & L_{2} & L_{1} \\ l_{1} & l_{2} & l_{3} \end{matrix} \right\}. \tag*{(75)} w l 1 l 2 l 3 L 1 L 2 L 3 = ( − 1 ) L 1 + L 2 + L 3 + l 1 + l 2 + l 3 ( l 1 0 l 2 0 L 1 0 ) ( l 3 0 l 1 0 L 2 0 ) ( l 2 0 l 3 0 L 3 0 ) { L 3 l 1 L 2 l 2 L 1 l 3 } . (75)
The expansion coefficients are here written in terms of 3j- and 6j-Wigner symbols [1 ] . Given eq. (25), this expression can be proven by expanding the Legendre polynomials as in eq. (13), contracting spherical harmonics with the same argument as in eq. (26), and using the contraction rule for the 3j-Wigner symbols given in http://functions.wolfram.com/07.39.23.0012.01. Finally rearranging all the term using the symmetry properties of the 3j-Wigner symbols and the complex conjugate of spherical harmonics, leads directly to the expressions above.
Fit on the carbon dataset
We report here, in Fig. 1, the parity plots on the prediction set for the energies, the forces and the stress. In Fig. 2, we also reported a hierarchical study showing the improvement with increasing body order of the fit. There, it can be appreciated how the 2B fit performs very badly on the energy, as expected from the reduced number of features, while the 3B significantly improve the fit. However it still does not discriminate well between two crystalline phases present in the dataset, for which we need the 4B. Also, while the fit on the forces performs unexpectedly well already at the 2B level, given just the 11 features used, it still requires higher body order to reach satisfactory accuracy levels. The hyperparameters for this two fits (2B and 2B+3B) are the same of the one reported in the main text.
Figure 2 (PDF p. 22). Parity plots on the test set for (a) energies, (b) forces, (c) virial stress with increasing body order. The RMSE are reported for each plot.