As per @user1271772 's suggestion I am asking this question here again.
I am trying to understand SCF cycle by trying to code up solved example from Quantum Chemistry by Levine (page 443, 5th edition). The problem is stated as:
Do an SCF calculation for the helium-atom ground state using basis set of two 1s STOs with exponent $\zeta_1$ = 1.45 and $\zeta_2$=2.91. [Ref: Roetti and Clementi J. Chem. Phys., 60, 4725 1974] $\chi_1 = 2\zeta_1^{3/2}e^{-\zeta_1 r}Y^0_0$, and $\chi_2 = 2\zeta_2^{3/2}e^{-\zeta_2 r}Y^0_0$
One electron integrals are straight forward and I was able to get the correct answer, however I still can't get correct values for two election integral, lets say (11|11)
. Below is my attempt in Octave
clear all;
N=2000;
zeta1 = 1.45;
zeta2 = 2.91;
r = linspace(0.000001,10,N)';
dr = r(2)-r(1);
chi = @(zetad,x) (2*zetad.^(3/2))*exp(-zetad*x).*x;
chichi = 0;
for i =1:N
chichi = chichi + dr*(chi(zeta1,r(i))*chi(zeta1,r(i))*chi(zeta1,r')*(chi(zeta1,r)./((r(i)-r) + 0.000001)));
end
chichi*dr
However my values are way off in this case. Can anyone please shed a light on it? Value of (11|11) = 5/8 zeta1 = 0.9062
.
Two electron integrals are defined in the Levine book as :
$$ (rs|tu) = \int \int \frac{\chi^*_r(1)\chi_s(1)\chi_t^*(2)\chi_u(2)}{r_{12}} dv_1dv_2 $$
user @TAR86 from the Chemistry SE suggested that
You replaced the 6-fold integration by one in spherical coordinates. Not sure if that can work as easily as you wrote it
But I was thinking as the function have no angular dependence, at least in above case, its integral should be really straight forward.