From 1d9f4a90d1d5041e34ecf1427da24b559f6aa6d9 Mon Sep 17 00:00:00 2001 From: Mark Dewing Date: Thu, 30 Aug 2018 12:33:10 -0500 Subject: [PATCH] Add cusp correction and molecular orbitals --- Wavefunctions/CuspCorrection.ipynb | 2384 +++++++++++++++++++++++++ Wavefunctions/MolecularOrbitals.ipynb | 551 ++++++ Wavefunctions/gaussian_orbitals.py | 246 +++ Wavefunctions/hcn.structure.xml | 36 + Wavefunctions/hcn.wfnoj.xml | 712 ++++++++ Wavefunctions/he_sto3g.wfj.xml | 56 + Wavefunctions/ne_def2_svp.wfnoj.xml | 159 ++ Wavefunctions/read_qmcpack.py | 149 ++ 8 files changed, 4293 insertions(+) create mode 100644 Wavefunctions/CuspCorrection.ipynb create mode 100644 Wavefunctions/MolecularOrbitals.ipynb create mode 100644 Wavefunctions/gaussian_orbitals.py create mode 100644 Wavefunctions/hcn.structure.xml create mode 100644 Wavefunctions/hcn.wfnoj.xml create mode 100644 Wavefunctions/he_sto3g.wfj.xml create mode 100644 Wavefunctions/ne_def2_svp.wfnoj.xml create mode 100644 Wavefunctions/read_qmcpack.py diff --git a/Wavefunctions/CuspCorrection.ipynb b/Wavefunctions/CuspCorrection.ipynb new file mode 100644 index 0000000..c291a93 --- /dev/null +++ b/Wavefunctions/CuspCorrection.ipynb @@ -0,0 +1,2384 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [], + "source": [ + "from sympy import *\n", + "init_printing()\n", + "from IPython.display import display\n", + "import matplotlib.pyplot as plt\n", + "import mpl_toolkits.mplot3d as a3\n", + "import matplotlib.animation as animation\n", + "%matplotlib notebook\n", + "# specify a second time as a workaround to get interactive plots working\n", + "%matplotlib notebook\n", + "#reload(gaussian_orbitals)\n", + "import gaussian_orbitals\n", + "import read_qmcpack\n", + "#reload(read_qmcpack)\n", + "import numpy as np\n", + "import scipy.optimize\n", + "from ipywidgets import interact\n", + "import ipywidgets" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Cusp Correction for Gaussian Orbitals\n", + "\n", + "From \"Scheme for adding electron-nucleus cusps to Gaussian orbitals\" A. Ma, D. Towler, N. D. Drummond, R. J. Needs, Journal of Chemical Physics 122, 224322(2005) https://doi.org/10.1063/1.1940588\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAMoAAAAdCAYAAADrXvM/AAAABHNCSVQICAgIfAhkiAAABS9JREFUeJztnGuIFVUcwH/erW1zZVPLR7XF0hqVWLlusYYRW1FQkSREQRQkViZlL3rQCyuowOyL2IfciO1BFIWYGkVoERpmVLa9izYzKMmKTEtNd/f24f+f7ty5Z+6daefO2WPnB8u55zFzfnd3zsx5zTbw/6EVmAeMA74FCsAi/bzTopfnAKADGG9bIgMKwDfAZ8AeYAVwO1AEjrXo5RlZnAYclvago4BHs3exwjSkUYwHuoBtGn/BppRnxNEELAMakh4wClgDHFEvo5wZg9wtApqB45Hv6fGEOQd4OGnhy4Al9XPxeHKnFbgVuEDjBeABTY+yATi61gkPAr5Guisez4FA2jHqQqCn1knnAF+mkFisFZ6V4hhbuOTqyY60Y9TJwD5qDD1eBJ5PIbEOGAJaUhxjC5dcPdnxX8aoPwLzq530Z+SxlJTfkceaC7jk6rHLa8BLQaQQyTwGmIiMUZLQDowFPspErb645Oqxz1eUP4XK6KZ2H74BuBHYDOzV8oPAFuAeKhufTVxy/RzYDYwG7ga+QJy3AY+RYm6/jgRjvPM1XgB2AZ+EyizQMtflq1bBcF0XAfuRya0KLtUDT42pvBl4S8us10qLwCtIl60IPJT4q9QXl1wPBQaAfmAT0IcsfC0H/kRcb7ZmV2It4hIMck/U+DOhMj2adnq+ahUM1/UWzTvcdPKrNLM9pvKXNf8+jb9NaXA8FWmBfwGNib5KfXHJdSbiWgTuonyQeYWmv2rBK8pvwA+heOAWbsQfIL/bphy9TAzXdZ6WN62zcLlmmtZQujXvT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right )$$" + ], + "text/plain": [ + "(φ, φ̃, η, ψ, ψ̃)" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "phi = Symbol('phi')\n", + "phi_t = Symbol('phitilde')\n", + "eta = Symbol('eta')\n", + "psi = Symbol('psi')\n", + "psi_t = Symbol('psitilde')\n", + "phi, phi_t, eta, psi, psi_t" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Each orbital can be divided into two parts - the s-type functions on the current center, and everything else.\n", + "* $\\phi$ The s-type functions on the current center (original functions, no cusp correction)\n", + "* $\\eta$ All non-s-type functions on the current center, and all functions from other centers (no need for cusp correction)\n", + "* $\\psi$ Total uncorrected orbital ($ = \\phi + \\eta$)\n", + "* $\\tilde{\\phi}$ Cusp-corrected s-type functions on the current center\n", + "* $\\tilde{\\psi}$ Total cusp-corrected orbital ($ = \\tilde{\\phi} + \\eta$)\n", + "\n", + "Inside some cutoff radius ($r_c$) the s-type part of the orbital is replaced with (Eqn 7 in the paper):" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAANgAAAAdCAYAAADIBaLqAAAABHNCSVQICAgIfAhkiAAACelJREFUeJztnHuwV1UVxz8XkO7tXiBNMg0MlYc0gSAQOKmhKBrVpJWZ9roGaiaMho9JrcFxUkSj0HQMK0DjYailFRVE6oBROaCXkuiSDPdSqDwVjAti8OuP796c8zu/vc/5nd+Dy+N8Z+4cfnvttc86e6+193qcQ0f86AGMBY4GXgE6AJPMv3fE8GXIUE0cFnrZAVgDvAzsAn4B3AjkgBPbUa4MhzcGA8fE0A9WvRwKdEvD8GEk9DHAcOA183tuxUXL4MLRwEbglIR+TwATqy/OAcEJwOSEPgerXtYCDwAdi2VoQFZpUQ/0AWoqK1cGD+4FHimi30BgGyl3z4MQNcBvgGMT+h3MenkucGd7C5EhGe8G3gTOSuh3lLmuAK6tqkTVx+eB77W3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0MLOGTgvuzbYtwZvVJ1sgYZ2WaP/LaOFpemb8OdgexPkCX1YQ3KphbABq5jCIJJa8U22/O8Q6hq4jpz32a0c0ZRA3yc4pMHUTRSepJjpeH9jId+Jim+D6ogBuPOyvVGcUkrwRo2IXcnWrNZhXtju5ZgY4zSVqJT0ZW1/KbhudxBuwZ/Vq5UnXzC0HrjRqmF5isMfbyH3oA8LWdW9GrDvJ2gzrEWBeY5tBjdXYxVRA3KhOXQrroA+AGqrcwD/m1oc0ocv5HSDWy0kSmHYpupRrb5aN7WlyhTuZiJdvm/oLmbjNLnbebPGsa7UJLEpdxfQs+1G8WnU1DZYRPKOu4j/509O5bLPYQg5R8tBYBcrs0orouiVJ28zNB9n/FEX5WaTFBra8bvXs5DMWFPD/1S4PceGqCaS7MZxCr1ahQYl/O2drkYg2pGG9BCbkO77Hzgq/gnJAmNlFcHG4Z2y9fRXG1B9ZfpJLu11cJFSBmbUYJoD3L3fkIQX0Dwhrhvt56AlHkP2iweRFnYrRQmRexYvuKtqxQQxs143CpK08nOaE3iss890Wb0GnrGVvQlg++/LOiGTntf6QJ0AAyJoe/HVPQw2ScqGcKwblnal3OTUIvekI97gSGtTt5i+g8uT7T9sPUt34ewfUjxXxfYzwEO9U/RM6RHR/Jf3bI4DyUA1pP8yUYpGEFh4iSMtDpZi06lX5cpF+ikfJXCLyHCmE4KT2oL+igww5GHASj2ehoF/T8kyD5upnInggsX43fRStHJs1EtsNwPLvujlwl6eegfxR1fOmE/T4+z1gyHL/qhN/A3IENrQ/HuFNrvk5hMJzNkyJAhQ4YMGTJkyJAhQyL+D4Jm6k2T/HltAAAAAElFTkSuQmCC\n", + "text/latex": [ + "$$\\tilde{\\phi} = C + e^{p{\\left (r \\right )}} \\operatorname{sign}{\\left (\\tilde{\\phi}{\\left (0 \\right )} \\right )}$$" + ], + "text/plain": [ + " p(r) \n", + "φ̃ = C + ℯ ⋅sign(φ̃(0))" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": {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yug82HCn0EOMaahEpweSQu05Zuy04y4WHbEtH9LsbSBF/CS5Eq3kJwqU642OR7snccvoOCpQ1cvFOJTobqU4nzaMJr9AEIc9Wp/1s+f22pYPWextHuGQrVMwBh0kK+TjmsFok6+2CPoc6jgV5SZLUHI7l6ha9hqd56F9uIBw6LMDffBWCNpjWz6k2duH8edfZbyDMQidOH4FLZgWVAWbRemO8ttPocsRRBlllFFGGWWUUUYZZZRRRgfwPxdg0lYotc2JAAAAAElFTkSuQmCC\n", + "text/latex": [ + "$$R{\\left (r \\right )} = e^{p{\\left (r \\right )}} \\operatorname{sign}{\\left (\\tilde{\\phi}{\\left (0 \\right )} \\right )}$$" + ], + "text/plain": [ + " p(r) \n", + "R(r) = ℯ ⋅sign(φ̃(0))" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAHMAAAAdCAYAAACZvVPMAAAABHNCSVQICAgIfAhkiAAABNJJREFUaIHtmmtsVEUUx3+7VWxtpQoxRoMGY4s2kFAtkZgoQvBJTPwiGmPQVT6IilHRL0oM+IqNL0j8YDABqwarBERjjAkCmlR8RIk1QWuNpm0MPopURLRoofjhnOve3p67e+/stqtk/slm7p3/OXOmc2bmzJnbKuIxBVgMnAR8C2SBFfq8v4Cex38MWeAbYBcwCLwO3AccAc6oYL88HDADcdwkYDbwo76/UslOebihDpgVeq8FGoFMZbrj4eHhcTTjCSRezql0R45CvAT0I2EsKVoQfyx2MbgNGAYmuiiXGY3A48BOYA8wpOVW4Hbg+Ar06V1kcMO/fqADWFhAbxYyrsscbG5GDqV1aRV/RdKUSiIDPAz8hQzWDuA5oBVoB/ZqfUcF+rYXccpDwErgUWAjcEj7dE+M3hZgH1DjYPN8bfuBNEpnqdKrDgbLiRe0H18CMw2+BliucmmQ03bnOvYrGJ+vDW6Jcr0GNw2ZAM872gXoAvqAqkJCVcBS4HPgoHboMNCDzIRsCR1wwTLtw1fACUVk087yHKU58zrVX29wU5X70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s4cSe9/Dw8PDw8PD4P+Efy5Naw5c6ydYAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\tilde{\\phi} = C + R{\\left (r \\right )}$$" + ], + "text/plain": [ + "φ̃ = C + R(r)" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "C = Symbol('C')\n", + "p = Symbol('p')\n", + "p_sym = p\n", + "r = Symbol('r',real=True,nonnegative=True)\n", + "R = Symbol('R')\n", + "eq_phi1 = Eq(phi_t, C + sign(phi_t(0))*exp(p(r)))\n", + "eq_R = Eq(R(r), sign(phi_t(0))*exp(p(r)))\n", + "eq_phi2 = Eq(phi_t, C + R(r))\n", + "display(eq_phi1)\n", + "display(eq_R)\n", + "display(eq_phi2)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "alpha = IndexedBase('alpha',shape=(5,))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Where $p$ is a polynomial with the $\\alpha$'s as coefficients" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAToAAAAaCAYAAAAnmZDeAAAABHNCSVQICAgIfAhkiAAABqlJREFUeJzt3GvMHFUdx/EPFQpKjaTwQjBiY1AQKFSrhhiBglTjBTEG0ph4GYyXUAz2hSbCC2mMigkSsQpSNVJeQDSBWILcysVHBBSp4RG5BhsrlyjVQBCiUKuPL/4zYZ/pPnuZnd3Z7Z5vMtndOWfP/M9vzp45l/9/SSQSicREcR7m8P2mDWmAs3E//pkfv8EHG7Vo9JyLe0X9/47rcHSjFiUSNXMc/ow/mM6O7jR8AG/Cm/EN/AfHNGnUiLkZZ4rObTl+jr9haZNGJRJ18Rpsw8mYMZ0dXTueweebNqJBluC/OLVpQxLNsqhpA2rih7gatzdtyJjwCnxM/NDvbtiWJnm1aOPPNG1IIjEon8XvsTj/PGN6R3TL8QJ24VkxlZ1mf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pZ1maXCJ+sJu+/itbJdvcPYYnNkZZd8nVial/Fom7Rr87ROnXdd4WWZ6usW46BDK4OElmWq6VCHBtSnwyDhZZnhtIW66jaH0yvYVpCpVr+q9t9j982Jx8SGHObP8QvhThe9e8ESXIUD8UWxELgQy8TTrtcj61AW8fTaiT92ydeJZ0W0wGHmB7ifhQ/n7zuNQschvGwcdKDZ0LI6NKAeHWguvKyTDnXVrSmq2L9Y9F3lDnCL8Auex97CKW9W/APINuGcd6nwW5kT05dRUmyObK2hrO+JOuwQa2zXiPWNzfhlnnaZ8Ntppc7wsky1p9w46FBnaFmmfx3q1IDqOrQySHhZZnhtoY66NTWio3/7D8nPnVAq56vajAyPzTP/QPzNz43CH+l5sQ7x3goGD8rK3KaNNZS1n/D/e0IsdO4Q3vP7CM/yYtt6dct36g4vy1S7+U3rQL2hZZn+dahTA6rrUDBoeFlmeG1h0LrRbEfXr/1FR3d8qZzztXGkPzPP/LkKhu2pZEKTXS3HnHi6tAsvmyZuxY+bNqIhLhKL4Uc2bcgQGbSjGyWLxe/xjNL5S7RETRVrdMVOzn3Dt2ti2CymbCtajq0i7GyF+eFl00a70LJpYAM+rnt4WWJ07BTLS+UR6mpt1pHvEr3iNDbefpgxnv+MMkx6DS3b0+knvGwSWeLlB/ocvpS/P7RJo3pkjejwPoO3CJeXF/CG1kyL8pPdHB8T09nRbdI9tGwaWMhFan2DNtXJKtVcwMaFtcK97SUxwitvTiQSiUQikUgkEolEIpFIJBKJBvk/lf0F3RF1DbYAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$p = r^{4} \\alpha_{4} + r^{3} \\alpha_{3} + r^{2} \\alpha_{2} + r \\alpha_{1} + \\alpha_{0}$$" + ], + "text/plain": [ + " 4 3 2 \n", + "p = r ⋅alpha[4] + r ⋅alpha[3] + r ⋅alpha[2] + r⋅alpha[1] + alpha[0]" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "p = alpha[0] + alpha[1]*r + alpha[2]*r**2 + alpha[3]*r**3 + alpha[4]*r**4\n", + "Eq(p_sym, p)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "rc = Symbol('r_c')" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAM8AAAAbCAYAAADbLttmAAAABHNCSVQICAgIfAhkiAAABGpJREFUeJzt22moVGUYwPGfV01NUrqVUGpEC1S00YJhZrdNbIMo2gSDaKGFqCCIEsMvUdGn+hAUVEMFiRotFH1Io4WMiHKppDKiKCskCqyMsrQPzxmYO3fu3DN35syZwfcPh7lz5pwz//vOed7leWYojgF8hDUFvkenWY9N+Az3l+ySl7l4G1uE+2Wl2iQ6wm1Yqb+CZ0b2OBEf4KQSXfJyME7M/p6F77FveTp7DwMFXXeW6AGfLOj6RbEje9wn2/qBn8SIA9vxGw4sT2fvoajgeQTLsbug6xfJh+ImXIuNJbu0yqmYLEafRMEUETwLsUesH/qReZgtpmzHlezSCgfgWVwv2j/RhyzHNnyLn/EnnurC+1awoo3zJ9c9vwd3t3G9vFS07z0F72JpB3zyUtHZ9u4kFe255aLdkWeO6OWWiA/vb3wneu7DcDXeEL1hLafhLfyFrViAK7NrdING3ktwUPb6VCzCF3Xn9ap3JfN6bpTzetH7mh5xK83hYtEon2AxjsBgzetDRmbb5mWS9+IovCDEN+GsNlwq8vc2jbxPxsfYrHGqule9F4q15caa7fg+8B7sEbeiHMZkGXbi8BbOeV+ksKtchP/wZt1xrdaJKvI3WFHe46kTVZTrPd46UUX73nna9FWRQWyl5NGKWx6HC/GlGJVubcGjKauxqoXjZ4seaKhm36Js3+l1x45VJ7oPf9Rsu/BP3b4zu+ydp07Ua95560Sd9s7bpmfjEs2DZ7xueRwmiaCZK9pli2iztvlKa5FYFav9cO4QPXUts7AO5xi90QZxZM32Ih6r2zety95VpokpYKPg6WVvYtp6aBe8W3Eb0jx4xuuWx2E+Xql5/gBuJKKqEZfjBrGQmiGSAM/gYTGkwXQxd93Q5J+qZz8xP6/Wf2aKuea2uuOqdaJmhcpfs63K79nzr8dwKNKbqBMdi8c1rhP1qjfN60Sd9m7VrRnjdcvjcIjh7fGDGLFGZNsmigXTGhGtq8VNsFtE3NM1x56QPW4eQ7CWDdl7LsPReD4TrfYOFF8nKsq7SlF1oqK9i6oTjebdiltR5HGY0OC8PYwMnkdFevkhHINbcKe4CdbjWtGrEvPkraKOk5dvMtGbRa+8A+fic7yXHTMf54s60UpcoLN1oqK8a9khMjaL2zIdTpHeU/ASHtT5Tms071bbtAjyOGwT650qc/Bj/YXmiRHm5VHe6CYRcdd1wjonQ/rni6UzDa8TrRMp2l5ngphtrCjZoxlDyrsPJonp31yxbtoipnLD1jy3i4bcqXFDVqcgjYaxBPuLhepkMaKvwmulGuXjDFwlplWXZvuW4tPSjIazVoxe08V64wqRyewW/+Iu0RkOiNnZiJFnuxhZxtrO64pyItEnTBWB8U7ZIolEv1BNGFSnYul3IInEONgkRp/Rvp6xQKSyE4mE4Yv/RXhdJBHWigXkgKhZnCIWwo0qz4lEQnyjYI34Hc4u/CKyLk+I/HcikUgkEolEIpFIJBKJRCKRGI3/AcjssBFtc2I0AAAAAElFTkSuQmCC\n", + "text/latex": [ + "$$e^{r^{4} \\alpha_{4} + r^{3} \\alpha_{3} + r^{2} \\alpha_{2} + r \\alpha_{1} + \\alpha_{0}}$$" + ], + "text/plain": [ + " 4 3 2 \n", + " r ⋅alpha[4] + r ⋅alpha[3] + r ⋅alpha[2] + r⋅alpha[1] + alpha[0]\n", + "ℯ " + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "R_def = exp(p)\n", + "R_def" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Solve for polynomial coefficients\n", + "Now to express the $\\alpha$'s in terms of various contraints on the wavefunction (The value of the wavefunction and derivatives at the constraint points are the $X$'s)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUwAAAAcCAYAAAAKl4YcAAAABHNCSVQICAgIfAhkiAAABxxJREFUeJztnG2oFUUYx39pXs1uZdeSlEwJSyvf0JLINJOiLMuSRPq2SpKp2P1ghQa+RGWglZlGWqRCSkEvmll2KbsZZWGRpZUl0Y2KfCmttNJePH145uC6d8/uObOzO3vunR8s95ydPbPP/Jl9ZnbmeS44HA6HI3VmAQVgiW1DMmYq8Bnwuzq2ANdbtcgOM4GtiAb7gPVAX6sWORw55VLgW+BTWp/DHANcB5wHnA88APwD9LdplAXeACYgTrIf8DKwG6izaZTDkTdOA74BRgKNtD6HGcZ+4HbbRlimFvgPuMG2IQ5HWrTR+M1y4AVgk2FbqpG2wK2Is3jfsi22OQXpT/ttG+JwKDoBvwK/IP0zSBvElxWAp9MwYBLwMVCjvjfSOmeY/YBDwL/AAeQVvbXzPPAJMog4HHnhPsQhzgwpW6LK1pNCv+2NLO738Z1rJJ8O00OEGJFS/TVAL+BiYD7wM/nb8PBIVwM/C4CfEE3yhkd2OuQRj9bd/tOB35BntNZ3/l5Ely1AR93Kr1SVLACGAOuQV6wCsjtcQGZVxaMAHFWf2wfqagfUA9uAv4AfgEcRZ9MR2AOs1jU0Bg/9ThKlwUUlfvMmpaf0tnTwSPaglKvDw0gbLoypr6XrEEW1Pgtg13ZT3I9ocI/6PkF93wl0rqSiEwPfB6m/fYHpwGvAMuAc4DngncD1K4BdwIPA377zdcBG4BLgVWRHdTQi/I+Ik60D5lRibEZEabCzxG/aAB1Czrd0HRYD4xGn8kVEXS1dhyique3VbLufR4A7gRlIdM9y5I3oWmR9U5vViOc9iIQOxdFI+Ct5g6pnuu/cGcBh4C3E2KeSGBqDh/6oGqfBQ8AwoCeyljkf6TijQq61qYNHsplFnA5PIDGYI4GzfEdtyLUtWYc4qvlZyNL2emBuBcdNFdY/H2lLAXlFH6Bv6jG+VBVOL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obquvkR5Yu3jRlNdPMS4clMubZKWBlFEpV3aIisdyk27tMEYpH+mqYEJh5klNYgm4wLnl9I8SzDvJNK+nNFUl07IDMp/bAXWqM/BoFlbpKlBFJuAZzO+ZxRZ6bCY/DpLkKWSo8CpKd6j2hwmyKbP8sC5r4nf9MkbibTPYjT100j+/gtSFhpUknZpiyx0qCTt0hadkU2oNcg/4eiDrMUn/a9VtUjs5ECOhb8MJD4sJy+MR9Z+b0PCihYha/I9bBpVJsa0z2I09dNI/hxmFhqspLy0S5tkNbMKO+ameE8dhiJLE4eQDboGZEMhCSPQC6PJE1OQMKEjyGZucBMor4zAkPZpjabVhNNAcDo4HGWQxmhabTgNBKeDw+FwOBwOh8PhcDgcDofD4XA4HDnjfwxXavsyBcR+AAAAAElFTkSuQmCC\n", + "text/latex": [ + "$$r_{c}^{4} \\alpha_{4} + r_{c}^{3} \\alpha_{3} + r_{c}^{2} \\alpha_{2} + r_{c} \\alpha_{1} + \\alpha_{0} = X_{1}$$" + ], + "text/plain": [ + " 4 3 2 \n", + "r_c ⋅alpha[4] + r_c ⋅alpha[3] + r_c ⋅alpha[2] + r_c⋅alpha[1] + alpha[0] = X₁" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X1,X2,X3,X4,X5 = symbols('X_1 X_2 X_3 X_4 X_5')\n", + "# Constraints\n", + "# Value of phi tilde matches orbital at r_c\n", + "eq1 = Eq(p.subs(r,rc), X1)\n", + "eq1" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAATAAAAAcCAYAAADm4uMKAAAABHNCSVQICAgIfAhkiAAAB8ZJREFUeJztnHuwVVMcxz/VRRFut/Ia1BgUSo1oGCRhyGMiTOMPYxcGk8kdc2nKxGGkyLMwwjR51EwzkeSRhKtQo9TtoTxHXnVvQuQRLtcfv7Xn7Hvu2mfvs/faZ59d6zOz596z116/te53r/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aUm95/kg3Xqo9IEB5UbVzCXusS6H6G0tbt3TcGDumdd1tN3Q8OKGz9QWeaasR+rC9IZRccj33u7VgvRGzUhvnWWS1E5HseNdWWEY8u6T1CzMsa5KJs0pZFzKqn3Y3jAq1ciIwXutAGar37P8XwyS1k7H28DzZSwvCc5HOrD9ErI/lWw7L8iuAyu79uXoDQupJ/oUspJIWrtSjndlia7Ibups5FB3b2Sd1MR/Pgl7rKsS6YzEnvUnH67QHzk7mgVS0T7p3lBHPbuGA0tau5mEO96VRU5Fpt6/IZsTiygeVxYWvzW6nAHbSTOYaGEPlUIq2ifZG+7qWO0slgogqd5wd8BqZ7FYLBaLxWKxWCwWi8VisVgsFv4Hs0hh3bDGwYIAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$4 r_{c}^{3} \\alpha_{4} + 3 r_{c}^{2} \\alpha_{3} + 2 r_{c} \\alpha_{2} + \\alpha_{1} = X_{2}$$" + ], + "text/plain": [ + " 3 2 \n", + "4⋅r_c ⋅alpha[4] + 3⋅r_c ⋅alpha[3] + 2⋅r_c⋅alpha[2] + alpha[1] = X₂" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# derivative of phi tilde matches orbital at r_c\n", + "eq2 = Eq(diff(p,r).subs(r,rc), X2)\n", + "eq2" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAi4AAAAcCAYAAABGZzRQAAAABHNCSVQICAgIfAhkiAAAC9JJREFUeJztnXuQHEUdxz+5JEIg0RBeaglBSgUkCAUa8RWOICqI8hALLMtyAC21oEK0ogiILhQQDFHAYCr4CIcSqihBQAwvQSMPQYMQHgIxBqKIJOGRAGIiOVz/+Pawe3OzM7M9PTM7l/5Ubd3tTndP73d+v+6e33T3gsfj8Xg8Ho/HmlOBpcCLwDPA9cCUSmvk2Vw5EXgQ2eKLwN3AxyutUX3wfuzpJbw9egrlZ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ch/E2mhxg+ubmdcBn4zMjndfipldfIcsdhS0BrpBu+msjQB9EdUV05HH2HMn5ZNGnL+6JZiBy2DLwt2lOkdnFUaZOuKMOHXWx3XyVpA5dpaBfZsuyuDtT9mocM8fGitvy3YTLa+ve95F+eGse1DA/TXopCi+eiiEdd2YScdTxaDlgknba8L4MFwE9LOI+3RXuK1i6OKm3SFUX7cK9vd++Cj6DdY8uyu15nJF3znvXxMqMGIUuwD8/3EtuiWddXoDkgu6M5FHlDa91seV8WV6PwYZF4W7SnaO160SZdUJQPg9vt7stmPNo3ZR8UcZll/t85kq4PrSKcUGrtepc6X/Na+fihqHKvL/GcSxgZnQVotvhdaELTOrRELmlPiSwMkG3L+zLZjWJ/uwa8LeahaO0G6D2bdEURPgyd51I0HJRdNP3E130gku5ItGWCR9T5mg9QIx8v8o7DM7I4jmL2LAnxtmiP185TNhPQ7rN+bounEoq64/CMPD5ZcPneFu3x2nnK5CCybWLm8Xg8Ho/H4/F4PB6Px+PxeDwej8fj8Xg8Ho/H4/F4PKXwf+nJPPVn9ZnPAAAAAElFTkSuQmCC\n", + "text/latex": [ + "$$12 r_{c}^{2} \\alpha_{4} + 6 r_{c} \\alpha_{3} + \\left(4 r_{c}^{3} \\alpha_{4} + 3 r_{c}^{2} \\alpha_{3} + 2 r_{c} \\alpha_{2} + \\alpha_{1}\\right)^{2} + 2 \\alpha_{2} = X_{3}$$" + ], + "text/plain": [ + " \n", + " 2 ⎛ 3 2 \n", + "12⋅r_c ⋅alpha[4] + 6⋅r_c⋅alpha[3] + ⎝4⋅r_c ⋅alpha[4] + 3⋅r_c ⋅alpha[3] + 2⋅r_c\n", + "\n", + " 2 \n", + " ⎞ \n", + "⋅alpha[2] + alpha[1]⎠ + 2⋅alpha[2] = X₃" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 2nd derivative of phi tilde matches orbital at r_c\n", + "eq3 = Eq((diff(p,r,2)+diff(p,r)**2).subs(r,rc),X3)\n", + "eq3" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAEcAAAAWCAYAAACSYoFNAAAABHNCSVQICAgIfAhkiAAAAoZJREFUWIXt11uIzHEUB/DPWpd1X+tWiiRFQl5IKXngQXmSPJMUT7ZNrlEuJSFh1SoPPFDKNUp5sSkUqXUrHmRDG+uSO7k//H61/52dGTtmZnfKfOvXzO+c37nM6dyGMv4LVOMtXmNgGn4PnMRvHO5Cv0oGW4Ufvz4Nrz7yzqOyK50qFQzBO7zCgAR9oxCY6+iXj4FeqEUTvuAZ9qJ3VPwCx/IxUGRsFwKxNt6XxvsDDM1HcQ1uaEu/nbgf76tRh+8Yn4+RIqMGH/ASiwV/WzA2V0UVKfdLmIdV2B9pw4TsuYpJuIDl/+B0ErVCA+0smnA2h/c7sC5+f4/ZuJ2DfAfMFTLkio5BexB5XzE6HyMRzVFfZ8+RHPXPSsguKIC/jkZlC9PwmiJvXwp9tlB+LZG/qBCO5IlR2gd/TSdkNsS39ZkeNOOb9N28CZ8wMoU+X2iAC5VGcKpxJ/qyCR/Riv5ZZGbisVB27YLTM372xRg8wucU4XGYiGvCpEriYjy5ohg9pwrnMEXYd7ZhkDBIVmJ3GpnBwuRdhs2ZFNcI0X6Yhncu8i79xblcMqdZYXtOJU7Ht4cS9OFCxr+QviJOCBMZGmUoqwph/P3E1AR9ZcLBG39xsDvLqiHaP6Pj9rsr8upS6MtxS9jfyBIcOBCVtOIgTuGXkM6XI68B0zPId1dwtmibslVp+COE7HkutA+YIOxBExPvGmUJTpVQl0+FxakVe4SNeYa2cT4vg3x3BGdFtHtX9h62O76rjfcl8f4jcX4LyfADfQrtaClMq86iGpNTzk0cj98raJtW/4oB2v+VGItpeIMneeouJt7Gk8Qnwe97hTIyR2E22lJAoyw9p4wyyiij2PgDxZTBOrqyVl4AAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\alpha_{1} = X_{4}$$" + ], + "text/plain": [ + "alpha[1] = X₄" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Cusp condition - derivative at zero\n", + "eq4 = Eq(diff(p,r).subs(r,0),X4)\n", + "eq4" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAEcAAAAWCAYAAACSYoFNAAAABHNCSVQICAgIfAhkiAAAAstJREFUWIXt10+IVXUUB/CPf5IpM3TKEkGtcJFB7tKFZJtxIbQqctaCA42LHAYxRdSxghBHUkscrYUtpBZNKboSRAxSEoLJCFSQBir/TAY5ZaamuTi/YW733TfO9N6bRnpfuLz3O+f8zu/8zj3/LnX8LzAVv+IXTCngj8en+BsfjqJdYwZvisuvK+C9n3iHMGE0jRormIaruIKHM/T1wjEn8VAlBzyANvTgOn7Eu5iUFF/G/koOqDHeFo54I62Xp/UZPFqJ4kacMhh+W/BdWq9GO25hbiWH1BiN+A0/Y5mw9wKeHKmicbn1ESzBKuxMtMdE9HyJZ3EYLf/C6CzaRAEdLnpwYATy72Bt+t+PxfhmBPtL0CQi5AulTjuTeH9iViWHJPQmfcN99o1Q/6LM3peqYK+PkrKXC3g9ibejgLcS3wvHfY0XqmFMBZjpn85fU0auQ+lLuFROaS9uKq7mPbiGJ3L0ZpHTLZgnUvF3zB7GJWqBqTgtLroh2dKHyQWyHSIjZmSe6VmBien3QXGh8/gjp+RpPIMTolNl0S5C/oO0fh1L0ap41hhALWpOAw7iOTHvvIVHRCNpRWfBnr8MES0DaBTePlvAO5h4R3L0SUn5qzn6Lhy/x3m9qltzJuCzJLsnQ58uIv6y0ozoEIHwkygLHyvT0caJ9ncb8zP01oyBp3J7Zib64hx9o2In1xJdyZbPlU6/WxOvPUdfildEpDXhKC6KQCnBe0lJn3j73bgjwvlY4nXh+SQ/4Jx8Ad4kcnm0sNlgl20o4D8uoueSKB/lMFlEWN6JJMWd+EEU2T5sExPzAoPtfEmSryStqoXXkk3fGrqGdSa5tnvoO4bd1TGNr7A3RzsnhrD7DQ0irTZWS2GzaP8rRCvfLtrnnGodUEN04kU8hYVi8u9XZdtXiu5zQwyB+QI9VvGJ+Oa6KTpWt/g8qqOOOur4T3AXRHjHe1MSqXgAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\alpha_{0} = X_{5}$$" + ], + "text/plain": [ + "alpha[0] = X₅" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Value of phi tilde at 0\n", + "eq5 = Eq(p.subs(r,0),X5)\n", + "eq5" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Solve for the polynomial coefficients ($\\alpha$'s) in terms of the wavefunction and derivative values ($X$'s). These should match Eqn 14 in the paper." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABd4AAAAlCAYAAABcZfsvAAAABHNCSVQICAgIfAhkiAAAFwpJREFUeJztnXvYHUV9xz+5FBICGAgErAJCsXKL8BQfKBfDIalSKVS8U7wdilaeQktq0QhUPVCUO6hQCooYL1ARkCIFioB9i1KkUO4F1AKxSEgAEYNKgcDbP357POc92cvs7uzt7PfzPOdJ3p3d2ZnZ2d93fjM7MyCEEEIIIYQQQgghhBBCiNLZsuoECG8sBK4CVgCTwDurTY7IyDHAbcBq4Ensme5Ug7hEu1DdEaI6pOfVIy0WdUB1R7QZaWH98GWTZNtEHlR/RFmsA8yLO2G6QyTHAht7SY6oA3OAu4EjC4h7vwLiFOF0gHOBPYFFwBrgBrK9qz7jEu2ig+qOqIZ9gHWrTkTF+NJzaXd2OkiLRfV0UN0Rfmiithbl20obs9PBj03yFY9oJx1Uf0R+XHRxDXA8sGHWm3wIOCzrxaL2+Pwq4GDUQKmS9YGXgANrFpdoF6o7oizmAqdXnYgakVXPpd1+kRaLOqC6I7LSdG315dtKG/3i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{3}} \\left(8 X_{1} - X_{2}^{2} r_{c}^{2} - 5 X_{2} r_{c} + X_{3} r_{c}^{2} - 3 X_{4} r_{c} - 8 X_{5}\\right), \\quad \\frac{1}{2 r_{c}^{4}} \\left(6 X_{1} - X_{2}^{2} r_{c}^{2} - 4 X_{2} r_{c} + X_{3} r_{c}^{2} - 2 X_{4} r_{c} - 6 X_{5}\\right)\\right )$$" + ], + "text/plain": [ + "⎛ 2 2 2 ⎛ \n", + "⎜ 12⋅X₁ - X₂ ⋅r_c - 6⋅X₂⋅r_c + X₃⋅r_c - 6⋅X₄⋅r_c - 12⋅X₅ -⎝8⋅X₁ - X₂\n", + "⎜X₅, X₄, ────────────────────────────────────────────────────────, ───────────\n", + "⎜ 2 \n", + "⎝ 2⋅r_c \n", + "\n", + "2 2 2 ⎞ 2 2 \n", + " ⋅r_c - 5⋅X₂⋅r_c + X₃⋅r_c - 3⋅X₄⋅r_c - 8⋅X₅⎠ 6⋅X₁ - X₂ ⋅r_c - 4⋅X₂⋅r_c + \n", + "───────────────────────────────────────────────, ─────────────────────────────\n", + " 3 \n", + " r_c 2⋅r_c\n", + "\n", + " 2 ⎞\n", + "X₃⋅r_c - 2⋅X₄⋅r_c - 6⋅X₅⎟\n", + "─────────────────────────⎟\n", + "4 ⎟\n", + " ⎠" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sln = solve([eq1, eq2, eq3, eq4, eq5],[alpha[0], alpha[1], alpha[2], alpha[3], alpha[4]])[0]\n", + "sln" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAa4AAAAnCAYAAABXPaw+AAAABHNCSVQICAgIfAhkiAAACntJREFUeJztnX+wVGUZxz+AIIkGAmI4EklNoUFUiCNhecGaiiwz+zHRlGumWThERpHRD9QSHXIwMaefpE7QGBX+GKMo9EY1NGJyFQPFzFsYctEof6RI6PbH9925Z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yUX5TyzAMoxMxX5yAmUhZI3z3J6DzF7eiX3e2PSeGYRitI8wXg/njGi5Ap314GYZ2vc92r0ei5ZiGYRhGawjyxWD+ODYfAn6YtxCGYRhG4/64nc+1aoSpxDvl3jAMw2gtDfvjTmu4+ug/AmUw2gBnGIZhZI/545gcAfwS/SroVrQBzjAMw8ge88eGYRiGYRiGYRiGYRiGYRiGYRhGx/B/pmjaH2oqqpwAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\alpha_{2} = \\frac{6 X_{1}}{r_{c}^{2}} - \\frac{X_{2}^{2}}{2} - \\frac{3 X_{2}}{r_{c}} + \\frac{X_{3}}{2} - \\frac{3 X_{4}}{r_{c}} - \\frac{6 X_{5}}{r_{c}^{2}}$$" + ], + "text/plain": [ + " 2 \n", + " 6⋅X₁ X₂ 3⋅X₂ X₃ 3⋅X₄ 6⋅X₅\n", + "alpha[2] = ──── - ─── - ──── + ── - ──── - ────\n", + " 2 2 r_c 2 r_c 2\n", + " r_c r_c " + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Eq(alpha[2],simplify(sln[2]))" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAAnCAYAAAD3osTQAAAABHNCSVQICAgIfAhkiAAACiVJREFUeJztnXuQHEUdxz+5I8nBEYKJJIYi5kCkEI2kDEEhES4UliYiEF9oLHQURV5VBLXk5eMiilKBEkHBtxcLNIoYHmIUE9BYioKaE6JBIrIaxCRA1MgrRDz/+PbWzc317M7Ozuy8+lO1dbfdPTO/nu/0u+e34HA4HA6HIxW6gUuAh4BnzN9PAnv40owDNgJXBI49xhzz3vTNdCTIADAc+GwNpHGal4OzgXuBneZzF/D6QJoiae3qqxxxEbADeAPQB5xovn80kO7twJPA8833l5h0l3TESkeSDAD3Ay/wffazpHOaF5+TgMXAi4FDgE8Bu4GXB9IVRWtXX+WI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ac{5 X_{2}}{r_{c}^{2}} - \\frac{X_{3}}{r_{c}} + \\frac{3 X_{4}}{r_{c}^{2}} + \\frac{8 X_{5}}{r_{c}^{3}}$$" + ], + "text/plain": [ + " 2 \n", + " 8⋅X₁ X₂ 5⋅X₂ X₃ 3⋅X₄ 8⋅X₅\n", + "alpha[3] = - ──── + ─── + ──── - ─── + ──── + ────\n", + " 3 r_c 2 r_c 2 3\n", + " r_c r_c r_c r_c " + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Eq(alpha[3],expand(sln[3]))" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUAAAAAtCAYAAADfjbKaAAAABHNCSVQICAgIfAhkiAAAB+5JREFUeJztnWuM1FQUx38sgsCii6ggRnzg24jyAYwIykg0KmI0RkPUaMao8ZkIhgQfCZIYRYPEtzGoEYwPfD8wRhKEDR8wSoT1gRqVMEZEQcX4QEEW8MPpuKV722lnOu093ftLmt1pOzP/M6f3tL333FNwOBwOh0Mpw4F24AvgE+DCXNU4HA5HhgwDTvT+HwJ8DwzIT47D4XDkx6fAwXmLcDg00JK3AEckvYDPgbmB9acBW4GrA+tHA32Qq0CHw9FDuBG58vnDWz4Azg3skzSY2MIlwBZgP+/1scBm4K7Afvsi/YCnZCctktuAlYg/fgYWAccH9tHqE6e7+RS5TafO+cAk4EjgKOBuYDtwQmC/uMHEJlqAr4F7gKHAOuDZwD57AsuBy7OVFsli4Eok6I0E3gB+AgYH9tPoE3C6m02R23QmbAauDayLE0xspAz8DnwMvI/c5lbpBbwIzMpcVTIGAjuA8wLrtfrE6c6eIrXpptEbOSv8i1x5BCkTHkxspR/wJ/AN0BbYNh7YCXT4FpPdeTMM2AWMM2wro88n4HRnRRHbdOqMBP4COoHfkMtnE1HBxFbmAf8gZ8C9c9ZSLy8Bq5GDOYhGn4DT3WyK3KZTpy9wBDISOhv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{c}^{4}} - \\frac{X_{2}^{2}}{2 r_{c}^{2}} - \\frac{2 X_{2}}{r_{c}^{3}} + \\frac{X_{3}}{2 r_{c}^{2}} - \\frac{X_{4}}{r_{c}^{3}} - \\frac{3 X_{5}}{r_{c}^{4}}$$" + ], + "text/plain": [ + " 2 \n", + " 3⋅X₁ X₂ 2⋅X₂ X₃ X₄ 3⋅X₅\n", + "alpha[4] = ──── - ────── - ──── + ────── - ──── - ────\n", + " 4 2 3 2 3 4\n", + " r_c 2⋅r_c r_c 2⋅r_c r_c r_c " + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Eq(alpha[4],expand(sln[4]))" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABaUAAAApCAYAAAAlDkU7AAAABHNCSVQICAgIfAhkiAAAF35JREFUeJztnXm0JVV1hz+amQZEGlqIEAY1QaADK7JABuECMSjBqDgRIljGZMmSJBBDRCTolYUyBxVCCBFE44AiIYQgUSB5wQEVbFoggBCxEwSaQcBGIUy+/LGr1qtXr+Y6VXXq3t+31l3d71bVqVP77tq/s0/VOQeEEEIIIYQQQgghhBBCCCEasAi4Cfhq3xURQgghWuY7wA+B24EP91wXIYQQoi22BmaAOzDdO7TX2gghhBBCpHA0cCnqlBZCCDH5bBz+uyZwI7Brj3URQggh2mJLYJfw/0uB+4AN+quOEEII0YxFfVdAOGcp9tT8wr4rIoQQQnTA6vDfdcKPEEIIMYk8iL0hDfAw8DiwWX/VEUIIIZqhTunJ40zgJOBXfVdkyjkBm0JlNfAIcBWwswdlielCviOmhe9hCfp1wIqe6zINuIotilGiCfIfMc3sBqyNvS0t/Ee5ofAB+Y7wDnVKTxb7AbPY/JqiX0bA+cBewAHA81hnyaY9lyWmixHyHTHZrB3+uwfwUmzqDjWu22eEm9jiqhwxnYyQ/4jpYe3Y/5cAnwPeg+V+wn9GKDcU/TNCviO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{4} r_{c} - 6 X_{5}\\right) - \\frac{r^{3}}{r_{c}^{3}} \\left(8 X_{1} - X_{2}^{2} r_{c}^{2} - 5 X_{2} r_{c} + X_{3} r_{c}^{2} - 3 X_{4} r_{c} - 8 X_{5}\\right) + \\frac{r^{2}}{2 r_{c}^{2}} \\left(12 X_{1} - X_{2}^{2} r_{c}^{2} - 6 X_{2} r_{c} + X_{3} r_{c}^{2} - 6 X_{4} r_{c} - 12 X_{5}\\right)$$" + ], + "text/plain": [ + " 4 ⎛ 2 2 2 ⎞ 3 ⎛\n", + " r ⋅⎝6⋅X₁ - X₂ ⋅r_c - 4⋅X₂⋅r_c + X₃⋅r_c - 2⋅X₄⋅r_c - 6⋅X₅⎠ r ⋅⎝\n", + "X₄⋅r + X₅ + ─────────────────────────────────────────────────────────── - ────\n", + " 4 \n", + " 2⋅r_c \n", + "\n", + " 2 2 2 ⎞ 2 ⎛ 2 2\n", + "8⋅X₁ - X₂ ⋅r_c - 5⋅X₂⋅r_c + X₃⋅r_c - 3⋅X₄⋅r_c - 8⋅X₅⎠ r ⋅⎝12⋅X₁ - X₂ ⋅r_c \n", + "─────────────────────────────────────────────────────── + ────────────────────\n", + " 3 \n", + " r_c \n", + "\n", + " 2 ⎞\n", + " - 6⋅X₂⋅r_c + X₃⋅r_c - 6⋅X₄⋅r_c - 12⋅X₅⎠\n", + "─────────────────────────────────────────\n", + " 2 \n", + " 2⋅r_c " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABWMAAAApCAYAAABQrzvdAAAABHNCSVQICAgIfAhkiAAAGZ5JREFUeJztnXuwJUV9xz/sAruwC0tc3sVjeQkBVjYEkZdwFknxFEFJDJTIEDBSQCFFMCsQYNXAYgA1qEiIkIUKgoISRAVSgBsVUEFYHgqoyDUILIiQIG8JN3/8ZurOnTvv6enpnvl9qk7de87pM9Ov7+/X09P9G1AURVEURVEURVEURVEURVEGw9rAmgaPNw24G7jO4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{r_{c}^{4}} - \\frac{8 r^{3}}{r_{c}^{3}} + \\frac{6 r^{2}}{r_{c}^{2}}\\right) + X_{2}^{2} \\left(- \\frac{r^{4}}{2 r_{c}^{2}} + \\frac{r^{3}}{r_{c}} - \\frac{r^{2}}{2}\\right) + X_{2} \\left(- \\frac{2 r^{4}}{r_{c}^{3}} + \\frac{5 r^{3}}{r_{c}^{2}} - \\frac{3 r^{2}}{r_{c}}\\right) + X_{3} \\left(\\frac{r^{4}}{2 r_{c}^{2}} - \\frac{r^{3}}{r_{c}} + \\frac{r^{2}}{2}\\right) + X_{4} \\left(- \\frac{r^{4}}{r_{c}^{3}} + \\frac{3 r^{3}}{r_{c}^{2}} - \\frac{3 r^{2}}{r_{c}} + r\\right) + X_{5} \\left(- \\frac{3 r^{4}}{r_{c}^{4}} + \\frac{8 r^{3}}{r_{c}^{3}} - \\frac{6 r^{2}}{r_{c}^{2}} + 1\\right)$$" + ], + "text/plain": [ + " ⎛ 4 3 2⎞ ⎛ 4 3 2⎞ ⎛ 4 3 2\n", + " ⎜3⋅r 8⋅r 6⋅r ⎟ 2 ⎜ r r r ⎟ ⎜ 2⋅r 5⋅r 3⋅r \n", + "X₁⋅⎜──── - ──── + ────⎟ + X₂ ⋅⎜- ────── + ─── - ──⎟ + X₂⋅⎜- ──── + ──── - ────\n", + " ⎜ 4 3 2⎟ ⎜ 2 r_c 2 ⎟ ⎜ 3 2 r_c \n", + " ⎝r_c r_c r_c ⎠ ⎝ 2⋅r_c ⎠ ⎝ r_c r_c \n", + "\n", + "⎞ ⎛ 4 3 2⎞ ⎛ 4 3 2 ⎞ ⎛ 4 3\n", + "⎟ ⎜ r r r ⎟ ⎜ r 3⋅r 3⋅r ⎟ ⎜ 3⋅r 8⋅r \n", + "⎟ + X₃⋅⎜────── - ─── + ──⎟ + X₄⋅⎜- ──── + ──── - ──── + r⎟ + X₅⋅⎜- ──── + ────\n", + "⎟ ⎜ 2 r_c 2 ⎟ ⎜ 3 2 r_c ⎟ ⎜ 4 3\n", + "⎠ ⎝2⋅r_c ⎠ ⎝ r_c r_c ⎠ ⎝ r_c r_c \n", + "\n", + " 2 ⎞\n", + " 6⋅r ⎟\n", + " - ──── + 1⎟\n", + " 2 ⎟\n", + " r_c ⎠" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Expand in terms of X's\n", + "p_X = p.subs({alpha[i]:sln[i] for i in range(5)})\n", + "display(p_X)\n", + "c_p_X = expand(p_X)\n", + "for sym in [X5, X4, X3, X2, X1]:\n", + " c_p_X = collect(c_p_X, sym)\n", + "display(c_p_X)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + " ### Effective local energy\n", + " \n", + " Fit this to an 'ideal local energy' to get the final parameter" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "def del_spherical(e, r):\n", + " \"\"\"Compute Laplacian for expression e with respect to symbol r.\n", + " Currently works only with radial dependence\"\"\"\n", + " t1 = r*r*diff(e, r)\n", + " t2 = diff(t1, r)/(r*r)\n", + " return simplify(t2)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAAlCAYAAACdxOQzAAAABHNCSVQICAgIfAhkiAAADG9JREFUeJztnXmwHUUVhz8SQl54YUsEEiCskUUSArKUIEIQAanIJiUIFvpQpCIiUqKFLBYpC1kklpAoBLQQVFQMiOwQFEFAZX8EiigCeYKAQY3sMRJ4/vHrqUzmzkz3zJ25M3Nvf1W3XjLT03OmT/fp7XQ3eDwej8fj6TlGAX1VC+FpDJOAu4AngceAj1cqjafu9AGrVy2Ep370AefjKx+POxOBaebfGwDPA2tWJ46n5qwJnAuMqFoQT72YB2xZ4ftPBBZV+H6PG2l6Wghs2kFZepmmlpc9gLOrFiKKrw2r41hgCHi2oPj6czwzDRgs6P2dwvU7TwMeBF4D/gncCEwpS6iSSdLTLmjY9vnO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xn4eyCFP4K6qIOAl8P3Q/WsxxqudYUZlLMeT4jUVf98wn3XQ7E+pj5/yOoRbQVKycU70O90naO3d0LVRBZDsfaDjUqNncIewMN6N47kNfo2U40bYIO60IvlBdQfvGnmfYo66JMvm0Bcc0ieXW/y4FYZyAjt2Uk3Ai0fuaJ9kUsjXWR7NOqFqRN8hq98aSfaNoEHdaJbi8vIGent5CTmKdHOZ9W9/I8jAP+TWtmcj0Qaz7wywLkqIKZZB+iqCN5jV4nTzTtdnqhvIAWiWY5/dfThYxDC2SzdK+TOJHW1q/rgVhPAScUIEOnWQ34I/bjw+tOrxi9utPt5QXUO1uI/SyxjlGb87d7jKUoU59SQFwXoxXF4eOkh9Gc0OjQtb1NuGBisd8882gBMnSaE9AO4X+tWpA22Qmtn4i6zO/MqhPA08i/vYzHTreXF9C5VjehI248Hi6ndfw4D+sj1/OAjdDk9aWsPBArmEcIWj67I8NXRO+rk0wg+SySpuFyamawQ3A3upPXhW4uL6B1QNdS7e4unpoxFi26LWKniei2GLYDsWbSoRMFC2Y89nPqm0K3G70m0a3lZQTa5Hli1YJ46sc4ij0SwNMsutXoeerB2mhkxOPxeDwej8fj8Xg8Ho/H4/F4PB6Px+PxeDwej6f5/B9mTTod6MBwuwAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$- \\frac{Z_{eff}}{r} - \\frac{1}{2 r} \\left(r \\left(\\frac{d}{d r} p{\\left (r \\right )}\\right)^{2} + r \\frac{d^{2}}{d r^{2}} p{\\left (r \\right )} + 2 \\frac{d}{d r} p{\\left (r \\right )}\\right)$$" + ], + "text/plain": [ + " 2 2 \n", + " ⎛d ⎞ d d \n", + " r⋅⎜──(p(r))⎟ + r⋅───(p(r)) + 2⋅──(p(r))\n", + " ⎝dr ⎠ 2 dr \n", + " Z_eff dr \n", + "- ───── - ────────────────────────────────────────\n", + " r 2⋅r " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA6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m5ItQ2c6g2+XQfWQ2k6G2R4G70SjkjsBPOs6LK0HH7eiT7p6PVvMchMLR5/E3aCn5MBNsLJClT7bYFLY23lf64JuGiVHXBxeOxfzZnb70o7zzZ2iJzpVo/fJfoCnnj6OlCAk3MH0fqulYX9gMBXCZVXZhzxjHfXnVTOJM4GXo+3BL0PKqp1CgqlFic/pro3mMM7N1vM+6eyHa/nAwWuKW/LbMXPcKipf/DRPBxmYufbbFprC18WFkSzTJsjeanXpv/O8dUtf0yTcNA33WBxdsdGg/1DkPZNgXBWN4FM2OrmPqdwZnIWVaVnKsb2xNfrSqvjJOeImwYTWayXgC7QNYy/QQ5KPCdmiz/agwzszW8dX0V3fz9riMZa5bRL8INjYzWU1/bbEpbG18GDkQc95Xp67pm2/qmj7rgwsHUq5DM2mpciAQCAQCgUAgEAgEAoFAIBAIBAKBQCAQCAQCgUAgEAgEAoFAIDCT+SMl6Mcd+w7JMQAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$- \\frac{Z_{eff}}{r} - \\frac{1}{2 r} \\left(8 r^{3} \\alpha_{4} + 6 r^{2} \\alpha_{3} + 2 r \\left(6 r^{2} \\alpha_{4} + 3 r \\alpha_{3} + \\alpha_{2}\\right) + r \\left(4 r^{3} \\alpha_{4} + 3 r^{2} \\alpha_{3} + 2 r \\alpha_{2} + \\alpha_{1}\\right)^{2} + 4 r \\alpha_{2} + 2 \\alpha_{1}\\right)$$" + ], + "text/plain": [ + " \n", + " 3 2 ⎛ 2 \n", + " Z_eff 8⋅r ⋅alpha[4] + 6⋅r ⋅alpha[3] + 2⋅r⋅⎝6⋅r ⋅alpha[4] + 3⋅r⋅alpha[3] + \n", + "- ───── - ────────────────────────────────────────────────────────────────────\n", + " r \n", + "\n", + " 2 \n", + " ⎞ ⎛ 3 2 ⎞ \n", + "alpha[2]⎠ + r⋅⎝4⋅r ⋅alpha[4] + 3⋅r ⋅alpha[3] + 2⋅r⋅alpha[2] + alpha[1]⎠ + 4⋅r\n", + "──────────────────────────────────────────────────────────────────────────────\n", + " 2⋅r \n", + "\n", + " \n", + " \n", + "⋅alpha[2] + 2⋅alpha[1]\n", + "──────────────────────\n", + " " + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Effective one-electron local energy\n", + "p_sym = Symbol('p')\n", + "phi_tilde = exp(p_sym(r))\n", + "Zeff = Symbol('Z_eff')\n", + "El = -S.Half * del_spherical(phi_tilde, r)/phi_tilde - Zeff/r\n", + "#print R_def\n", + "#print del_spherical(R_def, r)\n", + "display(El)\n", + "El_sym = El.subs(p_sym(r), p).doit()\n", + "El_sym" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "def eval_local_energy(gto, alpha_vals, r_val, Zeff_val):\n", + " slist = {alpha[0]:alpha_vals[0], alpha[1]:alpha_vals[1], alpha[2]: alpha_vals[2], alpha[3]:alpha_vals[3],\n", + " alpha[4]:alpha_vals[4], Zeff:Zeff_val, r:r_val}\n", + " return El_sym.subs(slist).evalf()" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "def get_current_local_energy(gto, xs, rc_val, alpha_vals, Zeff_val):\n", + " EL_curr = []\n", + " EL_at_rc = eval_local_energy(gto, alpha_vals, rc_val, Zeff_val)\n", + " dE = -EL_at_rc\n", + " #print 'dE = ',dE\n", + " for x in xs:\n", + " if x < rc_val:\n", + " el = eval_local_energy(gto, alpha_vals, x, Zeff_val)\n", + " EL_curr.append(el + dE)\n", + " else:\n", + " val, grad, lap = [g[0] for g in gto.eval_vgl(x, 0.0, 0.0)]\n", + " real_el = -.5*lap / val - Zeff_val/x\n", + " EL_curr.append(real_el + dE)\n", + " return EL_curr\n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Evaluate for He orbital" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "MO coeff size = 1\n" + ] + } + ], + "source": [ + "basis_set, he_MO = read_qmcpack.parse_qmc_wf('he_sto3g.wfj.xml',['He'])\n", + "he_gto = gaussian_orbitals.GTO(basis_set['He'])\n", + "rc_val = 0.1\n", + "he_Z_val = 2.0\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPwAAAAVCAYAAABi4IMtAAAABHNCSVQICAgIfAhkiAAABkZJREFUeJztm2uIFlUYx3/aRpmkVlL7ocgLlaERBV0Jd9Kwq2E3+lIWZhFJKrVRFNZuERndNCsSQsOK+hAUEXYxa3OzgsqNMhW39NXK1lxlbW3t6vbhOYednT1n3nPOOzMhzg+G2Z0zz/nPc+ZcnzkvlJSUHJBEQG/s2PC/Pk1JSUkoI+nflnt1wmDDzR8DzcAzhrRjgSXANuBPoAIsAI7wfKCrgUVAK/CbeqCXq9gMAmYAnwPdQA/QBswGDrLYVBjouD46MtIpyhfwK39fjaOAmcAbwPfAXmA38AlwE+a6EmLj60sRGjaup6++zLTc8yiwEvhRPdsupJwfUM+exLe+hPjfg7ThZmCLLeNIiTdZ0scC29U9bwLzgQ/pmw2YnLPxtbLrBtbj1kiWqfu2Ay8AC4Hv1LXXkQqepAJ0IT4lj8aMdIryxbf8fTVuVWnbgFeAR5DG0pWxja8vRWiYOE5pdJPe4P9COtUlSmMR8IWy+VnlE8e3voT6r2khNsLHiUhv8O+p9NsT159U159PEU1yPnAC8qBaN83paeqeTch0RXMw0vP1Ajca7CrqcCVEpyhffMo/RGMSMJWBI0Y9sFXZXJWBja8vRWgkGQR8APwAPEZ6gz/Ucv1hZfdc4rpvfQn1X9NCQIMfo9I2G4QPB/YAvwNDU4RtaN00p/VoNcuQNkGlfWVIq+DX4EN1NBH5+OJb/rX6keReZbMoA5ss61JeGnOAfcBEpD2kNXgbpyq7FSn3RLjNCG24vJcWqqzhTUxS5/eRgojTDawGDgP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W4AHkQCea1IYChJhf4zgxAbX1+K0AjlImQn3ipkV95OJGjXgHSoHcDNCRvf+hLqf1Ui0kd4kH3BS4FfkD3EW5AAgq3Xqag8RyWuN5G+TqoY8roL2R3WhVTazUgvncxb0wC8ikQyu5BNCjuQhjAd+/5jX50ifNH4lH/WfvQio0WtNr6+FKGRhtY3jfATgGeR/fGdyAaY3che+iaLTjV/Kp73p/kPNUzpS0pK9j9aqNLg9VH+Hr6kZP/E+nv4+Bq+Qv+NKp2UlJTsj+jfw5eUlJSUlJQcEPwH7OZ/OcsEtbkAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\left [ 0.19591909220204312\\right ]$$" + ], + "text/plain": [ + "[0.19591909220204312]" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "xvals = np.linspace(start=-2.0, stop=2.0, num=40)\n", + "yvals = np.array([he_gto.eval_v(x, 0.0, 0.0)[0] for x in xvals])\n", + "he_gto.eval_v(1.1, 0.0, 0.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[]" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8lOW99/HPb7ICISF7QhIISyALOwEVtGwqoIgrVG21LtVjq/Z0efocT2s9p+2xPV19tGqtbV3a427rjgUF3NjDTjYIIUD2jSSEkGSSuZ4/EjxpTMgEZuaemfzerxcvJjNXZr7cJN/cuea+r1uMMSillPIvNqsDKKWUcj0td6WU8kNa7kop5Ye03JVSyg9puSullB/ScldKKT+k5a6UU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2d2+v/cCdbszzhX8/8BO6diIAQoHXur/+tgPj3b2NnMz18+6vpb3ARiDdQ7leAioAe/fX153APcA93Y8LXVdtO9z9f9fvEWQeznVfj+21FZjngUwX0zXFsq9Hb13hye2lZ6gqpZQf8olpGaWUUoOj5a6UUn5Iy10ppfyQlrtSSvkhLXellPJDWu5KKeWHtNyVUsoPabkrpZQf+v8cL8tLbDbLpgAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.plot(xvals, yvals)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "def compute_EL(X5_val):\n", + " xslist = {X1:X1_val, X2:X2_val, X3:X3_val, X4:X4_val, X5:X5_val, rc:rc_val}\n", + " alpha_vals = [s.subs(xslist) for s in sln]\n", + " aslist = {alpha0:alpha_vals[0], alpha1:alpha_vals[1], alpha2:alpha_vals[2], alpha3:alpha_vals[3],\n", + " alpha4:alpha_vals[4], Zeff:Zeff_val}\n", + " Elof_r = El.subs(aslist)\n", + " return Elof_r" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([0.012, 0.024, 0.036, 0.048, 0.06 , 0.072, 0.084, 0.096, 0.108,\n", + " 0.12 ])" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "xs = np.linspace(start=0.012, stop=1.2*rc_val, num=10)\n", + "xs" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Coefficients from the paper to fit an 'ideal' effective one-electron local energy" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [], + "source": [ + "beta0 = Symbol('beta_0')\n", + "beta_vals = [beta0, 3.25819, -15.0126, 33.7308, -42.8705, 31.2276, -12.1316, 1.94692]" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data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⋅r - 12.1316⋅r + 31.2276⋅r - 42.8705⋅r + 33.7308⋅r - 15.0126⋅\n", + "\n", + " 3 2\n", + "r + 3.25819⋅r " + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "El_terms = [beta_vals[n]*r**(n+1) for n in range(1,8)]\n", + "EL_ideal_sym = beta0 + sum(El_terms)\n", + "EL_ideal_sym\n" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "# Compute ideal local energy at a point\n", + "def compute_ideal_EL(r_val, Z_val, beta0_val=0.0):\n", + " Z = Symbol('Z')\n", + " slist = {beta0: beta0_val, Z:Z_val, r:r_val}\n", + " return (Z*Z*EL_ideal_sym).subs(slist).evalf()" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "EL orig at r_c 0.0821748356368000\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAMoAAAASCAYAAAAaCEHqAAAABHNCSVQICAgIfAhkiAAABmpJREFUaIHt2m2MHlUVB/Bfa4lUpMWX6CZCqF2DFDAqagVUagvBCLYBjfjFotGKJkRotIIhQReNsShiG+ILxhdSNBrfAMGioGKoKEZtjZBVQcqjrVCgNNRKK0i7fjj3yc7OzszOzM7WL88/mdx97ss55+6cc++5/zsMMMAA/xccia/jQTyJHtbhOTMs63lYhevxN+zDbvwK78XsDm3uYazk2VFjXisz/VeV9LkCP8e2NJdd2IKPi7nm8e4Km/rP/oJxbd7XWbgV25NtW/E9nFzSfxbeg7uwB3vTXC7EMyr0NLGtqY5G/jKrwsg2GMav8QLciL9gMZbir3gdHpshWR/Al/AQbsc/8EK8FfPxA7xdOMx0be7hCPHS8vg3rqyY11G4W7y8Z+N9+GpBv6ewGaN4BIfhJLxaOM5JIoj6eAXOLtH5BizDj/GWTH2buV+Bi1P9DdiJl2AF5uA8fDM3ZoNYHB7BTX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O2ffxQM1p1rkhF9woqdzq2NdWRRV1/6QTDpqb09qpH6U5H1iVp7BbVjtS1zfCmJG80/Z4rDtFFz+bUd1P6/Y6aOojdZUx5zn2oWBH3iwvOIrSZ+9VpzCdKZG5K7ctL2vM4P/W/tgPbmuroo4m/dIY2l3fDgo3IR3sbWZeltt+beKjr0ubjS2QfLXLhMfWYrRHl9yjHGqc8s5ht/MLxzgrZ/U9kbprChqZzP9f4ZzovyrW9WaRA+0z+xGaeyXiNCOY9JqZqbW1ro6O2v8z0Jyx/FpdUS0Weforiz0GOFtRebxqy3iVWjf1i5Ss6V/QUr15N9IwIpud2seLtSTLOEiv5RpGvP1WgP4sRwWYVfcKyWtzc3yHOjY8JSnaJeOE7RNoxqhibRG6+QnWwNJ37bOHAp4t5X59sWSQ+jZmVbF+f0/NbEUD3pHHHi0P2k4KgyLORbWxrqqOtv3SGowR9+pBwlr+Lf1xZxPZEVC+YpqwRU58DftmBzUvwbcGMPC4upx4Vdwjnqb/49O0t2lFOwBcEa7NTXHztxu/SuKrVb1GSu031BWgfTd/XISIY7hI38U+LQ/LNgmgowkfEzfjjwnEfEDvCgg5ta6pjRHt/GWCAAQYYYIABBhhg5vA/2PXN94pi1Q0AAAAASUVORK5CYII=\n", + "text/latex": [ + "$$-0.0205437089092$$" + ], + "text/plain": [ + "-0.0205437089092000" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Choose beta_0\n", + "El_orig_at_rc = compute_ideal_EL(rc_val, he_Z_val)\n", + "Z_val = he_Z_val\n", + "print 'EL orig at r_c',El_orig_at_rc\n", + "beta0_val = -(El_orig_at_rc)/Z_val/Z_val\n", + "beta0_val" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAACn8AAAAVCAYAAACNfWmrAAAABHNCSVQICAgIfAhkiAAAG45JREFUeJztnXnsbVdVxz+vtDKWghRoVMJQ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acU5SLu382jVllzV545Q+O+SdL2jTlI65pPqosd0dbOYlS66LtB+luqWNOV1TdlmTR1OkdqUdD6D8fEFrV6XjB225pO01xA7jGtRe02idtM1K7xto6+KassuafHHKDjLf1cbYGh+R2K7Wd5cal0vay2pvTZtPaZsE14cua/LOY0qvp0jz0NqhZt3GYt4HOn2MTWPZXlC2zVLi2tg8WmppSk5/lz5vh2Wuf2vKpY1VJHFHifn+UF2GaJ+Tc84gaTNtHiDXO2lfbto5kFpj/A6yPtSO71C+z1ti/dfyTJp2LO2yQ/55htVelqQuKXlo12IONun2sGou7Age5jjO8rkR4RcBz6ldEMdxtgLXFMdxcuKa4jhOTlxTHMfJiWuK4zg5cU1xHGcM1wfHcXLimuI4Rw7u745z5HKQmcOf7Z9LzYrkOE5JHgp8j91XCzuO46TgmuI4Tk5cUxzHyYlriuM4OXFNcRwnJ64pjuOM4frgOE5OXFMc58jB/d1xjiyOZ+8bRYHDX197K2B/599XAi8uXzbHcRzHcRzHcRzHcRzHcRzHcRzHcRzHcRzHcRzHcRynx/WAs3vf7VQoh+M4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juM4juMcIfw/gqvqAx2E94kAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\left [ -0.0803991298194888, \\quad -0.0754546801244441, \\quad -0.0678695717125102, \\quad -0.0581144167949043, \\quad -0.0466068324832095, \\quad -0.0337156757426082, \\quad -0.019765043739301, \\quad -0.0050380477380434, \\quad 0.0102196314292798, \\quad 0.0257963984381417\\right ]$$" + ], + "text/plain": [ + "[-0.0803991298194888, -0.0754546801244441, -0.0678695717125102, -0.05811441679\n", + "49043, -0.0466068324832095, -0.0337156757426082, -0.019765043739301, -0.005038\n", + "0477380434, 0.0102196314292798, 0.0257963984381417]" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "EL_ideal = [compute_ideal_EL(rval,he_Z_val, beta0_val) for rval in xs]\n", + "EL_ideal" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [], + "source": [ + "# Evaluate values of X's\n", + "def evalX(phi_func, rc_val, C_val, Z_val, phi_at_zero, eta_at_zero=0.0):\n", + " X = [0.0]*5\n", + " phi_at_rc, grad_at_rc, lapl_at_rc = phi_func(rc_val)\n", + " X[0] = log(abs(phi_at_rc - C_val))\n", + " X[1] = grad_at_rc[0] / (phi_at_rc - C_val)\n", + " X[2] = (lapl_at_rc - 2.0*grad_at_rc[0]/rc_val)/(phi_at_rc - C_val)\n", + " X[3] = -Z_val * (phi_at_zero + eta_at_zero) / (phi_at_zero - C_val)\n", + " X[4] = log(abs(phi_at_zero - C_val))\n", + " return X" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [], + "source": [ + "def create_phi_func(gto):\n", + " def phi_func(r_val):\n", + " val,grad,lap = gto.eval_vgl(r_val, 0.0, 0.0)\n", + " return val[0], grad[0], lap[0]\n", + " \n", + " return phi_func" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABIgAAAAVCAYAAAAtm9VNAAAABHNCSVQICAgIfAhkiAAAEBRJREFUeJztnXnQHEUVwH/BIGc4o6RUSgiCAWJxKJdcG46UyFFBxT8oA4iilhRIIYKCFItHCQJRBBXxihylVWIBciiXiVxSKIKKCIRjEYQQwhlIjMbEP15P7XzzzezOe9PTuzvpX9XWJDvz+n7H9NfdC5FIJBKJRCKRSCQSiUQikYijBaxKfR4eaGkikUgkEolEIpFIJBKJRCI+mczYuZ9VyY01ch7+PXA2cHFNhXkH8BPgWWA50AG+DWwcIK1zgduAp4FlwEvA/cBZwKYeZdLMptvon6whj72BXwHPIW3wHHAz8MGcZw92955x+TwB/BLYoyDtCcCxwD3AEmCpK9eJwJsKZD4CXATcAbyG1PuKPnXQyljygOEcLx3GK2fyWdijLtq+bDI+bQrodKqDvv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Pm2KRqfA1n8hxoilLtZxBd0DoC/NuZfmaLq/4nAHcnhelg5dPbbKWMqmbS+w2ce687G2VxPtg1V38uyDVT8svsoyrjRY6hKq/hb9sGDxGxoZqx5q62+JU5qo62Bvc1/vGNDcth3ku5tFJkS8D/XHACHeQcHmKy39GMIfan1VyL63EMLv9KVF/SuIADYHfgo8hyzxegrZc1c009Vx5dqiYlrTge8iS64WIwb8VeCPSJ19yeTRpniGsEoemyCziE8i9X8RuBbYPefZNZE9ifcAr7l8FiE/+zyzIP0vAPchxmq5y+cS8vsioU3vX0zoeJCx5AHDN172BX6OnC7/CrIc8QXE8BxF94T6LJa+vN89u3HB/VHGp03R6JSl/0KNEW1dwDautkXa8mm6v9BRRJv+v6gy34OMpWygby+Lfaw7nza29mqifbDqTod8+2DRjzZ6X2UdV0V558UdlrqEqr9WP3rlW/RXWdD7DY1Mkr/Fbmnqb4lTmqjrYG/zDn7eMaC5bQuDe3ezytQd70P9MYCvd1DobROtvlLbJ0kZ6vaHGl8Vuu+ztPHnq5K0LH4HMiuI0rQIM0EUiUTCshEyo+zjZ5gjkUiziPYhElk9iLpeH7FtI5HIKDOfPhNEyefhYEWKRCJ1cihycn7ePttIJLJ6E+1DJLJ6EHW9PmLbRiKRUWMy41cZAWOXjW3B2IPVFgMX11+2SCQSiUQikUgkEolEIpFIANYFTs181x5AOSKRSCQSiUQikUgkEolEIpFIJBKJRCKRSCQSiUQikchQ8X8dLfMF9EvAgwAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$\\left [ -0.0334368911103358, \\quad -0.653568722769692, \\quad -5.81948816400263, \\quad -2.0, \\quad -0.000396345019839402\\right ]$$" + ], + "text/plain": [ + "[-0.0334368911103358, -0.653568722769692, -5.81948816400263, -2.0, -0.00039634\n", + "5019839402]" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Xvals = [0.0]*5\n", + "C_val = 0.0\n", + "he_Z_val = 2.0\n", + "he_phi = create_phi_func(he_gto)\n", + "evalX(he_phi, rc_val, C_val, he_Z_val, he_phi(0.0)[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "def solve_for_alpha(Xvals):\n", + " xslist = {X1:Xvals[0], X2:Xvals[1], X3:Xvals[2], X4:Xvals[3], X5:Xvals[4], rc:rc_val}\n", + " alpha_vals = [s.subs(xslist) for s in sln]\n", + " return alpha_vals" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "he_alpha_vals = solve_for_alpha(Xvals)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.1\n" + ] + } + ], + "source": [ + "print rc_val" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAACZoAAAAVCAYAAADFVMmfAAAABHNCSVQICAgIfAhkiAAAFSlJREFUeJztnW3QLEV1x3/AJQGUiIKBSmIQEQNCSjQRISYwiFq+YRGj+WAFJC/mzRKpxKBiUq4mJIhIJJJIGU1ujKl8iAYp0QSR4ooilInRMoYXUVgCpTcIiCBv8nLzoXvqzrPPzO6cM729Z3vOr+qpvXenT/e/z3T3nJ7unQHHcRzHcRzHcRzHcRzHcRzHcRzHcRzHcRzHcRzH6UkF7Gj8Xb9SNY7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOE5O9mPjHrId9YFdWxJ/DngncMEShLwaeD/weeCeKOSjwjxOZmclfmtB2l8CPg58B3gofn4GeJmwTE1emrJz2FjVVUJdTmVzR5v9e3ROOaXS13/vBi4HbgUeAO4CvgK8A9hXWKYmL6s2rqucupSKxhdTusfJ7cLyNXlJbXKUMfa6WNWltSmRfQmx90XANwn9/fvAF4DfpH1ekSL2n8Va/DfExnXZqcupeBzfRNN31y2WtxqXllQXq7q0NiVyKunGPmlemrKt2riucup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4f3ecceB93XHGg/d3xxkH3tcdZzx4f3ecceB93XGcefgY4Tg28L7oODbYj81PPQM2PjLtqcCpjf/fAVywfG2O4ziO4ziO4ziO4ziO4ziO4ziO4ziO4ziO4ziOAfYCzpj5brICHY7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jOI7jFMX/A3Bh55p2SQgwAAAAAElFTkSuQmCC\n", + "text/latex": [ + "$$\\left [ -146.666666666667, \\quad -63.3333333333333, \\quad -35.5555555555555, \\quad -21.6666666666667, \\quad -13.3333333333333, \\quad -7.77777777777777, \\quad -3.80952380952381, \\quad -0.833333333333336, \\quad 10.8333014114113, \\quad 12.5325803946451\\right ]$$" + ], + "text/plain": [ + "[-146.666666666667, -63.3333333333333, -35.5555555555555, -21.6666666666667, -\n", + "13.3333333333333, -7.77777777777777, -3.80952380952381, -0.833333333333336, 10\n", + ".8333014114113, 12.5325803946451]" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "EL_curr = get_current_local_energy(he_gto, xs, rc_val, he_alpha_vals, he_Z_val)\n", + "EL_curr" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[,\n", + " ]" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD8CAYAAACVZ8iyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAH8hJREFUeJzt3XmcFdWd9/HPj30T2cPasggKrmiLKxIVFVeM0cT4JBKTCY8ZnYnJ40SRPDMxL52sr2SSiZMMWeZRk4nBJNqtYoiYxC0ubCp2N2CzNw0Cssn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rwUeBWY22mYm8FC4/DvgEjMzd1/u7tVheRnQw8y6ZyTq1mt3/QDM7DqC/2BlGYq3PaLU8TLgLXd/E8Dd33P3+gzF3VpR6udAbzPrAvQEaoG9mQm71Vqsn7uvd/e3gIZG+14OPOvuO919F/AsMCMTQbdRu+vo7qvd/Z1wuRrYBrTq5rKmKBmkNwLYlPK6KixLu4271wF7CL5Bpvo4sNzda2KKs73aXT8z6w3cDdyXgTijiPJvOAFwM1sYnqJ/NQPxtlWU+v0O2E/wbXIj8D133xl3wG3UmvrFsW8mdUicZjaF4MxiTZRg8nsO5PazNGWNh101u42ZnQR8m+BbZraJUr/7gB+4+77wRCFbRaljF+AC4CzgAPCcmS119+c6NsRIotRvClBP0L3QH3jRzBa5+9qODTGS1tQvjn0zKXKcZjYMeASY5e6Nz5DaRGcG6VUBo1JejwSqm9omPN0+FtgZvh4JPA7c4u6RsnVMotTvbOA7ZrYeuBO418zuiDvgdohSxyrgeXff4e4HgAXAGbFH3DZR6ncz8Ed3P+zu24CXgWx7nENr6hfHvpkUKU4z6ws8DXzN3V+NGoySQXqLgfFmNsbMuhFcfCtttE0pcGSUwg3An93dzawfwT/QHHd/OWMRt0276+fuU919tLuPBv4N+Fd3/3GmAm+DdtcRWAicama9wkZ0GlCeobhbK0r9NgIXW6A3cA6wMkNxt1Zr6teUhcBlZtbfzPoTnJ0vjCnOKNpdx3D7x4GH3f2xDokm6Svq2foDXAmsJuiHmxuWfQO4NlzuQTCaphJ4HRgbln+NoD/2jZSfIUnXp6Pq1+g9vk6WjiaKWkfg0wQXyN8GvpN0XTr4b7RPWF5GkOT+Kem6tLN+ZxF8u94PvAeUpez7ubDelcCtSdelo+sY/n0ebtTOnB4lFt2BLCIi6iYSERElAxERQclARERQMhAREZQMREQEJQMREUHJQEREUDIQERHg/wNFRg+KB8Gv2gAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.plot(xs, EL_ideal, xs, EL_curr)" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [], + "source": [ + "def compute_chi2(EL_ideal, EL_curr):\n", + " return sum([(e1-e2)**2 for e1,e2 in zip(EL_ideal, EL_curr)])" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAALkAAAASCAYAAAAHdn9xAAAABHNCSVQICAgIfAhkiAAABblJREFUaIHt2mmsXVUVB/Bf4RGhwAcVKUErKEMokBD4ABIDfaAyBKuowAfClIglYAQMBBQxfZoooAYZHEgdP5iYKKEQpjA0NS0VAgTLPFovtClNadFSoFApzw9rn7zTyzn37nPupZp4/8nJfm+ftfZaZ609rLX2ZYQR/o/wYZyNBXgBG7Ee9+Gr2KaL/ixM9nk2D4GnCqeX6M+uofkYfotVeBsdXIMPZoxfRqeHrqtreE7C9ViC1xLtH/rIuQoLsULY/lX8DfOEb4Yhpyn9Wdr5q9ODvs5mcALuxkphg+X4Mw4fRK+xEuPJ+CVexiK8hBn4Mn6N4xPNZKJfhu/VKHsEjsadXf1teLoxUzjqdexUQ7MX/opdcQuewaG4AMfh01jXR04Z68UC6cbrNfSX46D0fiX2y5DxTTyCe7AGO+JTmMDc9PeKAeU0pR/EX01tdhUuEX65GWuxN76Ir+AMUwuytV5HY4737ti7iQk/mYTl4P5E/4VM+lyeabgXf8eP1e/kd6V33+jqvzr139BAr056muAo7CP0HZe3k29f0/+DxP+LIchpo1cdevmro5nNdhM772qxMZVxVJKzfAh69cRlifH6DNoDE+1KbJs5fi7PBXgXR4odrmqSfzL1/8N7F+zOYid5Q+yUOehoPsnLGDfYZDoo8d8zZDmD6NXPXx3NbHZYGu+WmvevYUNbvcZqybfEv1P7TgbtOan9jbz4OpdnFq7EtVgsTp4qFP13iwVRxgYsxTHi+F+Yqd8HcBo+LhbIY0mH3O8bBHNS+9hWkJWLHH81sdnz2CRCyl1EqFLgSLE53Twk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qdm8ppSl+gib/a2mw7kQs+IG443xEx/G0i9BxUrxFGGGGEEUYYYYT/VfwHc0pSl4ryxUEAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$27740.513117587$$" + ], + "text/plain": [ + "27740.5131175870" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "compute_chi2(EL_ideal, EL_curr)" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [], + "source": [ + "def compute_one_cycle(phi_func, gto, rc_val, Z_val, phi_at_zero, eta_at_zero=0.0):\n", + " C_val = 0.0\n", + " X = evalX(phi_func, rc_val, C_val, Z_val, phi_at_zero, eta_at_zero)\n", + " alpha_vals = solve_for_alpha(X)\n", + " EL_curr = get_current_local_energy(he_gto, xs, rc_val, alpha_vals, Z_val)\n", + " chi2 = compute_chi2(EL_ideal, EL_curr)\n", + " return chi2, alpha_vals, EL_curr\n", + " \n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "25854.2846426019\n", + "21111.8921728781\n", + "16918.8592218111\n", + "13256.3864130293\n", + "10106.4199357371\n", + "7451.61627411234\n", + "5275.30889319427\n", + "3561.47675650037\n", + "2294.71455959869\n", + "1460.20457213250\n" + ] + } + ], + "source": [ + "phi_at_zero = he_phi(0.0)[0]\n", + "EL_curr = []\n", + "for ioffset in range(10):\n", + " chi2, alpha_vals, EL_curr = compute_one_cycle(he_phi, he_gto, rc_val, he_Z_val, phi_at_zero+.01*ioffset)\n", + " print chi2" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
');\n", + " var titletext = $(\n", + " '
');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('