English

SHarmonic: A fast and accurate implementation of spherical harmonics for electronic-structure calculations

Computational Physics 2025-10-08 v1 Other Condensed Matter Mathematical Software Chemical Physics

Abstract

The authors present SHarmonic, a new implementation of the spherical harmonics targeted for electronic-structure calculations. Their approach is to use explicit formulas for the harmonics written in terms of normalized Cartesian coordinates. This approach results in a code that is as precise as other implementations while being at least one order of magnitude more computationally efficient. The library can run on graphics processing units (GPUs) as well, achieving an additional order of magnitude in execution speed. This new implementation is simple to use and is provided under an open source license, it can be readily used by other codes to avoid the error-prone and cumbersome implementation of the spherical harmonics.

Keywords

Cite

@article{arxiv.2510.05282,
  title  = {SHarmonic: A fast and accurate implementation of spherical harmonics for electronic-structure calculations},
  author = {Xavier Andrade and Jacopo Simoni and Yuan Ping and Tadashi Ogitsu and Alfredo A. Correa},
  journal= {arXiv preprint arXiv:2510.05282},
  year   = {2025}
}

Comments

13 pages, 2 figures. The code can be downloaded from https://gitlab.com/npneq/sharmonic