Skip to content

Commit

Permalink
Fix a few math rendering issues
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster committed Aug 29, 2024
1 parent df49627 commit 3834ab0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions python/src/sphericart/spherical_harmonics.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class SphericalHarmonics:
"""
Spherical harmonics calculator, which computes the real spherical harmonics
:math:`Y^l_m` up to degree ``l_max``. The calculated spherical harmonics
:math:`Y^m_l` up to degree ``l_max``. The calculated spherical harmonics
are consistent with the definition of real spherical harmonics from Wikipedia.
The `SphericalHarmonics` object computes prefactors and initializes buffers
Expand Down Expand Up @@ -312,7 +312,7 @@ class SolidHarmonics:
Solid harmonics calculator, up to degree ``l_max``.
This class computes the solid harmonics, a non-normalized form of the real
spherical harmonics, i.e. :math:`r^l Y^l_m`. These scaled spherical harmonics
spherical harmonics, i.e. :math:`r^l Y^m_l`. These scaled spherical harmonics
are polynomials in the Cartesian coordinates of the input points, and they
are therefore faster to compute.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def solid_harmonics(xyz: jax.Array, l_max: int):
Same as `spherical_harmonics`, but computes the solid harmonics instead.
These are a non-normalized form of the real
spherical harmonics, i.e. :math:`r^l Y^l_m`. These scaled spherical harmonics
spherical harmonics, i.e. :math:`r^l\,Y^m_l`. These scaled spherical harmonics
are polynomials in the Cartesian coordinates of the input points, and they
are therefore less expoensive to compute.
"""
Expand Down
12 changes: 6 additions & 6 deletions sphericart-torch/python/sphericart/torch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class SphericalHarmonics(torch.nn.Module):
"""
Spherical harmonics calculator, up to degree ``l_max``.
This class computes :math:`Y^l_m`, which are instead homogeneous polynomials
This class computes :math:`Y^m_l`, which are instead homogeneous polynomials
of x/r, y/r, z/r.
This class can be used similarly to :py:class:`sphericart.SphericalHarmonics`
Expand Down Expand Up @@ -248,7 +248,7 @@ class SolidHarmonics(torch.nn.Module):
Solid harmonics calculator, up to degree ``l_max``.
This class computes the solid harmonics, a non-normalized form of the real
spherical harmonics, i.e. :math:`r^l Y^l_m`. These scaled spherical harmonics
spherical harmonics, i.e. :math:`r^l\,Y^m_l`. These scaled spherical harmonics
are polynomials in the Cartesian coordinates of the input points.
The usage of this class is identical to :py:class:`sphericart.SphericalHarmonics`.
Expand Down Expand Up @@ -319,20 +319,20 @@ def e3nn_spherical_harmonics(
:param l_list:
Either a single integer or a list of integers specifying which
:math:`Y^l_m` should be computed. All values up to the maximum
:math:`Y^m_l` should be computed. All values up to the maximum
l value are computed, so this may be inefficient for use cases
requiring a single, or few, angular momentum channels.
:param x:
A `torch.Tensor` containing the coordinates, in the same format
expected by the `e3nn` function.
:param normalize:
Flag specifying whether the input positions should be normalized
(resulting in the computation of the spherical harmonics :math:`Y^l_m`),
(resulting in the computation of the spherical harmonics :math:`Y^m_l`),
or whether the function should compute the solid harmonics
:math:`\tilde{Y}^l_m`.
:math:`\tilde{Y}^m_l=r^l\,Y^m_l`.
:param normalization:
String that can be "integral", "norm", "component", that controls
a further scaling of the :math:`Y_m^l`. See the
a further scaling of the :math:`Y^m_l`. See the
documentation of :py:func:`e3nn.o3.spherical_harmonics()`
for a detailed explanation of the different conventions.
"""
Expand Down
4 changes: 2 additions & 2 deletions sphericart/include/sphericart.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* while those for the `double` data type do not.
* Similarly, types and functions for spherical harmonics calculations contain
* `_spherical_harmonics` in their name, and they calculate the
* real spherical harmonics :math:`Y^m_l: as defined on Wikipedia,
* real spherical harmonics :math:`Y^m_l` as defined on Wikipedia,
* which are homogeneous polynomials of (x/r, y/r, z/r). In contrast, types
* and functions for solid harmonics calculations contain `_solid_harmonics` in
* their name, and thay calculate the same polynomials but as a function of the
* Cartesian coordinates (x, y, z), or, equivalently, :math:`r^l Y^m_l`.
* Cartesian coordinates (x, y, z), or, equivalently, :math:`r^l\,Y^m_l`.
*/

#ifndef SPHERICART_H
Expand Down
6 changes: 3 additions & 3 deletions sphericart/include/sphericart.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/** \file sphericart.hpp
* Defines the C++ API for `sphericart`. Two classes are available:
* `SphericalHarmonics` and `SolidHarmonics`. The former calculates the
* real spherical harmonics :math:`Y^m_l: as defined on Wikipedia,
* real spherical harmonics :math:`Y^m_l` as defined on Wikipedia,
* which are homogeneous polynomials of (x/r, y/r, z/r). The latter
* calculates the same polynomials but as a function of the Cartesian coordinates
* (x, y, z), or, equivalently, :math:`r^l Y^m_l`.
* (x, y, z), or, equivalently, :math:`r^l\,Y^m_l`.
*/

#ifndef SPHERICART_HPP
Expand Down Expand Up @@ -397,7 +397,7 @@ template <typename T> class SphericalHarmonics {
* A solid harmonics calculator.
*
* Its interface is the same as that of the `SphericalHarmonics` class, but it
* calculates the solid harmonics :math:`r^l Y^m_l` instead of the real spherical
* calculates the solid harmonics :math:`r^l\,Y^m_l` instead of the real spherical
* harmonics :math:`Y^m_l`, allowing for faster computations.
*/
template <typename T> class SolidHarmonics : public SphericalHarmonics<T> {
Expand Down

0 comments on commit 3834ab0

Please sign in to comment.