<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Expanding density-correlation machine learning representations for anisotropic coarse-grained particles</title></titleStmt>
			<publicationStmt>
				<publisher>AIP Publishing</publisher>
				<date>08/21/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10578282</idno>
					<idno type="doi">10.1063/5.0210910</idno>
					<title level='j'>The Journal of Chemical Physics</title>
<idno>0021-9606</idno>
<biblScope unit="volume">161</biblScope>
<biblScope unit="issue">7</biblScope>					

					<author>Arthur Lin</author><author>Kevin K Huguenin-Dumittan</author><author>Yong-Cheol Cho</author><author>Jigyasa Nigam</author><author>Rose K Cersonsky</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[<p>Physics-based, atom-centered machine learning (ML) representations have been instrumental to the effective integration of ML within the atomistic simulation community. Many of these representations build off the idea of atoms as having spherical, or isotropic, interactions. In many communities, there is often a need to represent groups of atoms, either to increase the computational efficiency of simulation via coarse-graining or to understand molecular influences on system behavior. In such cases, atom-centered representations will have limited utility, as groups of atoms may not be well-approximated as spheres. In this work, we extend the popular Smooth Overlap of Atomic Positions (SOAP) ML representation for systems consisting of non-spherical anisotropic particles or clusters of atoms. We show the power of this anisotropic extension of SOAP, which we deem AniSOAP, in accurately characterizing liquid crystal systems and predicting the energetics of Gay–Berne ellipsoids and coarse-grained benzene crystals. With our study of these prototypical anisotropic systems, we derive fundamental insights on how molecular shape influences mesoscale behavior and explain how to reincorporate important atom–atom interactions typically not captured by coarse-grained models. Moving forward, we propose AniSOAP as a flexible, unified framework for coarse-graining in complex, multiscale simulation.</p>]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>In understanding molecular interactions and modeling their resultant behavior, it is very often a worthwhile endeavor to group (i.e. coarse-grain) one or more atoms as a theoretical "unit" or particle. This choice can be practical; often, the time-and length-scales necessary to simulate molecular processes limit our ability to simulate with all-atom resolution. Conversely, choosing particle-based, rather than atom-based computational approaches can also be a scientific choice; when we selectively limit the degrees of freedom within our systems, we can identify factors that are causal to molecular behavior or phenomena. Thus, these simplified coarsegrained simulation approaches serve as both a tool and a lens with which to study chemical systems.</p><p>Similarly, machine learning (ML) methods have emerged as a powerful tool for scientific inquiry, with the ability to elucidate new patterns within or relationships between chemical spaces and observed properties, often in order to predict the properties of unseen systems. So, how do we incorporate the idea of atom grouping in the context of machine learning? Many approaches consider our configurational space as a manifold and use a variety of machine learning architectures (variational <ref type="bibr">1,</ref><ref type="bibr">2</ref> and hierarchical 3 auto-encoders, different forms of neural networks <ref type="bibr">[4]</ref><ref type="bibr">[5]</ref><ref type="bibr">[6]</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref> , ensemble learning <ref type="bibr">9</ref> ) to determine a latent space in which this grouping is implicitly embedded that minimizes a chosen fitness function. Despite high performance and generalizability, these end-to-end models are often limited by data requirements or in fundamental analyses by their lack of intrinsic interpretability.</p><p>Another approach within the machine-learning community is so-called feature-forward modeling, wherein one explicitly transforms the raw chemical data into numerical "features" that reflect the underlying physics or chemistry of interest prior to applying ML methods. While both end-to-end and feature-forward approaches have merits and overlaps, the latter method is often noted for its interpretability and comparable performance using shallower ML architectures <ref type="bibr">[10]</ref><ref type="bibr">[11]</ref><ref type="bibr">[12]</ref> . Within this umbrella of approaches, there are many ways to encode the raw chemical data into features, and the suitable choice depends entirely on the scientific context. For cheminformatics, wherein we are often looking to compare different chemistries or identify the role of specific functional groups, string-based featurizations such as SMILES <ref type="bibr">13</ref> or SELFIES <ref type="bibr">14</ref> are popular, as they encode important parameters such as present functional groups and connectivity and can be parsed using natural language processing (NLP) models and other text-based technologies. However, in thermodynamic contexts where the chemistry and connectivity remain largely unchanged, such as in molecular simulation, it is more typical to use configuration-dependent features <ref type="bibr">12,</ref><ref type="bibr">15</ref> , including Behler-Parinello symmetry functions <ref type="bibr">16</ref> , smooth overlap of atomic positions (SOAP) <ref type="bibr">17</ref> , and molecular graphs <ref type="bibr">18</ref> .</p><p>So, for coarse-grained systems, how do we apply a featureforward approach? A large challenge is that groups of atoms, hereon referred to as "particles", are non-isotropic, and so methods based on atomistic ML will fail to capture the anisotropy of interparticle interactions. Frameworks based on density expansions (e.g., SOAP <ref type="bibr">17</ref> , NICE <ref type="bibr">19</ref> ) present a compelling avenue for expansion, given that they can putatively be made flexible to any density expansion, even anisotropic density fields or hard particle volumes. Furthermore, by ex-tending these frameworks to isolate molecule-level interactions within atom-atom site potentials, we gain the ability to combine or compare representations across multiple scales.</p><p>Here, we propose and demonstrate the first such anisotropic expansion of symmetrized density-based frameworks for ML representations by taking the popular SOAP (Smooth Overlap of Atomic Positions) formalism and demonstrating its expansion to simple anisotropic bodies, in a representation we deem AniSOAP , which can be read as either "The Smooth Overlap of Anisotropic Particles" or "Anisotropic-SOAP". While here we demonstrate the expansion for multivariate Gaussian densities, similar expansions can be made for arbitrary anisotropic density fields.</p><p>In Section II, we provide the underlying mathematical theory behind this expansion, including how deliberate selection of basis sets enables analytical evaluation of the expansion coefficients. In Section III, we demonstrate three performancedefining case studies for its usage across multiple simulation length scales and materials systems. We start by analyzing two classic cases of explicitly ellipsoidal particles: liquid crystalline configurations and those governed by the Gay-Berne interaction potential. In doing so, we show the conceptual overlap and divergence of AniSOAP from traditional mesoscale order parameters, as well as its ability to generalize to supervised tasks. Then, we analyze a set of systems that is only implicitly ellipsoidal -benzene molecules arranged in stable and unstable crystalline configurations, and show that AniSOAP can be used to provide molecule-level approximations to first-principles energetics. We then couple AniSOAP with the traditional SOAP formalism to demonstrate how to combine representations across multiple scales. The corresponding open-source code, AniSOAP , is available at github.com/cersonsky-lab/anisoap.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. THEORY</head><p>In the traditional formalism for SOAP and related representations, we treat each atom as a localized isotropic field in three dimensions and construct an "atom-density" by summing over all neighboring atoms within a spherical shell. The atom-density is usually written on a basis of radial and angular functions, the latter of which are chosen to be spherical harmonics to make the atom-density more easily amenable to rotational symmetrization.. To represent the many-body nature of these atoms, we can then compute n-body correlations of these density expansions or introduce message-passing into the featurization formalism <ref type="bibr">20,</ref><ref type="bibr">21</ref> .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. The Effect of Symmetry Breaking in Density Frameworks</head><p>Using the braket notation prescribed in Ref. 22, the contribution of an atom j to center atom i's expansion coefficients are given by</p><p>General Variables r r r a vector in Cartesian space r magnitude of vector r r r r direction of vector r r r r r r i j the vector between point i and point j R a 3x3 rotation matrix x x x a feature vector for one configuration X X X a matrix containing, as rows, feature vectors for multiple configurations Density Expansions g(r r r) a potentially anisotropic density function centered at r r r &#961; TABLE I. Notation Guide. Throughout the text, we adopt the notation typical of the atom-centered symmetrized representation community as detailed in the table above.</p><p>where g(r r r) is a localized function (usually a Gaussian), R nl (r) is a radial basis function, and Y m l (r) are spherical harmonics. For a general g(r r r) and R nl (r), there is no hope to evaluate this analytically. There is not even a general way to evaluate a general one-dimensional integral f (x)dx, which is why, after all, there are so many books on integral tables.</p><p>If we use any arbitrary density g(r r r), e.g. to model more closely the shape of rigid molecules, nanoparticles, or arbitrary bodies, we are forced to use numerical integration, which could be done using Lebedev grids. A fully numerical implementation would also provide us with complete freedom regarding the choice of the radial basis function R nl , which would allow us to choose the basis based on nice mathematical properties like the Laplacian eigenstate (LE) basis <ref type="bibr">23</ref> . The main downside of the numerical approach, at least for sufficiently general densities g(r r r), is the inevitable and potentially severe numerical cost-accuracy trade-off. The necessary inaccuracies introduced by numerical integration may negate the fidelity of the anisotropic density field, thus, we would therefore like to examine the possibility of a fully analytical approach for the evaluation of these coefficients.</p><p>For isotropic representations, it is traditional to do an implicit transformation to align r r r i j onto the zaxis of our coordinate system, eliminating any dependence of g(r r r -r r r i j ) on the angular integrands. This simplifies (1), even for complicated bases, to</p><p>This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset.</p><p>PLEASE CITE THIS ARTICLE AS DOI: 10.1063/5.0210910</p><p>where F(r i j ) is some function that contains the complete dependence on the distance between the two atoms. The angular dependence is fully captured in the spherical harmonic factor, allowing us to precompute F(r r r i j ) on the full relevant interval for efficient spline evaluations <ref type="bibr">22</ref> .</p><p>For non-isotropic densities, however, this is no longer the case. Even taking the relatively simple case of a multivariate Gaussian, we cannot decouple our radial (e.g., distance) and angular components, as the Gaussian requires a transformation into the three principal components &#963; 1 , &#963; 2 , &#963; 3 and corresponding axes. In order to maintain consistency with (1), we replace all instances of r r r with RR T r r r, where R is our rotation matrix into this component axis. We then simplify by changing our axes of integration from r r r to r r r &#8242; &#8801; R T r r r and noting that r = RR T r to obtain</p><p>To perform the rotation of our spherical harmonics, one commonly sums over Wigner-D matrices <ref type="bibr">24</ref> to obtain</p><p>With this step, we can reduce our calculation in the special case in which the matrix D l mm &#8242; (R) is diagonal, which proves useful for analytical evaluation techniques. We thus focus on the factor</p><p>which will be the focus of our discussion from hereon.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Multivariate Gaussian Densities</head><p>The simplest anisotropic function that can be put in place of g(r) in ( <ref type="formula">5</ref>) is the multivariate Gaussian density (hereon MVG). The goal of this subsection is to show that by choosing g(r r r) to be an MVG and R nl (r) to be of the monomial, GTO, or STO form, we can reduce the evaluation of the expansion coefficient to the evaluation of integrals of the form</p><p>2 (r r r-r r r i j ) T D D D(r r r-r r r i j ) p(r r r),</p><p>where p(r r r) is some polynomial expression in r r r &#8801; (x, y, z) and D D D is some 3 &#215; 3 diagonal matrix. Consider the three-dimensional Gaussian defined by</p><p>where A is a symmetric and (strictly) positive definite 3 &#215; 3 matrix. Any matrix satisfying these two conditions can be orthogonally diagonalized, also called the principal axis decomposition, allowing us to write</p><p>where R &#8712; SO(3) is a rotation matrix that specifies the three principal axes and</p><p>is a diagonal matrix containing the widths &#963; j of the Gaussian along the three principal directions. With this decomposition, we can write</p><p>where r r r &#8242; = R T r r r are the coordinates with respect to the principal axes.</p><p>Putting the equation for our MVG into (5), we get</p><p>We have now set the stage for the evaluation of the general coefficient. Our goal is to choose a suitable radial basis that would allow us to evaluate the coefficients analytically. One possibility is to use certain polynomial bases, which is motivated by the fact that for any n = 0, 1, 2, . . . , we have</p><p>where &#915; is the gamma function. If we could reduce the evaluation of the integral (6) to such (multivariate) polynomials, this might provide us with analytical expressions for the expansion coefficients. Thus, following (13), we require that R nl (r)Y m l (r) is a polynomial. Integrability of Monomial Basis We will first show that when R nl (r) = r l+2n , the expansion coefficients can be evaluated analytically. First, we separate R nl (r) into two factors, where</p><p>Given that r l Y m l (r) is a polynomial in (x, y, z), as is r 2 = x 2 + y 2 + z 2 and thus, so is (r 2 ) n , the monomial basis can be analytically integrated.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Integrability of GTO Basis</head><p>With one extra step, we can also show that a suitable modification of the GTO basis,</p><p>2&#963; 2 , provides an equally well-suited basis. . This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS DOI: 10.1063/5.0210910</head><p>By separating out all the exponential and polynomial factors, we can write the integrand as</p><p>We can see that this is again an exponential of a (now different) quadratic form multiplied by a polynomial in (x, y, z), which can be integrated analytically.</p><p>Concluding this section, we can see that for both choices of the basis, the final expression we need to evaluate is of the form</p><p>with R m l (r r r) = r l Y m l (r) and where the diagonal matrix D D D is either the one directly obtained from the principal components of the Gaussian density (monomial basis), or the modified version (GTO basis). Similar arguments can be made for Slatertype orbitals (STO), which follow a similar form to the GTO basis. From this expansion, we can then calculate n-body correlations for a given particle, which for the 3-body term is</p><p>where &#10216;nlm|&#961; i &#10217; = &#8721; j &#10216;nlm|&#961; i j &#10217; . We go through the details on analytically computing eq. 17 in Appendix A 2-A 7. We first detail how to convert r 2n R m l into a cartesian polynomial (A 2, A 5), then detail how to evaluate the integrals (i.e. moments of the MVG) in A 3 and A 6. A 4 gives an overview of how these steps are combined together to result in evaluating a weighted sum of high-order moments of the MVG. Finally, we discuss imposing orthonormality within the basis set in Appendix A 7 via L&#246;wdin symmetric orthogonalization <ref type="bibr">25</ref> .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. RESULTS AND DISCUSSION</head><p>Even for general point clouds, determining the optimal anisotropic analog is non-trivial, and the focus of ongoing work <ref type="bibr">26</ref> . Thus, we choose to demonstrate the efficacy of AniSOAP on systems where the choice of an ellipsoidal proxy is trivial, being both historically founded and well-defined. We ground our expansion in the rich history of identifying causal mechanisms through anisotropic proxy particles 27 , as many complex behaviors within molecular systems can be explained by analyzing the steric interactions of their molecular volumes <ref type="bibr">[28]</ref><ref type="bibr">[29]</ref><ref type="bibr">[30]</ref><ref type="bibr">[31]</ref><ref type="bibr">[32]</ref> . Future studies will focus on optimizing AniSOAP for less trivial cases and further varieties of molecular anisotropy.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Ellipsoids in Liquid Crystals</head><p>In Sections III A-III B, we start by analyzing two archetypal ellipsoidal systems: particles in different liquid crystalline (LC) phases, and particles governed by the classical Gay-Berne potential. These case studies demonstrate the similarities and differences between AniSOAP and traditional LC order parameters, namely the orientational (or nematic) order parameter and pair-wise Steinhardt order parameters, and examine the ability of AniSOAP to perform continuous supervised tasks. In Section III C, we then move to the opposite end of the molecular spectrum and analyze benzene crystals -molecules that are ellipsoidal in shape but whose atomic interactions are complex and fundamental to their interaction landscape. Of the systems that ellipsoidal AniSOAP is already well-suited to describe, these cases provide a relative upper-and lower-bound to model performance from a system where interactions are, by definition, entirely defined by the ellipsoidal correlations to those where the energetics are minimally determined by the shape of the molecule alone.</p><p>Unless otherwise specified, when discussing X AniSOAP , we are referring to the power spectrum (the 3-body term) given in Eq. 18, but note the simplicity of continuing onto higher body-order terms for greater accuracy and transferability <ref type="bibr">19</ref> .</p><p>Liquid crystals (LC) are mesoscopic phases that form from rigid ellipsoid-like particles or molecules and can be controlled to direct the flow of light for a variety of applications. <ref type="bibr">33</ref> Typically, LCs are characterized as phases with orientational order but limited positional or translational order. Molecules with orientational order but no translational order are generally considered "nematic", whereas those exhibiting one direction of translational order (e.g. the particles appear as stacking planes, where within the planes, there is little translational order) are deemed smectic.</p><p>In this analysis, we aim to show how our new AniSOAP representation is similar to previously established descriptors and how it enables functionality and analyses beyond the current capabilities. In characterizing LC phases, scientists have relied on a library of different order parameters, including different orientational order parameters <ref type="bibr">34</ref> to classify the orientational alignment of particles, Steinhardt order parameters (SOPs <ref type="bibr">35</ref> ) to characterize the neighborhood of different particles. We note the similarity of SOPs to Eq. ( <ref type="formula">2</ref>), wherein an SOP for a given particle involves the integration of spherical harmonics over that particle's neighbors:</p><p>where j is a neighbor of i, and weights w i j can be introduced based on neighbor distances or Voronoi tesselations <ref type="bibr">36</ref> . The l th SOP is computed by combining these terms such that</p><p>This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset. Thus, for comparison, for all configurations, we also compute the orientational order parameter X X X OOP (traditionally called the nematic order parameter) and distance-weighted Steinhardt order parameters X X X SOP with freud 34 , using similar l max and cutoff radius to ensure comparability. All representations are properly scaled and centered -that is, each matrix of feature vectors is centered to have zero mean with unit variance, where X X X SOP and X X X AniSOAP are scaled non-column-wise in order to retain important relative variance information. We generate 1000 liquid crystal configurations, 500 exhibiting nematic order, and 500 exhibiting smectic order. Phases were generated to correspond with a range of orientational order parameters, from 0 (particles are randomly oriented) to 1 (particles are all ordered along the same director). We populate each of these configurations with prolate ellipsoids with a length-to-diameter ratio (L/D) equal to 3. For each of these configurations, we compute the AniSOAP radial and power spectrum &#963; GT O = 3.0, n max = 6, l max = 6 (for the power spectrum), and a cutoff sufficient to include the surrounding neighbors of each ellipsoid, including in neighboring smectic planes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS</head><p>We first look at the principal components (PCs) of the AniSOAP vectors for these phases (Fig. <ref type="figure">1</ref>). The PCA reflects that the AniSOAP features can be used to delineate translational order (blue versus red coloring), and orientational order (saturated versus unsaturated color). These mappings highlight qualitatively the information contained in the AniSOAP representation and show that it simultaneously and smoothly represents the translational and orientational order of the configurations. In Fig. <ref type="figure">1</ref> of the supplementary material, we demonstrate that the AniSOAP features also smoothly delineate different particle shapes, with a similar plot provided with data for both L/D=2 and 3 ellipsoids. By combining this information into one smooth feature space, we are able to better recreate the "nearsightedness" of molecular interactions <ref type="bibr">37</ref> , as these aspects (shape, mutual orientation, and translational order) are often interrelated and correlated in the ways in which they influence molecular behavior.</p><p>Quantitatively, we can compare the information density of AniSOAP with other order parameters for our configurations using the global feature reconstruction error (GFRE <ref type="bibr">38</ref> , computed using scikit-matter 39 ). For two representations X X X 1 and X X X 2 of the same dataset, GFRE(X 1 , X 2 ), determines how much information X X X 1 contains relative to X X X 2 , where 0.0 infers X X X 1 can perfectly reconstruct X X X 2 , and 1.0 corresponds to poor reconstruction. As shown in Fig. <ref type="figure">2</ref>, we see that AniSOAP representations (both the 2-body radial spectrum X construct the analogous X X X SOP with lower error than vice versa (6-8% versus 12-14% reconstruction error). Furthermore, the AniSOAP representations are able to reconstruct the orientational order parameter with low error (6% for the 3-body, and 24% for the 2-body, compared to 39% for X SOP ). The improvement in information density can be attributed to the smooth radial bases that underlie the AniSOAP construction.</p><p>It is worth noting that the Steinhardt order parameter is not well-suited for heterogenous datasets, as shown in Fig. <ref type="figure">2</ref> of the supplementary material, and its ability to reconstruct the AniSOAP representation will decrease when a dataset contains multiple particle types.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Gay-Berne Ellipsoids</head><p>The Gay-Berne (GB) potential is a Lennard Jones-type potential that contains additional terms to account for ellipsoidal anisotropies. We use the generalized formulation of the Gay-Berne potential outlined by Everaers and Ejtehadi <ref type="bibr">40</ref> and first introduced by Berardi, Fava, and Zannoni <ref type="bibr">41</ref> . This formulation calculates the pairwise potential between (potentially dissimilar) ellipsoids, i.e., ellipsoids with three unequal semiaxes: a i , b i , c i . These three semi-axes define a diagonal struc-ture matrix for particle i:</p><p>where S S S is analogous to D D D -2 of Eq. ( <ref type="formula">12</ref>), although (a, b, c) are discrete semiaxes, rather than Gaussian widths, like &#963; . In our case-study, we generate 25,000 dimers of a i = 1, b i = 1.5, c i = 2 ellipsoids at random offsets and orientations.</p><p>The center position and orientation of ellipsoid i is given by position vector r r r i and a 3&#215;3 rotation matrix R i , respectively. The relative position is r r r 12 = r r r 2r r r 1 . The Gay-Berne potential takes into account interparticle distance dependence and orientation dependence of the ellipsoid pairs. The potential is given as a product of three terms:</p><p>LJ-like term ( <ref type="formula">22</ref>)</p><p>anisotropy corrections (23)   The first term U r is given as follows:</p><p>where the distance h 12 between two ellipsoids is estimated as the Perram distance of closest approach 42 h 12 (R 1 , R 2 , S S S 1 , S S S 2 , r r r 12 ) = r 12s 12 (R 1 , R 2 , S S S 1 , S S S 2 , r12 ) (25)   where</p><p>(26) and</p><p>The terms &#949; GB and &#963; GB are the potential well depth and location analogous to LJ. &#947; is a parameter that shifts the potential well and is typically set to 1. Since the interparticle distance is defined to be the "distance of closest approach", h 12 , rather than center-center distance, so U r must also contain dependence on the geometry and orientation of each ellipsoid to calculate h 12 . The remaining pieces of Eq. ( <ref type="formula">23</ref>) account for the ellipsoidal geometry (&#951; 12 ) and misorientation (&#967; 12 ); further explanation of these terms are given in Sec. B 1.</p><p>One of the less trivial aspects of the Gay-Berne implementation is calculating the "distance of closest approach" h 12 . The approximation given by Perram and Wertheim 42 is computationally efficient, but open to failure in some cases, like in the case of two bodies with very unequal radii <ref type="bibr">40</ref> . It is worth noting that it is the nature of density expansions to implicitly contain the distance of closest approach, provided that the This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset. chosen cutoff distance and radial resolution are sufficiently large to include any necessary neighbors, which is evidenced by the perfect agreement in the computed and predicted h 12 distances given in Fig. <ref type="figure">3</ref>  <ref type="bibr">43</ref> . And thus, in AniSOAP , we alleviate the requirement to explicitly compute h 12 or rely on its approximations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS</head><p>From here, learning the Gay-Berne potential is straightforward, similar to how traditional SOAP vectors can learn the LJ potential. With the AniSOAP power spectrum vectors, it is possible to interpolate, using solely regularized linear regression, the interaction potential of ellipsoids of arbitrary distances from one another, as shown in Fig. <ref type="figure">3</ref>. Performance decreases for repulsive, heavily overlapped configurations (right end of the parity plot in the lower right of Fig. <ref type="figure">3</ref>), likely due to the fact that, in the repulsive regime, small feature differences correspond to disproportionately large energy differences. Our learning exercise converges with as few as 1,000 training points, as evidenced by the learning curve given in Fig. <ref type="figure">3</ref> of the supplementary material.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Benzene Molecules</head><p>For the following analysis, we intentionally construct a set of benzene configurations to demonstrate the possibilities and, simultaneously, the limitations for AniSOAP . We start with a set of symmetry-constrained crystals comprised of planar benzene molecules with the software PyXtal 45 across all 230 space groups. We then augmented this dataset by randomly rotating or translating the molecules, where many configurations correspond to the same positions or orientations of the molecules. The resultant dataset contains roughly 7,000 benzene crystals. We then compute energetic quantities using QuantumEspresso v7.0 46 using Perdew-Burke-Ernzerhof (PBE) pseudopotentials and cutoff parameters reported by Prandini et al. <ref type="bibr">47</ref> , a Grimme D3dispersion correction <ref type="bibr">48</ref> , and a 3x3 Monkhorst-Pack k-point grid <ref type="bibr">49</ref> . Computations were managed with the signac and signac-flow packages <ref type="bibr">50,</ref><ref type="bibr">51</ref> , and computed using the ASE computational front-end <ref type="bibr">52</ref> .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Hyperparameter Tuning</head><p>With any new featurization, there is always valid concern about hyperparameter optimization and the sensitivity of the featurization to changes in these values <ref type="bibr">53</ref> . In many ways, this is the appeal of the SOAP formalism -the hyperparameters, namely the widths of the Gaussian densities, basis sets, and cutoff parameters, all have roots in chemical physics and can be chosen from a large range of "reasonable" values with minimal impact on model interpretability and performance.</p><p>As the primary axes of planar benzenes are well-defined, the only new hyperparameters to consider are the semiaxes lengths of the MVG. For simplicity, we will only consider &#963; 1 = &#963; 2 , and prove that, in line with conventional knowledge on benzene geometry, best results are obtained with &#963; 1 &gt; &#963; 3 (an oblate ellipsoid).</p><p>To tune these parameters, we again use the GFRE of a given AniSOAP representation and an analogous SOAP rep-This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset. resentation of our benzene crystal configurations. By taking GFRE(X AniSOAP , X SOAP ), we determine how much information is lost by moving from the atomistic to coarse-grained AniSOAP representation, again where 0.0 infers perfect reconstruction of the atomic correlations, and higher numbers correspond to poor reconstruction. Note that this hyperparameter tuning occurs independently of any traditional supervised learning task.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS</head><p>For our SOAP representation, we compute the structureaveraged representation using rascaline <ref type="bibr">54</ref> , with a cutoff radius of 7.0&#197;, Gaussian density width of 0.5&#197;, l max = 10, and n max = 4. This results in a length 1, 188 vector for each configuration. We compare against AniSOAP vectors using a similar cutoff radius, number of angular and radial channels, varying &#963; 1 = &#963; 2 , &#963; 3 , and &#963; GTO . Each AniSOAP vector has length 146.</p><p>From the results in Fig. <ref type="figure">5</ref>, we see how the oblate MVG with &#963; 1 = &#963; 2 =4.0 and &#963; 3 =0.5 minimizes the information loss compared to the atomistic SOAP representation with a &#963; GT O = 1.5. Prolate (&#963; 1 &lt; &#963; 3 ) and spherical (&#963; 1 = &#963; 3 ) Gaussian densities perform notably worse. It is interesting, however, that there is a wide range of &#963; 1 , &#963; 3 values that obtain similar results, signifying that the AniSOAP hyperparameters are robust with respect to small changes, provided the MVG remain oblate, and the semiaxis lengths are within reasonable proportion. This indicates that fitting on AniSOAP vectors is robust to small changes in hyperparameters; without this robustness, models are prone to overfit. We include in the SI similar analyses for &#963; GTO = {0.5, 1.0, 1.5, 2.0, 2.5, 3.0}, demonstrating that &#963; GTO &#8712; [1.0&#197;, 3.0&#197;] obtains similar results to &#963; GTO = 1.5&#197;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Learning of Benzene Energetics</head><p>Taking the optimized hyperparameters from the previous section, we now show how the AniSOAP representation performs in simple supervised tasks, demonstrating where AniSOAP performs best and where it is incomplete for atomistic systems. It is worth noting that the intention of AniSOAP is to provide a molecule-level analog to SOAP, and is, by design, incomplete <ref type="bibr">55</ref> with respect to many atom-atom correlations.</p><p>To highlight the importance of molecular representation, we will use regularized ridge models, employing a 90/10 training/test split and five-fold cross-validation. We first perform three regression tasks -learning the baselined, per-atom energy (equivalent to learning the per-molecule energy) using the all-atom SOAP representation, a SOAP representation built solely from the molecule centers (coinciding with the ridge line at &#963; 1 = &#963; 2 = &#963; 3 in Fig. <ref type="figure">5</ref>), and our optimized AniSOAP representation. We have enforced that all three representations have similar ranks, as higher-rank features will outperform lower-rank ones based on size alone. To do so, we perform dimensionality reduction via principal components analysis <ref type="bibr">56</ref> .</p><p>The results, as shown in Fig. <ref type="figure">6</ref>, demonstrate how incorporating the anisotropy of intermolecular correlations can greatly improve our ability to learn energetic quantities, even in contexts where atom-atom interactions are important. A SOAP representation on the molecule centers (center panels) <ref type="bibr">57</ref> , has heavily limited regression performance, with a typical RMSE on the order of 45 -50meV/atom, and an R 2 &#8804; 0.4. By introducing intermolecular anisotropy, our performance jumps R 2 &#8776; 0.9, RMSE &#8776; 15 -20meV/atom, much closer to the all-atom regression in the left panel of Fig. <ref type="figure">6</ref>.</p><p>While AniSOAP can achieve reasonable performance, the performance of AniSOAP cannot match that of all-atom SOAP due to the nature of the underlying dataset. In this dataset, we specifically include configurations that will always be challenging to represent via molecular 58 coarse-graining, such as those with unstable hydrogen-hydrogen repulsion, or stabilizing hydrogen-hole interactions. As shown in the dynamic chemiscope <ref type="bibr">59</ref> visualization in the corresponding Materials Cloud entry <ref type="bibr">60,</ref><ref type="bibr">61</ref> , these configurations are those with the largest error when regressed using the AniSOAP representation. This shows that the limits of AniSOAP correspond to the limits of coarse-graining itself.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. CONCLUSIONS</head><p>The tools developed under the umbrella of "machinelearning" are powerful, and revolutionizing society and the scientific community at an aggressive pace. One important advancement for chemical sciences is the concept of treating This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset. chemistry as data -choosing specifically the numerical representations with which to cast chemical questions into statistical and analytical models. These representations are strongest when grounded in the established physical principles that we are trying to emulate or predict.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS</head><p>Here, we have demonstrated one such physically-driven approach to machine-learning representations, aimed at leveraging machine learning for coarse-grained and mesoscale entities, demonstrating such an approach for particles and molecules that are well-represented by ellipsoidal bodies. Our results show that, for both classical and quantum mechanical datasets, AniSOAP provides a suitable representation for ellipsoidal bodies, as these representations are able to accurately and linearly map onto complex energetics without the need for deeper ML infrastructures. We have constructed AniSOAP in such a way as to retain compatibility with the popular atomistic SOAP formalism -in practice, we hope that these two technologies are used hand-in-hand to simplify energetic landscapes and explicitly incorporate many-body effects. Furthermore, this consistency between formalisms can enable multiscale machine learning approaches, wherein one can use coarse-grained representations for long-scale molecular motion and atom-atom representations for nearsighted interactions.</p><p>By feeding AniSOAP descriptors into various functional forms to learn molecular energy, we envision these anisotropic descriptors to be foundational for building general coarsegrained potentials of anisotropic molecules, similar to how many machine-learned interatomic potentials are built off atomistic descriptors <ref type="bibr">16,</ref><ref type="bibr">17,</ref><ref type="bibr">21</ref> . Future work will focus on the efficient implementation of these anisotropic potentials to explore complex, multiscale molecular systems and compare the performance of AniSOAP-based potentials with traditional methods focused on reproducing the potential of mean force. For full integration into molecular dynamics, further derivations will also be necessary to calculate spatial derivatives of these descriptors for use in predicting the forces and torques on each particle.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. SUPPLEMENTARY MATERIAL</head><p>The supplementary material contains additional analysis on our case studies. For the liquid crystals, we show how AniSOAP represents differently-shaped spheroids, and that it can delineate differently-shaped particles (unlike existing order parameters). For the Gay-Berne and Benzene case studies, we show learning curves and further results of our GFREbased hyperparameter optimization.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VI. DATA AVAILABILITY</head><p>Data for this paper will be made available via MaterialsCloud <ref type="bibr">60</ref> upon acceptance, including all raw input files and analysis scripts. This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset.</p><p>PLEASE CITE THIS ARTICLE AS DOI: 10.1063/5.0210910 VII. AUTHOR CONTRIBUTIONS KKHD derived the expansion of multi-variate Gaussian and wrote the corresponding proof-of-principle code. AL, JN, Y-CC and RKC refined the code, implementing orthonormalization and additional basis sets. AL and RKC wrote the manuscript and designed and executed the case studies.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>VIII. CONFLICTS OF INTEREST</head><p>There are no conflicts to declare.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.">Orthonormalization</head><p>The coefficients &#10216;nlm|&#961; i &#10217; from the above procedures result from using non-orthonormal bases. While not strictly necessary, working in orthonormal bases ensures minimal overlap in mutual information between features <ref type="bibr">64</ref> . This discussion only applies to basis functions that are square integrable (e.g. GTO); non-square-integrable basis functions (e.g. monomial basis) cannot be orthonormalized. Below, we discuss how to scale our coefficients, taking the GTO basis as a representative example for any square-integrable basis.</p><p>We first choose the coefficients of our density expansion &#10216;nlm|&#961; i &#10217; to use the unnormalized GTO basis R nl (r) = r l+2n e </p><p>and can hence be normalized with the constant</p><p>After normalizing all the bases, we can take orthogonalize them using L&#246;wdin Symmetric Orthonormalization <ref type="bibr">25</ref> . We first find the overlap matrix between two normalized GTOs:</p><p>The orthonormalization matrix is the inverse square root of the overlap matrix G -1/2 , which is guaranteed to exist because the overlap matrix is a gram matrix and is hence symmetric positive definite. Specifically, G -1/2 is calculated by diagonalizing G, then taking the recipricol of the square root of the diagonal matrix: G = MDM T , G -1/2 = MD -1/2 M T . Then, we can apply this matrix to obtain a set of orthonormal GTO basis vectors &#934;i : &#934;i = G -1/2 i j &#934; j . We note that in our previous procedure, we could in theory construct an overlap matrix from unnormalized GTOs, but practically, calculating the overlap between unnormalized GTOs of high order, then inverting them to find the orthonormalization matrix, is not numerically stable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8.">Tricks for Efficient Implementation</head><p>The current implementation of AniSOAP is performance limited, both by inefficient recalculations of the Clebsch-Gordan Matrices, and by the large number of computations and nested iterations performed in Python when calculating high-order moments. Below we outline two strategies under active development to address these inefficiencies. The computational costs of the current implementation and the proposed future implementations are shown in Fig. <ref type="figure">7</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>a. Caching the Clebsch-Gordan (CG) Matrix</head><p>The construction of Clebsch-Gordan matrices depends on only the hyperparameter l max . Originally, the matrices were stored within a Python dictionary indexed by (l 1 , l 2 , L). Since 0 &#8804; l 1 , l 2 &#8804; l max and |l 1l 2 | &#8804; L &#8804; min(l max , (l 1 + l 2 )), the number of matrices required to compute grows as O(l 3 max ), which is expensive even for modest values of l max . However, since the construction of CG matrices only depends on l max , we can cache the matrices and re-use them internally. For caching, we use a simple cyclic list that stores (key, value) pair with key storing l max and value storing corresponding matrices, as shown below, where M corresponds to the appropriate CG matrices.</p><p>The cache has a finite and fixed number of (key, value) pairs it can store to prevent memory overflow, and whenever the cache is full, it decides the entry for replacement using an algorithm that mimics the CLOCK algorithm for page replacement <ref type="bibr">65</ref> . In accordance with the algorithm, the key for the CG list also contains a replacement bit to store the time-indexed usage of the entry. The format of the CLOCK algorithm does place implicit limits on l max , such that l max &#8804; 2 31 -1, although this value is beyond practical usage. The utility of caching these CG matrices is apparent when performing repeated higher-body order expansions with the same l max , such as in a molecular dynamics simulation. This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset. 7. Time measurement of major bottlenecks with and without caching. The same computation was performed for all N by N by M crystal structures with N and M both ranging from 1 to 16, and with fixed l max = 6, &#963; = 5.0, r cut = 1.0. With caching, after the first computation, all subsequent computations of Clebsch-Gordan matrices are near instantaneous (&#8764; 10&#181;s, the time required to access a list). The gray dashed line show the expected &#8764;80x speedup when we port the moments calculation to a lower-level language like Rust. The red and gray lines approach a slope of 1 on the log-log plot, indicating linear scaling with system size.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>b. Moments Array</head><p>Given the simplicity of the moments calculations and the frequency of invoking this section of code, we are currently porting this functionality to Rust 66 , which gives the benefits of a compiled language while retaining easy interfacing with Python.</p><p>While the Rust code is almost a one-to-one translation, there were two minor changes. Firstly, the computation of the inverse of dilation matrix D D D (10) is changed. By definition, D D D is a 3 by 3 symmetric matrix. Therefore, in Rust we compute the analytical formula for inverting this matrix to avoid unnecessary operations while minimizing package dependency. Secondly, the code was re-organized in Rust to maintain clarity in the new syntax.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>c. Results of Optimization</head><p>With the CG-matrix caching and proposed porting of the moments above, we have performed benchmark timings (Fig. <ref type="figure">7</ref>) to compare the speed of execution. These benchmarks were computed on the High-Performance Computers (HPC) within the Wisconsin Center for High-Throughput Computation. Each HPC had a 3GHz AMD EPYC 7763 64-Core Processor and 514 GB Total RAM. Note that none of this code is currently parallelized and therefore only a single core was used, yielding timings that are similar to what is obtained on a local machine. Continuing our discussion of Eq. ( <ref type="formula">23</ref>), the second term, &#951; 12 , is a function of each ellipsoids' geometry and orientation but not a function of distance, and is given as follows:</p><p>This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS</head><p>This correction term describes the interaction strength between two ellipsoids at 0 separation, whose influence is tuned by parameter &#957;.</p><p>The last term, &#967; 12 , is only a function of each ellipsoid's individual orientations (R 1 , R 2 ) and relative orientation ( r 12 ), but not of their geometries (S S S 1 , S S S 2 ). It is given as follows:</p><p>B4) E E E i = &#63723; &#63724; &#63725; e -1/&#181; ai 0 0 0 e -1/&#181; bi 0 0 0 e -1/&#181; ci &#63734; &#63735; &#63736; (B5)</p><p>Note that for Gay-Berne, the rotations R i transform from lab frame to the body frame, while AniSOAP defines rotations to transform from the body frame to the lab frame. Hence, R i,AniSOAP &#8801; R -1 i,GB . The above definitions use R i &#8801; R i,GB . &#967; 12 corrects for the well-depth by interpolating the relative well depth between the side-to-side, face-to-face, and end-to-end interactions, given by e ai , e bi , e ci . Generally, these pole-pole relative well depths are arbitrarily fitted, but can be assumed to be equal to the Gaussian curvature of the ellipsoids at each pole, provided that &#181; = 1:</p><p>In our case-study with a i = 1, b i = 1.5, c i = 2 ellipsoids, we set &#181; = 1, enabling the use of B6 to calculate E E E i . We furthermore set &#957; = 1, completely specifying the Gay-Berne hyperparameters. This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>PLEASE CITE THIS ARTICLE AS</head></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>This is the author's peer reviewed, accepted manuscript. However, the online version of record will be different from this version once it has been copyedited and typeset.PLEASE CITE THIS ARTICLE ASDOI: 10.1063/5.0210910</p></note>
		</body>
		</text>
</TEI>
