Skip to content

Instantly share code, notes, and snippets.

@ohno
Last active September 1, 2025 04:56
Show Gist options
  • Select an option

  • Save ohno/efeb382c4be77d7603ffca469ac0fc34 to your computer and use it in GitHub Desktop.

Select an option

Save ohno/efeb382c4be77d7603ffca469ac0fc34 to your computer and use it in GitHub Desktop.
Rayleigh-Ritz method in J. Thijssen, Computational Physics 2nd edition, (Cambridge University Press, 2007)
using LinearAlgebra
α = [13.00773, 1.962079, 0.444529, 0.1219492]
S = [(π/(α[i]+α[j]))^(3/2) for i in keys(α), j in keys(α)]
H = [3*π^(3/2)*α[i]*α[j]/(α[i]+α[j])^(5/2) - 2*π/(α[i]+α[j]) for i in keys(α), j in keys(α)]
E, C = eigen(H, S)
@ohno
Copy link
Author

ohno commented Sep 1, 2025

J. Thijssen, Computational Physics 2nd edition, (Cambridge University Press, 2007)

$$ \begin{aligned} \phi_1(r) &= \exp(-\alpha_1 ~r^2) = \exp(-13.00773 ~r^2), \\ \phi_2(r) &= \exp(-\alpha_2 ~r^2) = \exp(-1.962079 ~r^2), \\ \phi_3(r) &= \exp(-\alpha_3 ~r^2) = \exp(-0.444529 ~r^2), \\ \phi_4(r) &= \exp(-\alpha_4 ~r^2) = \exp(-0.1219492 ~r^2). \end{aligned} $$

$$ \begin{aligned} S_{ij} = \langle \phi_{i} | \phi_{j} \rangle &= \int \phi_{i}^*(r) \phi_{j}(r) \mathrm{d} \pmb{r} \\ &= \underline{\left( \frac{\pi}{\alpha_i + \alpha_j} \right)^{3/2}} \end{aligned} $$

$$ \begin{aligned} V_{ij} = \langle \phi_{i} | \hat{V} | \phi_{j} \rangle &= \iiint \phi_{i}^*(r) \left[ -\frac{1}{r} \right] \phi_{j}(r) ~r^2 \sin\theta ~\mathrm{d}r \mathrm{d}\theta \mathrm{d}\varphi \\ &= \underline{- \frac{2\pi}{\alpha_i + \alpha_j}} \end{aligned} $$

$$ \begin{aligned} T_{ij} = \langle \phi_{i} | \hat{T} | \phi_{j} \rangle &= \iiint \mathrm{e}^{-\alpha_i r^2} \left[ -\frac{1}{2} \nabla^2 \right] \mathrm{e}^{-\alpha_j r^2} ~r^2 \sin\theta ~\mathrm{d}r \mathrm{d}\theta \mathrm{d}\varphi \\ &= \underline{ \frac{3 \alpha_i \alpha_j \pi^{\frac{3}{2}}}{(\alpha_i + \alpha_j)^{\frac{5}{2}}} } \end{aligned} $$

$$ \begin{aligned} H_{ij} &= \langle \phi_{i} | \hat{H} | \phi_{j} \rangle \\ &= \langle \phi_{i} | \hat{T} + \hat{V} | \phi_{j} \rangle \\ &= \langle \phi_{i} | \hat{T} | \phi_{j} \rangle + \langle \phi_{i} | \hat{V} | \phi_{j} \rangle \\ &= \underline{T_{ij} + V_{ij}} \end{aligned} $$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment