Function qsym2::angmom::sh_conversion::complexc

source ·
pub fn complexc(
    lpureqns: (u32, i32),
    lcartqns: (u32, u32, u32),
    csphase: bool,
) -> Complex<f64>
Expand description

Obtain the complex coefficients $c(l, m_l, n, l_x, l_y, l_z)$ based on Equation 15 of Schlegel, H. B. & Frisch, M. J. Transformation between Cartesian and pure spherical harmonic Gaussians. International Journal of Quantum Chemistry 54, 83–87 (1995), DOI, but more generalised for $l \leq l_{\mathrm{cart}} = l_x + l_y + l_z$.

Let $\tilde{g}(\alpha, l, m_l, l_{\mathrm{cart}}, \mathbf{r})$ be a complex solid harmonic Gaussian as defined in Equation 1 of the above reference with $n = l_{\mathrm{cart}}$, and let $g(\alpha, l_x, l_y, l_z, \mathbf{r})$ be a Cartesian Gaussian as defined in Equation 2 of the above reference. The complex coefficients $c(l, m_l, n, l_x, l_y, l_z)$ effect the transformation

\tilde{g}(\alpha, l, m_l, l_{\mathrm{cart}}, \mathbf{r})
= \sum_{l_x+l_y+l_z=l_{\mathrm{cart}}}
    c(l, m_l, l_{\mathrm{cart}}, l_x, l_y, l_z)
    g(\alpha, l_x, l_y, l_z, \mathbf{r})

and are given by

c(l, m_l, l_{\mathrm{cart}}, l_x, l_y, l_z)
= \frac{\tilde{N}(l_{\mathrm{cart}}, \alpha)}{N(l_x, l_y, l_z, \alpha)}
    \tilde{c}(l, m_l, l_{\mathrm{cart}}, l_x, l_y, l_z).

The normalisation constants $\tilde{N}(l_{\mathrm{cart}}, \alpha)$ and $N(l_x, l_y, l_z, \alpha)$ are given in Equations 8 and 9 of the above reference, and for $n = l_{\mathrm{cart}}$, this ratio turns out to be independent of $\alpha$. The more general form of $\tilde{c}(l, m_l, l_{\mathrm{cart}}, l_x, l_y, l_z)$ has been derived to be

\tilde{c}(l, m_l, l_{\mathrm{cart}}, l_x, l_y, l_z)
= \frac{\lambda_{\mathrm{cs}}}{2^l l!}
    \sqrt{\frac{(2l+1)(l-\lvert m_l \rvert)!}{4\pi(l+\lvert m_l \rvert)!}}
    \sum_{i=0}^{(l-\lvert m_l \rvert)/2}
        {l\choose i} \frac{(-1)^i(2l-2i)!}{(l-\lvert m_l \rvert -2i)!}\\
    \sum_{p=0}^{\lvert m_l \rvert} {{\lvert m_l \rvert} \choose p}
        (\pm \mathbb{i})^{\lvert m_l \rvert-p}
    \sum_{q=0}^{\Delta l/2} {{\Delta l/2} \choose q} {i \choose j_q}
    \sum_{k=0}^{j_q} {q \choose t_{pk}} {j_q \choose k}

where $+\mathbb{i}$ applies for $m_l > 0$, $-\mathbb{i}$ for $m_l \le 0$, $\lambda_{\mathrm{cs}}$ is the Condon–Shortley phase given by

\lambda_{\mathrm{cs}} =
    \begin{cases}
        (-1)^{m_l} & m_l > 0 \\
        1          & m_l \leq 0
    \end{cases}

and

t_{pk} = \frac{l_x-p-2k}{2} \quad \textrm{and} \quad
j_q = \frac{l_x+l_y-\lvert m_l \rvert-2q}{2}.

If $\Delta l$ is odd, $\tilde{c}(l, m_l, l_{\mathrm{cart}}, l_x, l_y, l_z)$ must vanish. When $t_{pk}$ or $j_q$ is a half-integer, the inner sum in which it is involved evaluates to zero.

§Arguments

  • lpureqns - A tuple of $(l, m_l)$ specifying the quantum numbers for the spherical harmonic component of the solid harmonic Gaussian.
  • lcartqns - A tuple of $(l_x, l_y, l_z)$ specifying the exponents of the Cartesian components of the Cartesian Gaussian.
  • csphase - If true, the Condon–Shortley phase will be used as defined above. If false, this phase will be set to unity.

§Returns

The complex factor $c(l, m_l, l_{\mathrm{cart}}, l_x, l_y, l_z)$.

§Panics

Panics when any required factorials cannot be computed.