Fast evaluation of spherical harmonics with sphericart
Filippo Bigi1,2, Guillaume Fraux1,2, Nicholas J Browning3
1Laboratory of Computational Science and Modelling, Institute of Materials, École Polytechnique Fédérale de Lausanne, Lausanne 1015, Switzerland.
Abstract:
Spherical 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.
Related Concept Videos
Spherical Coordinates
Spherical and Cylindrical Capacitor
Conventionally, considering the symmetry, the electric field between the concentric shells of a spherical capacitor is directed radially outward. The magnitude of the field,...
Gauss's Law: Spherical Symmetry
Radius of Gyration of an Area
Polar and Cylindrical Coordinates
Harmonic Mean
Take the example of the speed of a car, which is the measure of the rate of distance traveled. If the vehicle traverses the same distance back-and-forth, its average speed equals the total distance traveled divided by the total time taken. However, if the car moves with varying speeds, then the arithmetic mean is more skewed...


