Bigi, FilippoFraux, GuillaumeBrowning, Nicholas J.Ceriotti, Michele2023-08-282023-08-282023-08-282023-08-1410.1063/5.0156307https://infoscience.epfl.ch/handle/20.500.14299/200112WOS:001044514400019Spherical harmonics provide a smooth, orthogonal, and symmetry-adapted basis to expand functions on a sphere, and they are used routinely in physical and theoretical chemistry as well as in different fields of science and technology, from geology and atmospheric sciences to signal processing and computer graphics. More recently, they have become a key component of rotationally equivariant models in geometric machine learning, including applications to atomic-scale modeling of molecules and materials. We present an elegant and efficient algorithm for the evaluation of the real-valued spherical harmonics. Our construction features many of the desirable properties of existing schemes and allows us to compute Cartesian derivatives in a numerically stable and computationally efficient manner. To facilitate usage, we implement this algorithm in sphericart, a fast C++ library that also provides C bindings, a Python API, and a PyTorch implementation that includes a GPU kernel.Chemistry, PhysicalPhysics, Atomic, Molecular & ChemicalChemistryPhysicsrotationFast evaluation of spherical harmonics with sphericarttext::journal::journal article::research article