spherical_harmonics#

cuequivariance_torch.spherical_harmonics(
ls: list[int],
vectors: Tensor,
normalize: bool = True,
optimize_fallback: bool | None = None,
) Tensor#

Compute the spherical harmonics of the input vectors.

Parameters:
  • ls (list of int) – List of spherical harmonic degrees.

  • vectors (torch.Tensor) – Input vectors of shape (…, 3).

  • normalize (bool, optional) – Whether to normalize the input vectors. Defaults to True.

  • optimize_fallback (bool, optional) – Whether to optimize fallback. Defaults to None.

Returns:

The spherical harmonics of the input vectors of shape (…, dim) where dim is the sum of 2*l+1 for l in ls.

Return type:

torch.Tensor