e3x.so3.quadrature.delley_quadrature

e3x.so3.quadrature.delley_quadrature(precision=None, num=None)[source]

Returns a Delley quadrature grid.

A Delley quadrature is a numerical approximation to the surface integral of a function \(f\) over the unit sphere

\[\int_{\Omega} f(\Omega) d\Omega \approx 4\pi \sum_{i=1}^N w_i f(\vec{r}_i)\]

where \(\vec{r}_i\) and \(w_i\) are grid points and weights, respectively. A Delley rule of precision \(p\) can be used to correctly integrate any polynomial for which the highest degree term \(x^iy^jz^k\) satisfies \(i+j+k \leq p\). The Delley rules are an optimized version of the Lebedev rules with improved numerical precision, for details, see Delley, Bernard. “High order integration schemes on the unit sphere.” Journal of Computational Chemistry 17.9 (1996): 1152-1155.

Parameters:
  • precision (Optional[int], default: None) – The desired minimum precision \(p\). The returned Delley rule will be the smallest grid that has the desired precision (if this value is not None, num must be set to None).

  • num (Optional[int], default: None) – The desired maximum number of points \(N\). The returned Delley rule will be the highest-precision grid that has not more than num points (if this value is not None, precision must be set to None).

Return type:

tuple[Float[Array, 'num_points 3'], Float[Array, 'num_points']]

Returns:

A tuple of two arrays representing the grid points \(\vec{r}_i\) and weights \(w_i\).

Raises:
  • ValueError – If both precision and num are None (or both are specified at the same time).

  • RuntimeError – If the Delley quadrature rules cannot be loaded from disk.