Skip to content

Commit

Permalink
Update math page
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster committed Aug 28, 2024
1 parent 3d0ac03 commit 5511e07
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions docs/src/maths.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ There are multiple conventions for choosing normalization and phases, and it is
possible to reformulate the spherical harmonics in a real-valued form, which leads
to even further ambiguity in the definitions.

Within `sphericart` we take an opinionated stance: we compute only real-valued
harmonics, we express them as a function of the full Cartesian coordinates of a
point in three dimensions :math:`(x,y,z)` and compute by default "scaled"
versions :math:`\tilde{Y}^m_l(x, y, z)` which correspond to homogeneous polynomials
of the Cartesian coordinates:
Within `sphericart`, we compute only real-valued spherical harmonics and we express
them as a function of the full Cartesian coordinates of a point in three dimensions.
These correspond to the real spherical harmonics as defined in the corresponding
`Wikipedia article <https://en.wikipedia.org/wiki/Spherical_harmonics>`_, which we
refer to as :math:`Y^m_l`.

We also offer the possibility to compute "solid" harmonics, which are given by
:math:`\tilde{Y}^m_l = r^l\,{Y}_l^m`. Since these can be expressed as homogeneous
polynomials of the Cartesian coordinates :math:`(x,y,z)`, as opposed to
:math:`(x/r,y/r,z/r)`, they are less computationally expensive to evaluate.
Besides being slightly faster, they can also
provide a more natural scaling if used together with a radial expansion.

The formulas used to compute the solid harmonics (and, with few modifications,
also for the spherical harmonics) are:

.. math ::
\tilde{Y}_l^m(x, y, z) = r^l\,{Y}_l^m(x, y, z) = F_l^{|m|} Q_l^{|m|}(z, r) \times
Expand All @@ -41,13 +51,6 @@ If we neglect some constant normalization factors, these correspond to the
See also the `reference paper <https://arxiv.org/abs/2302.08381>`_ for further
implementation details.

The radially normalized version of the spherical harmonics can also be computed by providing
the appropriate flag when creating the `sphericart` calculators. These correspond to
the real spherical harmonics as defined in the corresponding
`Wikipedia article <https://en.wikipedia.org/wiki/Spherical_harmonics>`_.
However, we recommend using the scaled versions, which are slightly faster and
provide a more natural scaling if used together with a radial expansion.

The :math:`\tilde{Y}^m_l(x)` are stored contiguously in memory, e.g. as
:math:`\{ (l,m)=(0,0), (1,-1), (1,0), (1,1), (2,-2), \ldots \}`.
With zero-based indexing of the arrays, the ``(l,m)`` term is stored at
Expand Down

0 comments on commit 5511e07

Please sign in to comment.