diff --git a/notebooks/gto_integrals.ipynb b/notebooks/gto_integrals.ipynb index d533d4d..d489d53 100644 --- a/notebooks/gto_integrals.ipynb +++ b/notebooks/gto_integrals.ipynb @@ -50,7 +50,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -59,7 +59,7 @@ "5" ] }, - "execution_count": 2, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -87,7 +87,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -96,7 +96,7 @@ "15" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -497,11 +497,12 @@ "\\left(x_B^{l_\\nu} e^{-\\alpha_\\nu x_B^2} \\right) dx = \\\\\n", "\\int_{-\\infty}^\\infty \n", " e^{-\\alpha_\\mu \\alpha_\\nu (X_A - X_B)^2 / \\gamma} e^{-\\gamma x_C^2}\n", - "\\sum_{s=0}^{l_\\mu+ l_\\nu} B(l_\\mu, l_\\nu, C_A, C_B, s) x_C^s dx\n", + "\\sum_{s=0}^{l_\\mu+ l_\\nu} B(l_\\mu, l_\\nu, CA_x, CB_x, s) x_C^s dx\n", "$$\n", "Swapping the order of integration and the summation we see that we need to evaluate\n", "integrals of the form:\n", "$$\n", + "\\tag{27}\n", "\\int_{-\\infty}^\\infty t^s e^{-a t^2} dt\n", "$$\n", "This has a known analytic solution that we can evaluate using SymPy:" @@ -509,7 +510,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -528,7 +529,7 @@ "-∞ " ] }, - "execution_count": 51, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -544,7 +545,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -563,7 +564,7 @@ " 2⋅√a 2⋅√a " ] }, - "execution_count": 52, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -581,7 +582,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -594,7 +595,7 @@ "0" ] }, - "execution_count": 57, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -613,7 +614,7 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -627,7 +628,7 @@ "a ⋅Γ(s + 1/2)" ] }, - "execution_count": 65, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -640,13 +641,29 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Using this result allows us to write the one-dimensional overlap integral as:\n", + "This result can also be written in terms of the [double factorial](https://en.wikipedia.org/wiki/Double_factorial#Additional_identities) which gives us two possible computation strategies for this integral:\n", + "$$\n", + "\\tag{28}\n", + "G(a, s) = \\int_{-\\infty}^{\\infty} t^{2s} e^{-a t^2} dt \\\\\n", + "= a^{-s - \\frac{1}{2}} \\Gamma\\left(s + \\frac{1}{2}\\right) \\\\\n", + "= \\frac{(2s-1)!!}{(2a)^s} \\sqrt{\\frac{\\pi}{a}}.\n", + "$$\n", + "The last form agrees with Equation (3.15) derived by [Fermann and Valeev](http://arxiv.org/abs/2007.12057).\n", + "\n", + "Using the function $G(a, s)$ allows us to write the one-dimensional overlap integral as:\n", "$$\n", "\\tilde{S}_{\\mu \\nu}^{(x)} = \n", "e^{-\\alpha_\\mu \\alpha_\\nu (X_A - X_B)^2 / \\gamma}\n", - "\\sum_{s=0}^{\\lfloor(i+j)/2 \\rfloor} B(l_\\mu, l_\\nu, C_A, C_B, 2s)\n", - "\\int_{-\\infty}^\\infty \n", - "x_C^{2s} e^{-\\gamma x_C^2} dx\n", + "\\sum_{s=0}^{\\lfloor(l_\\mu + l_\\nu)/2 \\rfloor} B(l_\\mu, l_\\nu, CA_x, CB_x, 2s)\\;G(\\gamma, 2s)\n", + "$$\n", + "substituting this back into Equation (11) gives us the overlap of two primitive Gaussians:\n", + "$$\n", + "\\tag{11}\n", + "\\tilde{S}_{\\mu \\nu} = \\iiint p_\\mu(\\br) p_\\nu(\\br) dx dy dz \\\\\n", + "= N_\\mu N_\\nu e^{-\\alpha_\\mu \\alpha_\\nu |\\mathbf{A}-\\mathbf{B}|^2 / \\gamma}\n", + "\\sum_{s=0}^{\\lfloor(l_\\mu + l_\\nu)/2 \\rfloor} B(l_\\mu, l_\\nu, CA_x, CB_x, 2s)\\;G(\\gamma, 2s) \\\\\n", + "\\times \\sum_{s=0}^{\\lfloor(m_\\mu + m_\\nu)/2 \\rfloor} B(m_\\mu, m_\\nu, CA_y, CB_y, 2s)\\;G(\\gamma, 2s)\n", + "\\sum_{s=0}^{\\lfloor(n_\\mu + n_\\nu)/2 \\rfloor} B(n_\\mu, n_\\nu, CA_z, CB_z, 2s)\\;G(\\gamma, 2s)\n", "$$" ] }