As part of a molecular-physics calculation, I need to perform an integral to find the average of a certain function over all the possible orientations of the molecule,
$$
\langle f(\mathbf v)\rangle = \int_{R\in\mathrm{SO}(3)} f(R\mathbf v) \:\mathrm dR
$$
To some extent, it is relatively easy to find clear ways to do this in Mathematica: the Haar measure in $\mathrm{SO}(3)$ is cleanly expressed in terms of the Euler angles, and these are then easy to translate to $R$ using EulerMatrix, so one can use something like
NIntegrate[
f[EulerMatrix[{α, β, γ}] . v] 1/8 Sin[β]
, {α, -π, π}, {β, -(π/2), π/2}, {γ, π, π}]
However, this approach doesn't really "know" anything about the structure of the rotation group, and it looks liable to choose some sub-optimal sampling strategies that over-sample the regions where the Euler-angle coordinate mapping is singular.
(In case a specific example is useful, $f(\mathbf v)$ can be chosen to be e.g. $f(\mathbf v) = \left((\mathbf a\cdot\mathbf v)^2+(\mathbf b\cdot\mathbf v)^2\right)^p$ for suitable semi-random $\mathbf a$, $\mathbf b$ and $p$.)
Having a look at the literature, there seems to be a clear consensus that the optimal way to do this is to decompose $\mathrm{SO}(3) \cong \mathbb S^2 \times \mathbb S^1$ (i.e., use the angle-axis representation used by RotationMatrix[θ,w]) and then use
- some simple 1D integrator for the $\mathbb S^1$ factor, and
- a dedicated spherical quadratures for the integration over the rotation-axis orientation in $\mathbb S^2$.
As I understand it, the leading spherical quadrature used for the second factor is the Lebedev quadrature, which is symmetric under the octahedral group and is chosen to integrate, exactly, the spherical harmonics up to a given order.
So, on to my questions:
- Is there an existing (built-in, or pre-built package) way to use Lebedev quadratures in Mathematica?
- If not, is there an existing implementation that can be adapted for this?
- Alternatively, is there any way to inform
NIntegrateabout this structure and make it exploit it? - Or can this be ignored by suitable settings for
NIntegratethat will make it choose a close-to-optimal integration strategy?