xnn.gnn.featurizers.spherical_bessel.real_spherical_harmonics#
- xnn.gnn.featurizers.spherical_bessel.real_spherical_harmonics(l_max, x, y, z)[source]#
Real spherical harmonics
Y_lmof a unit vector, degrees 0 tol_max.Orthonormal on the sphere, without the Condon-Shortley phase:
Y_l0 = N_l0 P_l(z),Y_lm = sqrt(2) N_lm P_l^m(z) cos(m phi)andY_l,-m = sqrt(2) N_lm P_l^m(z) sin(m phi)form > 0, withN_lm = sqrt((2l+1)/(4 pi) (l-m)!/(l+m)!). They are evaluated as polynomials in the Cartesian components (float64 internally), so they are smooth everywhere on the sphere, the poles included.- Parameters:
l_max (int) – Highest degree.
x (Tensor) – Components of unit vectors, all of the same shape;
zis the polar axis and the azimuth is measured fromxtowardsy.y (Tensor) – Components of unit vectors, all of the same shape;
zis the polar axis and the azimuth is measured fromxtowardsy.z (Tensor) – Components of unit vectors, all of the same shape;
zis the polar axis and the azimuth is measured fromxtowardsy.
- Returns:
Shape
(..., (l_max + 1)**2), degree-major withm = -l .. lwithin each degree (columnl**2 + l + m), in the dtype ofz.- Return type:
Tensor