Solution of the atom within LDA

First we take the code from the Hydrogen project and adopt it.

In [6]:
from scipy import *
from scipy import integrate
from scipy import interpolate
from scipy import optimize
import weave

def Numerovc(f, x0_, dx, dh_):
    code_Numerov="""
    double h2 = dh*dh;
    double h12 = h2/12.;
    
    double w0 = x(0)*(1-h12*f(0));
    double w1 = x(1)*(1-h12*f(1));
    double xi = x(1);
    double fi = f(1);
    for (int i=2; i<f.size(); i++){
        double w2 = 2*w1-w0+h2*fi*xi;  // here fi=f1
        fi = f(i);                     // fi=f2
        xi = w2/(1-h12*fi);
        x(i)=xi;
        w0 = w1;
        w1 = w2;
    }
    """
    x = zeros(len(f))
    dh=float(dh_)
    x[0]=x0_
    x[1]=x0_+dh*dx
    weave.inline(code_Numerov, ['f','dh','x'], type_converters=weave.converters.blitz, compiler = 'gcc')
    return x

def fSchrod(En, l, R):
    return l*(l+1.)/R**2-2./R-En

def ComputeSchrod(En,R,l):
    "Computes Schrod Eq." 
    f = fSchrod(En,l,R[::-1])
    ur = Numerovc(f,0.0,-1e-7,-R[1]+R[0])[::-1]
    norm = integrate.simps(ur**2,x=R)
    return ur*1/sqrt(abs(norm))

def Shoot(En,R,l):
    ur = ComputeSchrod(En,R,l)
    ur = ur/R**l
    f0 = ur[0]
    f1 = ur[1]
    f_at_0 = f0 + (f1-f0)*(0.0-R[0])/(R[1]-R[0])
    return f_at_0

def FindBoundStates(R,l,nmax,Esearch):
    n=0
    Ebnd=[]
    u0 = Shoot(Esearch[0],R,l)
    for i in range(1,len(Esearch)):
        u1 = Shoot(Esearch[i],R,l)
        if u0*u1<0:
            Ebound = optimize.brentq(Shoot,Esearch[i-1],Esearch[i],xtol=1e-16,args=(R,l))
            Ebnd.append((l,Ebound))
            if len(Ebnd)>nmax: break
            n+=1
            print 'Found bound state at E=%14.9f E_exact=%14.9f l=%d' % (Ebound, -1.0/(n+l)**2,l)
        u0=u1
    
    return Ebnd

def cmpE(x,y):
    if abs(x[1]-y[1])>1e-4:
        return cmp(x[1],y[1])
    else:
        return cmp(x[0],y[0])

# This is slightly modified code from Hydrogen project
def ChargeDensity(bst,R,Zatom):
    rho = zeros( len(R) )
    N=0
    for i,(l,Ei) in enumerate(bst):
        dN = 2*(2*l+1)
        if N+dN<Zatom:
            ferm=1
        else:
            ferm = (Zatom-N)/float(dN)
        u = ComputeSchrod(Ei,R,l)
        drho = u**2 / (4*pi*R**2) * dN * ferm
        rho += drho
        N += dN
        print 'Adding state with l=', l, 'and E=', Ei, 'with Z=', N, 'with ferm=', ferm
        if N>=Zatom: break
    return rho
    
In [7]:
Esearch = -1.2/arange(1,20,0.2)**2

R = linspace(1e-8,100,2000)

nmax=5
Bnd=[]
for l in range(nmax-1):
    Bnd += FindBoundStates(R,l,nmax-l,Esearch)
    
Bnd.sort(cmpE)

Zatom=28  # Like Ni ion
rho = ChargeDensity(Bnd,R,Zatom)

from pylab import *
%matplotlib inline

plot(R,rho*(4*pi*R**2),label='charge density')
xlim([0,25])
show()
Found bound state at E=  -0.999922109 E_exact=  -1.000000000 l=0
Found bound state at E=  -0.249990190 E_exact=  -0.250000000 l=0
Found bound state at E=  -0.111108201 E_exact=  -0.111111111 l=0
Found bound state at E=  -0.062498772 E_exact=  -0.062500000 l=0
Found bound state at E=  -0.039999314 E_exact=  -0.040000000 l=0
Found bound state at E=  -0.250000016 E_exact=  -0.250000000 l=1
Found bound state at E=  -0.111111117 E_exact=  -0.111111111 l=1
Found bound state at E=  -0.062500003 E_exact=  -0.062500000 l=1
Found bound state at E=  -0.039999959 E_exact=  -0.040000000 l=1
Found bound state at E=  -0.111111111 E_exact=  -0.111111111 l=2
Found bound state at E=  -0.062500000 E_exact=  -0.062500000 l=2
Found bound state at E=  -0.039999977 E_exact=  -0.040000000 l=2
Found bound state at E=  -0.062500000 E_exact=  -0.062500000 l=3
Found bound state at E=  -0.039999992 E_exact=  -0.040000000 l=3
Adding state with l= 0 and E= -0.999922108956 with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.249990190207 with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.250000015612 with Z= 10 with ferm= 1
Adding state with l= 0 and E= -0.111108200823 with Z= 12 with ferm= 1
Adding state with l= 1 and E= -0.111111116781 with Z= 18 with ferm= 1
Adding state with l= 2 and E= -0.111111111147 with Z= 28 with ferm= 1.0
In [8]:
def FuncForHartree(y,r,rhoSpline):
    return [y[1], -8*pi*r*rhoSpline(r)]
In [9]:
rhoSpline = interpolate.UnivariateSpline(R,rho,s=0)
U1 = integrate.odeint(FuncForHartree, [0.0,5.], R, args=(rhoSpline,))[:,0]
alpha = (2*Zatom-U1[-1])/R[-1]
U1 += alpha*R
In [10]:
plot(R,U1)
grid()
show()

Numerov again

To remind ourselves on Numerov for Poisson equation

\begin{eqnarray} x(h)+x(-h) = 2x(0)+h^2 (f(0)x(0)+u(0))+\frac{2}{4!}h^4 x^{(4)}(0)+O(h^6) \end{eqnarray}\begin{equation} x^{(4)}\sim \frac{u_{i+1}-2 u_i+u_{i-1}}{h^2} \end{equation}

Inserting the fourth order derivative into the above recursive equation (forth equation in his chapter), we get

\begin{equation} x_{i+1}-2 x_i+x_{i-1}=h^2 u_i +\frac{h^2}{12}(u_{i+1}-2 u_i+u_{i-1}) \end{equation}

If we switch to a new variable $w_i=x_i-\frac{h^2}{12}u_i$ we are left with the following equation

\begin{equation} w_{i+1} -2 w_i + w_{i-1} = h^2 u_i+O(h^6) \end{equation}

The variable $x$ needs to be recomputed at each step with $x_i=(w_i+\frac{h^2}{12}u_i)$.

In [11]:
def NumerovUP(U, x0, dx, dt):
    "Python version of Numerov for Poisson equation"
    x = zeros(len(U))
    x[0] = x0          # first point
    x[1] = dx*dt + x0  # second point
    h2 = dt*dt
    h12 = h2/12;  
    w0 = x[0]-h12*U[0]
    w1 = x[1]-h12*U[1]
    xi = x[1]
    Ui = U[1];      
    for i in range(2,len(U)):
        w2 = 2*w1 - w0 + h2*Ui
        Ui = U[i]
        xi = w2+h12*Ui
        x[i] = xi
        w0 = w1
        w1 = w2
    return x
In [12]:
def NumerovU(U, x0, dx, dt):
    code_NumerovU="""
      double h2 = dt;
      h2 = h2*h2;
      double h12 = h2/12;
      
      double w0 = x(0)-h12*U(0);
      double w1 = x(1)-h12*U(1);
      double xi = x(1);
      double Ux = U(1);
      
      for (int i=2; i<U.size(); i++){
        double w2 = 2*w1 - w0 + h2*Ux;
        Ux = U(i);
        xi = w2+h12*Ux;
        x(i) = xi;
        w0 = w1;
        w1 = w2;
      }
    """
    x = zeros(len(U))
    x[0] = x0          # first point
    x[1] = dx*dt + x0  # second point
    
    weave.inline(code_NumerovU, ['U', 'x', 'dt'], type_converters=weave.converters.blitz, compiler = 'gcc')
    return x
In [13]:
ux = -8*pi*R*rho
U2 = NumerovU(ux, 0.0, 0.1, R[1]-R[0])
alpha2 = (2*Zatom-U2[-1])/R[-1]
U2 += alpha2*R
In [14]:
plot(R,U1)
plot(R,U2)
grid()
show()

Next we add exchange correlation potential. Make sure "excor.py" is in your working directory, so that we can import it.

In [34]:
from excor import ExchangeCorrelation
exc = ExchangeCorrelation()
def rs(rho):
    "Given density, returns rs."
    if rho<1e-100: return 1e100
    return pow(3/(4*pi*rho),1/3.)

mrs = linspace(0.5,100,300)
Ex = array([2*exc.Ex(rs) for rs in mrs])
Ec = array([2*(exc.EcVc(rs)+exc.Vc(rs)) for rs in mrs])
Ek = array([3/5.*(9*pi/4.)**(2/3.) * 1/rs**2 for rs in mrs])
semilogy(mrs, -Ex, label='E-Exchange')
semilogy(mrs, -Ec, label='E-correlation')
semilogy(mrs, Ek, label='E-kinetic')
legend(loc='best')
show()
In [35]:
from excor import ExchangeCorrelation
exc = ExchangeCorrelation()
def rs(rho):
    "Given density, returns rs."
    if rho<1e-100: return 1e100
    return pow(3/(4*pi*rho),1/3.)

Vxc = [2*exc.Vx(rs(rh)) + 2*exc.Vc(rs(rh)) for rh in rho]

Uks = U2-2*Zatom + Vxc*R
In [36]:
plot(R,Vxc, label='Exchange-correlation contribution to U')
legend(loc='best')
show()

plot(R,Vxc*R,label='Exchange-correlation contribution')
plot(R,U2,label='Hartree contribution')
plot(R,Uks, label='Uks')
legend(loc='best')
grid()
show()

Now it is time to reorganize the code and feed Hartree+Exchange correlation back to the Schroedinger equation.

In [37]:
from scipy import *
from scipy import integrate
from scipy import interpolate
from scipy import optimize
import weave

def Numerovc(f, x0_, dx, dh_):
    code_Numerov="""
    double h2 = dh*dh;
    double h12 = h2/12.;
    
    double w0 = x(0)*(1-h12*f(0));
    double w1 = x(1)*(1-h12*f(1));
    double xi = x(1);
    double fi = f(1);
    for (int i=2; i<f.size(); i++){
        double w2 = 2*w1-w0+h2*fi*xi;  // here fi=f1
        fi = f(i);                     // fi=f2
        xi = w2/(1-h12*fi);
        x(i)=xi;
        w0 = w1;
        w1 = w2;
    }
    """
    x = zeros(len(f))
    dh=float(dh_)
    x[0]=x0_
    x[1]=x0_+dh*dx
    weave.inline(code_Numerov, ['f','dh','x'], type_converters=weave.converters.blitz, compiler = 'gcc')
    return x

def NumerovU(U, x0, dx, dt):
    code_NumerovU="""
      double h2 = dt;
      h2 = h2*h2;
      double h12 = h2/12;
      
      double w0 = x(0)-h12*U(0);
      double w1 = x(1)-h12*U(1);
      double xi = x(1);
      double Ux = U(1);
      
      for (int i=2; i<U.size(); i++){
        double w2 = 2*w1 - w0 + h2*Ux;
        Ux = U(i);
        xi = w2+h12*Ux;
        x(i) = xi;
        w0 = w1;
        w1 = w2;
      }
    """
    x = zeros(len(U))
    x[0] = x0          # first point
    x[1] = dx*dt + x0  # second point
    
    weave.inline(code_NumerovU, ['U', 'x', 'dt'], type_converters=weave.converters.blitz, compiler = 'gcc')
    return x

def fSchrod2(En, R, l, Uks):
    return (l*(l+1.)/R + Uks)/R - En
    #return l*(l+1.)/R**2-2./R-En

def ComputeSchrod(En,R,l,Uks):
    "Computes Schrod Eq." 
    f = fSchrod2(En,R[::-1],l,Uks[::-1])  # do not forget to turn around Uks!
    ur = Numerovc(f,0.0,-1e-7,-R[1]+R[0])[::-1]
    norm = integrate.simps(ur**2,x=R)
    return ur*1/sqrt(abs(norm))

def Shoot(En,R,l,Uks):
    ur = ComputeSchrod(En,R,l,Uks)
    #ur = ur/R**l
    f0 = ur[0]
    f1 = ur[1]
    f_at_0 = f0 + (f1-f0)*(0.0-R[0])/(R[1]-R[0])
    return f_at_0

def FindBoundStates(R,l,nmax,Esearch,Uks):
    n=0
    Ebnd=[]
    u0 = Shoot(Esearch[0],R,l,Uks)
    for i in range(1,len(Esearch)):
        u1 = Shoot(Esearch[i],R,l,Uks)
        #print 'looking at energy', Esearch[i], u0,u1
        if u0*u1<0:
            Ebound = optimize.brentq(Shoot,Esearch[i-1],Esearch[i],xtol=1e-16,args=(R,l,Uks))
            Ebnd.append((l,Ebound))
            if len(Ebnd)>nmax: break
            n+=1
            print 'Found bound state at E=%14.9f E[Hartree]=%14.9f l=%d' % (Ebound, Ebound/2,l)
        u0=u1
    return Ebnd

def cmpE(x,y):
    if abs(x[1]-y[1])>1e-4:
        return cmp(x[1],y[1])
    else:
        return cmp(x[0],y[0])

# This is slightly modified code from Hydrogen project
def ChargeDensity(bst,R,Zatom,Uks):
    rho = zeros( len(R) )
    N=0
    for i,(l,Ei) in enumerate(bst):
        dN = 2*(2*l+1)
        if N+dN<Zatom:
            ferm=1
        else:
            ferm = (Zatom-N)/float(dN)
        u = ComputeSchrod(Ei,R,l,Uks)
        drho = u**2 / (4*pi*R**2) * dN * ferm
        rho += drho
        N += dN
        print 'Adding state with l=', l, 'and E=', Ei/2, ' Hartree with Z=', N, 'with ferm=', ferm
        if N>=Zatom: break
    return rho
    
    
def HartreeU(R, rho):
    ux = -8*pi*R*rho
    dudx=0.1
    U = NumerovU(ux, 0.0, dudx, R[1]-R[0])
    alpha2 = (2*Zatom-U[-1])/R[-1]
    U += alpha2*R
    return U

def rs(rho):
    "Given density, returns rs."
    if rho<1e-100: return 1e100
    return pow(3/(4*pi*rho),1/3.)
In [38]:
ComputeSchrod(-1.,R,l,-2*ones(len(R)))
Out[38]:
array([ -2.04562577e-12,   4.29560682e+00,   8.29392313e-03, ...,
         2.56199726e-49,   1.27942754e-49,   0.00000000e+00])
In [39]:
R = linspace(1e-8,50,2**12+1) # so that we can use Romberg method

nmax = 2
Zatom = 4

E0=-1.2*Zatom**2
Eshift=0.5 # sometimes energies can be positive!!!                                                                                                                        
Esearch = -logspace(-4,log10(-E0+Eshift),200)[::-1] + Eshift

exc = ExchangeCorrelation()
Uks = -2.*ones( len(R) )     # First iteration like hydrogen atom

for itt in range(2):
    Bnd=[]
    for l in range(nmax-1):
        Bnd += FindBoundStates(R,l,nmax-l,Esearch,Uks)
    Bnd.sort( cmpE )
    
    rho = ChargeDensity(Bnd,R,Zatom,Uks)
    
    U = HartreeU(R, rho)
    
    Vxc = [2*exc.Vx(rs(rh)) + 2*exc.Vc(rs(rh)) for rh in rho]
    
    Uks = U-2*Zatom + Vxc*R
    
    print 'Total density has weight=', integrate.simps(rho*(4*pi*R**2), x=R)
    
    plot(R,U, label='U-hartree')
    plot(R,Vxc,label='Vxc')
    plot(R, Uks, label='Uks')
    legend(loc='best')
    grid()
    show()
    plot(R, rho*(4*pi*R**2))
    xlim([0,20])
    show()
Found bound state at E=  -0.999998807 E[Hartree]=  -0.499999403 l=0
Found bound state at E=  -0.249999851 E[Hartree]=  -0.124999925 l=0
Adding state with l= 0 and E= -0.499999403471  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.124999925296  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E= -12.847578370 E[Hartree]=  -6.423789185 l=0
Found bound state at E=  -1.592504356 E[Hartree]=  -0.796252178 l=0
Adding state with l= 0 and E= -6.42378918503  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.796252177996  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0

Next we will include charge density mixing, which will improve convergence. We will take a fraction of the new, and a fraction of the old charge density at each iteration.

In [40]:
R = linspace(1e-8,50,2**12+1) # so that we can use Romberg method

nmax = 2
Zatom = 4
mixr = 0.5

E0=-1.2*Zatom**2
Eshift=0.5 # sometimes energies can be positive!!!                                                                                                                        
Esearch = -logspace(-4,log10(-E0+Eshift),200)[::-1] + Eshift

exc = ExchangeCorrelation()
Uks = -2.*ones( len(R) )     # First iteration like hydrogen atom

for itt in range(30):
    Bnd=[]
    for l in range(nmax-1):
        Bnd += FindBoundStates(R,l,nmax-l,Esearch,Uks)
    Bnd.sort( cmpE )
    
    rho_new = ChargeDensity(Bnd,R,Zatom,Uks)
    
    if itt>0:
        rho = rho_new*mixr + (1-mixr)*rho_old
    else:
        rho = rho_new
    rho_old = copy(rho_new)
    
    U = HartreeU(R, rho)
    
    Vxc = [2*exc.Vx(rs(rh)) + 2*exc.Vc(rs(rh)) for rh in rho]
    
    Uks = U-2*Zatom + Vxc*R
    
    print 'Total density has weight=', integrate.simps(rho*(4*pi*R**2), x=R)
  

plot(R,U, label='U-hartree')
plot(R,Vxc,label='Vxc')
plot(R, Uks, label='Uks')
legend(loc='best')
grid()
show()
plot(R, rho*(4*pi*R**2))
xlim([0,10])
show()
Found bound state at E=  -0.999998807 E[Hartree]=  -0.499999403 l=0
Found bound state at E=  -0.249999851 E[Hartree]=  -0.124999925 l=0
Adding state with l= 0 and E= -0.499999403471  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.124999925296  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E= -12.847578370 E[Hartree]=  -6.423789185 l=0
Found bound state at E=  -1.592504356 E[Hartree]=  -0.796252178 l=0
Adding state with l= 0 and E= -6.42378918503  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.796252177996  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -9.809331493 E[Hartree]=  -4.904665746 l=0
Found bound state at E=  -0.759401416 E[Hartree]=  -0.379700708 l=0
Adding state with l= 0 and E= -4.90466574638  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.379700708221  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -6.716105845 E[Hartree]=  -3.358052923 l=0
Found bound state at E=  -0.215725475 E[Hartree]=  -0.107862738 l=0
Adding state with l= 0 and E= -3.35805292251  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.107862737501  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.565176024 E[Hartree]=  -3.782588012 l=0
Found bound state at E=  -0.393819734 E[Hartree]=  -0.196909867 l=0
Adding state with l= 0 and E= -3.78258801221  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.196909866827  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.907109199 E[Hartree]=  -3.953554600 l=0
Found bound state at E=  -0.464424548 E[Hartree]=  -0.232212274 l=0
Adding state with l= 0 and E= -3.95355459973  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.232212274037  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.704561385 E[Hartree]=  -3.852280692 l=0
Found bound state at E=  -0.409029832 E[Hartree]=  -0.204514916 l=0
Adding state with l= 0 and E= -3.85228069231  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.204514915867  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.682331761 E[Hartree]=  -3.841165881 l=0
Found bound state at E=  -0.403695002 E[Hartree]=  -0.201847501 l=0
Adding state with l= 0 and E= -3.84116588064  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.201847501159  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.718367018 E[Hartree]=  -3.859183509 l=0
Found bound state at E=  -0.413194014 E[Hartree]=  -0.206597007 l=0
Adding state with l= 0 and E= -3.85918350894  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.206597007022  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.716041250 E[Hartree]=  -3.858020625 l=0
Found bound state at E=  -0.412505071 E[Hartree]=  -0.206252536 l=0
Adding state with l= 0 and E= -3.85802062506  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.206252535601  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.710600928 E[Hartree]=  -3.855300464 l=0
Found bound state at E=  -0.411038588 E[Hartree]=  -0.205519294 l=0
Adding state with l= 0 and E= -3.85530046412  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.2055192941  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.711860535 E[Hartree]=  -3.855930268 l=0
Found bound state at E=  -0.411383126 E[Hartree]=  -0.205691563 l=0
Adding state with l= 0 and E= -3.85593026768  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.20569156278  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712535108 E[Hartree]=  -3.856267554 l=0
Found bound state at E=  -0.411565239 E[Hartree]=  -0.205782620 l=0
Adding state with l= 0 and E= -3.85626755415  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205782619571  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712221919 E[Hartree]=  -3.856110960 l=0
Found bound state at E=  -0.411479949 E[Hartree]=  -0.205739974 l=0
Adding state with l= 0 and E= -3.8561109595  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739974323  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712163550 E[Hartree]=  -3.856081775 l=0
Found bound state at E=  -0.411464155 E[Hartree]=  -0.205732078 l=0
Adding state with l= 0 and E= -3.85608177481  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205732077673  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712223689 E[Hartree]=  -3.856111845 l=0
Found bound state at E=  -0.411480517 E[Hartree]=  -0.205740258 l=0
Adding state with l= 0 and E= -3.85611184467  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205740258488  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712223394 E[Hartree]=  -3.856111697 l=0
Found bound state at E=  -0.411480430 E[Hartree]=  -0.205740215 l=0
Adding state with l= 0 and E= -3.85611169684  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205740215146  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712213707 E[Hartree]=  -3.856106854 l=0
Found bound state at E=  -0.411477795 E[Hartree]=  -0.205738898 l=0
Adding state with l= 0 and E= -3.85610685372  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205738897534  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712215324 E[Hartree]=  -3.856107662 l=0
Found bound state at E=  -0.411478235 E[Hartree]=  -0.205739118 l=0
Adding state with l= 0 and E= -3.85610766187  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.20573911762  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216630 E[Hartree]=  -3.856108315 l=0
Found bound state at E=  -0.411478591 E[Hartree]=  -0.205739295 l=0
Adding state with l= 0 and E= -3.85610831498  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739295317  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216157 E[Hartree]=  -3.856108078 l=0
Found bound state at E=  -0.411478462 E[Hartree]=  -0.205739231 l=0
Adding state with l= 0 and E= -3.85610807842  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739230934  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216022 E[Hartree]=  -3.856108011 l=0
Found bound state at E=  -0.411478425 E[Hartree]=  -0.205739213 l=0
Adding state with l= 0 and E= -3.856108011  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739212588  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216120 E[Hartree]=  -3.856108060 l=0
Found bound state at E=  -0.411478452 E[Hartree]=  -0.205739226 l=0
Adding state with l= 0 and E= -3.85610806021  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739225981  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216126 E[Hartree]=  -3.856108063 l=0
Found bound state at E=  -0.411478454 E[Hartree]=  -0.205739227 l=0
Adding state with l= 0 and E= -3.85610806315  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739226775  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216109 E[Hartree]=  -3.856108055 l=0
Found bound state at E=  -0.411478449 E[Hartree]=  -0.205739224 l=0
Adding state with l= 0 and E= -3.85610805471  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739224482  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216111 E[Hartree]=  -3.856108056 l=0
Found bound state at E=  -0.411478449 E[Hartree]=  -0.205739225 l=0
Adding state with l= 0 and E= -3.85610805559  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739224718  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216114 E[Hartree]=  -3.856108057 l=0
Found bound state at E=  -0.411478450 E[Hartree]=  -0.205739225 l=0
Adding state with l= 0 and E= -3.85610805681  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739225051  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216113 E[Hartree]=  -3.856108056 l=0
Found bound state at E=  -0.411478450 E[Hartree]=  -0.205739225 l=0
Adding state with l= 0 and E= -3.85610805647  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739224957  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216113 E[Hartree]=  -3.856108056 l=0
Found bound state at E=  -0.411478450 E[Hartree]=  -0.205739225 l=0
Adding state with l= 0 and E= -3.85610805633  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.20573922492  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0
Found bound state at E=  -7.712216113 E[Hartree]=  -3.856108056 l=0
Found bound state at E=  -0.411478450 E[Hartree]=  -0.205739225 l=0
Adding state with l= 0 and E= -3.8561080564  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.205739224937  Hartree with Z= 4 with ferm= 1.0
Total density has weight= 4.0

Finally we add the total energy. At each iteration, we will evaluate

\begin{eqnarray} E^{LDA}_{total} &=& \sum_{i\in occupied}\int d\vec{r} \psi_i^*(\vec{r})[-\nabla^2]\psi_i(\vec{r}) +\nonumber\\ &+& \int d\vec{r} \rho(\vec{r}) [V_{nucleous}(\vec{r})+\epsilon_H(\vec{r}) + \epsilon_{XC}(\vec{r})]\nonumber\\ &=& \sum_{i\in occupied}\int d\vec{r} \psi_i^*(\vec{r})[-\nabla^2+V_{nucleous}+V_H+V_{XC}]\psi_i(\vec{r}) \nonumber\\ &+& \int d\vec{r} \rho(\vec{r}) [\epsilon_H(\vec{r})-V_H(\vec{r}) + \epsilon_{XC}(\vec{r})-V_{XC}(\vec{r})]\nonumber\\ &=& \sum_{i\in occupied}\epsilon_i + \int d\vec{r} \rho(\vec{r}) [\epsilon_H(\vec{r})-V_H(\vec{r}) + \epsilon_{XC}(\vec{r})-V_{XC}(\vec{r})]\nonumber\\ &=& \sum_{i\in occupied}\epsilon_i + \int d\vec{r} \rho(\vec{r}) [-\epsilon_H(\vec{r}) + \epsilon_{XC}(\vec{r})-V_{XC}(\vec{r})]\\ &=& \sum_{i\in occupied}\epsilon_i + \int d\vec{r} \rho(\vec{r})[ -\frac{1}{2} V_H(\vec{r}) + \epsilon_{XC}(\vec{r})-V_{XC}(\vec{r})] \end{eqnarray}

Here we used

\begin{eqnarray} && E_y[\rho] \equiv \int d\vec{r}\; \rho(\vec{r})\; \epsilon_y[\rho(\vec{r})]\\ && V_y[\rho]\equiv \frac{\delta E_y[\rho]}{\delta \rho(\vec{r})} \end{eqnarray}

where $y$ is one of $H$, $x$ or $c$.

In [41]:
def ChargeDensity(bst,R,Zatom,Uks):
    rho = zeros( len(R) )
    N=0
    Ebs=0.
    for i,(l,Ei) in enumerate(bst):
        dN = 2*(2*l+1)
        if N+dN<Zatom:
            ferm=1
        else:
            ferm = (Zatom-N)/float(dN)
        u = ComputeSchrod(Ei,R,l,Uks)
        drho = u**2 / (4*pi*R**2) * dN * ferm
        rho += drho
        N += dN
        Ebs += Ei*dN*ferm
        print 'Adding state with l=', l, 'and E=', Ei/2, ' Hartree with Z=', N, 'with ferm=', ferm
        if N>=Zatom: break
    return (rho,Ebs)





R = linspace(1e-8,10,2**13+1) # so that we can use Romberg method
Etol=1e-7
nmax = 3
Zatom = 8
mixr = 0.5

E0=-1.2*Zatom**2
Eshift=0.5 # sometimes energies can be positive!!!                                                                                                                        
Esearch = -logspace(-4,log10(-E0+Eshift),200)[::-1] + Eshift

exc = ExchangeCorrelation()
Uks = -2.*ones( len(R) )     # First iteration like hydrogen atom
Eold=0

for itt in range(100):
    Bnd=[]
    for l in range(nmax-1):
        Bnd += FindBoundStates(R,l,nmax-l-1,Esearch,Uks)
    Bnd.sort( cmpE )
    
    (rho_new,Ebs) = ChargeDensity(Bnd,R,Zatom,Uks)
    
    if itt>0:
        rho = rho_new*mixr + (1-mixr)*rho_old
    else:
        rho = rho_new
    rho_old = copy(rho_new)
    
    U = HartreeU(R, rho)
    
    Vxc = [2*exc.Vx(rs(rh)) + 2*exc.Vc(rs(rh)) for rh in rho]
    
    Uks = U-2*Zatom + Vxc*R
    
    # Total energy
    ExcVxc = array([2*exc.EcVc(rs(rh))+2*exc.ExVx(rs(rh)) for rh in rho])
    pot=(ExcVxc*R**2-0.5*U*R)*rho*4*pi
    Etot = integrate.romb(pot, R[1]-R[0]) + Ebs
    print 'Itteration', itt, 'Etot[Ry]=', Etot, 'Etot[Hartre]=', Etot/2, 'Diff=', abs(Etot-Eold)
    if itt>0 and abs(Etot-Eold)<Etol: break
    Eold = Etot
    
    print 'Total density has weight=', integrate.simps(rho*(4*pi*R**2), x=R)
  

plot(R, rho*(4*pi*R**2),'--', label='rho')
legend(loc='best')
xlim([0,10])
show()
Found bound state at E=  -0.999998525 E[Hartree]=  -0.499999263 l=0
Found bound state at E=  -0.225612420 E[Hartree]=  -0.112806210 l=0
Found bound state at E=  -0.237719089 E[Hartree]=  -0.118859545 l=1
Adding state with l= 0 and E= -0.499999262651  Hartree with Z= 2 with ferm= 1
Adding state with l= 1 and E= -0.11885954472  Hartree with Z= 8 with ferm= 1.0
Itteration 0 Etot[Ry]= -18.6894880818 Etot[Hartre]= -9.3447440409 Diff= 18.6894880818
Total density has weight= 8.0
Found bound state at E= -58.434784810 E[Hartree]= -29.217392405 l=0
Found bound state at E= -10.657763975 E[Hartree]=  -5.328881987 l=0
Found bound state at E= -10.573657920 E[Hartree]=  -5.286828960 l=1
Adding state with l= 0 and E= -29.217392405  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -5.32888198725  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -5.28682895997  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 1 Etot[Ry]= -222.78914458 Etot[Hartre]= -111.39457229 Diff= 204.099656498
Total density has weight= 8.0
Found bound state at E= -44.666807253 E[Hartree]= -22.333403627 l=0
Found bound state at E=  -4.494571717 E[Hartree]=  -2.247285859 l=0
Found bound state at E=  -3.483793215 E[Hartree]=  -1.741896608 l=1
Adding state with l= 0 and E= -22.3334036266  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -2.24728585855  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -1.74189660768  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 2 Etot[Ry]= -206.175980551 Etot[Hartre]= -103.087990276 Diff= 16.613164029
Total density has weight= 8.0
Found bound state at E= -31.323729185 E[Hartree]= -15.661864593 l=0
Found bound state at E=  -0.325863389 E[Hartree]=  -0.162931694 l=0
Found bound state at E=   0.162691446 E[Hartree]=   0.081345723 l=1
Adding state with l= 0 and E= -15.6618645926  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.162931694387  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= 0.0813457227617  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 3 Etot[Ry]= -116.906288649 Etot[Hartre]= -58.4531443247 Diff= 89.2696919019
Total density has weight= 8.0
Found bound state at E= -39.821454422 E[Hartree]= -19.910727211 l=0
Found bound state at E=  -3.513907181 E[Hartree]=  -1.756953590 l=0
Found bound state at E=  -2.440575758 E[Hartree]=  -1.220287879 l=1
Adding state with l= 0 and E= -19.9107272112  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -1.75695359044  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -1.22028787882  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 4 Etot[Ry]= -147.809875724 Etot[Hartre]= -73.904937862 Diff= 30.9035870746
Total density has weight= 8.0
Found bound state at E= -40.741447329 E[Hartree]= -20.370723665 l=0
Found bound state at E=  -3.782278358 E[Hartree]=  -1.891139179 l=0
Found bound state at E=  -2.736552096 E[Hartree]=  -1.368276048 l=1
Adding state with l= 0 and E= -20.3707236647  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -1.89113917881  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -1.36827604793  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 5 Etot[Ry]= -177.467770526 Etot[Hartre]= -88.7338852628 Diff= 29.6578948016
Total density has weight= 8.0
Found bound state at E= -35.340389182 E[Hartree]= -17.670194591 l=0
Found bound state at E=  -0.967563303 E[Hartree]=  -0.483781651 l=0
Found bound state at E=  -0.017375274 E[Hartree]=  -0.008687637 l=1
Adding state with l= 0 and E= -17.670194591  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.483781651309  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.00868763714349  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 6 Etot[Ry]= -136.449954598 Etot[Hartre]= -68.2249772992 Diff= 41.017815927
Total density has weight= 8.0
Found bound state at E= -38.177001672 E[Hartree]= -19.088500836 l=0
Found bound state at E=  -2.214708097 E[Hartree]=  -1.107354049 l=0
Found bound state at E=  -1.136160963 E[Hartree]=  -0.568080482 l=1
Adding state with l= 0 and E= -19.0885008358  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -1.10735404862  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.568080481503  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 7 Etot[Ry]= -145.858022964 Etot[Hartre]= -72.9290114821 Diff= 9.40806836579
Total density has weight= 8.0
Found bound state at E= -39.022022508 E[Hartree]= -19.511011254 l=0
Found bound state at E=  -2.526267445 E[Hartree]=  -1.263133722 l=0
Found bound state at E=  -1.461705876 E[Hartree]=  -0.730852938 l=1
Adding state with l= 0 and E= -19.5110112539  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -1.26313372238  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.730852938169  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 8 Etot[Ry]= -161.624522674 Etot[Hartre]= -80.8122613371 Diff= 15.7664997098
Total density has weight= 8.0
Found bound state at E= -36.400750644 E[Hartree]= -18.200375322 l=0
Found bound state at E=  -1.316719555 E[Hartree]=  -0.658359777 l=0
Found bound state at E=  -0.284342831 E[Hartree]=  -0.142171416 l=1
Adding state with l= 0 and E= -18.2003753222  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.658359777319  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.142171415521  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 9 Etot[Ry]= -143.798851323 Etot[Hartre]= -71.8994256617 Diff= 17.8256713506
Total density has weight= 8.0
Found bound state at E= -37.572003685 E[Hartree]= -18.786001843 l=0
Found bound state at E=  -1.809061488 E[Hartree]=  -0.904530744 l=0
Found bound state at E=  -0.739909698 E[Hartree]=  -0.369954849 l=1
Adding state with l= 0 and E= -18.7860018427  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.904530744064  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.369954848882  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 10 Etot[Ry]= -146.04912323 Etot[Hartre]= -73.024561615 Diff= 2.2502719065
Total density has weight= 8.0
Found bound state at E= -38.273020848 E[Hartree]= -19.136510424 l=0
Found bound state at E=  -2.079942188 E[Hartree]=  -1.039971094 l=0
Found bound state at E=  -1.011347844 E[Hartree]=  -0.505673922 l=1
Adding state with l= 0 and E= -19.1365104242  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -1.0399710942  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.505673921879  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 11 Etot[Ry]= -154.481920258 Etot[Hartre]= -77.2409601292 Diff= 8.43279702851
Total density has weight= 8.0
Found bound state at E= -37.058719393 E[Hartree]= -18.529359697 l=0
Found bound state at E=  -1.563071066 E[Hartree]=  -0.781535533 l=0
Found bound state at E=  -0.505512927 E[Hartree]=  -0.252756464 l=1
Adding state with l= 0 and E= -18.5293596965  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.781535532793  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.252756463528  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 12 Etot[Ry]= -147.463655302 Etot[Hartre]= -73.731827651 Diff= 7.01826495645
Total density has weight= 8.0
Found bound state at E= -37.395531101 E[Hartree]= -18.697765551 l=0
Found bound state at E=  -1.703300390 E[Hartree]=  -0.851650195 l=0
Found bound state at E=  -0.638412369 E[Hartree]=  -0.319206184 l=1
Adding state with l= 0 and E= -18.6977655506  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.851650195143  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.31920618429  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 13 Etot[Ry]= -146.85519989 Etot[Hartre]= -73.4275999449 Diff= 0.608455412228
Total density has weight= 8.0
Found bound state at E= -37.884173003 E[Hartree]= -18.942086501 l=0
Found bound state at E=  -1.896593146 E[Hartree]=  -0.948296573 l=0
Found bound state at E=  -0.828013088 E[Hartree]=  -0.414006544 l=1
Adding state with l= 0 and E= -18.9420865014  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.948296572757  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.414006543873  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 14 Etot[Ry]= -151.202416826 Etot[Hartre]= -75.6012084132 Diff= 4.34721693654
Total density has weight= 8.0
Found bound state at E= -37.376441340 E[Hartree]= -18.688220670 l=0
Found bound state at E=  -1.687570537 E[Hartree]=  -0.843785268 l=0
Found bound state at E=  -0.623455859 E[Hartree]=  -0.311727930 l=1
Adding state with l= 0 and E= -18.6882206701  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.843785268251  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.311727929664  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 15 Etot[Ry]= -148.886760087 Etot[Hartre]= -74.4433800434 Diff= 2.3156567395
Total density has weight= 8.0
Found bound state at E= -37.390331414 E[Hartree]= -18.695165707 l=0
Found bound state at E=  -1.693605554 E[Hartree]=  -0.846802777 l=0
Found bound state at E=  -0.629248069 E[Hartree]=  -0.314624035 l=1
Adding state with l= 0 and E= -18.6951657071  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.846802777027  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.31462403461  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 16 Etot[Ry]= -147.689102468 Etot[Hartre]= -73.8445512342 Diff= 1.19765761848
Total density has weight= 8.0
Found bound state at E= -37.679878079 E[Hartree]= -18.839939040 l=0
Found bound state at E=  -1.809734026 E[Hartree]=  -0.904867013 l=0
Found bound state at E=  -0.742210632 E[Hartree]=  -0.371105316 l=1
Adding state with l= 0 and E= -18.8399390396  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.904867013108  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.371105316064  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 17 Etot[Ry]= -149.751737816 Etot[Hartre]= -74.8758689078 Diff= 2.0626353473
Total density has weight= 8.0
Found bound state at E= -37.496870854 E[Hartree]= -18.748435427 l=0
Found bound state at E=  -1.735296263 E[Hartree]=  -0.867648131 l=0
Found bound state at E=  -0.669538626 E[Hartree]=  -0.334769313 l=1
Adding state with l= 0 and E= -18.7484354272  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.867648131447  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.334769313017  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 18 Etot[Ry]= -149.235257845 Etot[Hartre]= -74.6176289225 Diff= 0.516479970723
Total density has weight= 8.0
Found bound state at E= -37.431430320 E[Hartree]= -18.715715160 l=0
Found bound state at E=  -1.708607494 E[Hartree]=  -0.854303747 l=0
Found bound state at E=  -0.643731025 E[Hartree]=  -0.321865512 l=1
Adding state with l= 0 and E= -18.7157151601  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.854303747204  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.321865512267  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 19 Etot[Ry]= -148.295916561 Etot[Hartre]= -74.1479582803 Diff= 0.939341284331
Total density has weight= 8.0
Found bound state at E= -37.580211765 E[Hartree]= -18.790105883 l=0
Found bound state at E=  -1.768718612 E[Hartree]=  -0.884359306 l=0
Found bound state at E=  -0.702061538 E[Hartree]=  -0.351030769 l=1
Adding state with l= 0 and E= -18.7901058826  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.884359306056  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.351030769098  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 20 Etot[Ry]= -149.16587051 Etot[Hartre]= -74.582935255 Diff= 0.86995394936
Total density has weight= 8.0
Found bound state at E= -37.530151148 E[Hartree]= -18.765075574 l=0
Found bound state at E=  -1.748427858 E[Hartree]=  -0.874213929 l=0
Found bound state at E=  -0.682298563 E[Hartree]=  -0.341149281 l=1
Adding state with l= 0 and E= -18.765075574  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.874213929043  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.341149281461  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 21 Etot[Ry]= -149.211574102 Etot[Hartre]= -74.605787051 Diff= 0.0457035919248
Total density has weight= 8.0
Found bound state at E= -37.469858107 E[Hartree]= -18.734929053 l=0
Found bound state at E=  -1.723864453 E[Hartree]=  -0.861932227 l=0
Found bound state at E=  -0.658478619 E[Hartree]=  -0.329239309 l=1
Adding state with l= 0 and E= -18.7349290533  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.861932226586  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.329239309395  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 22 Etot[Ry]= -148.654051022 Etot[Hartre]= -74.3270255108 Diff= 0.557523080342
Total density has weight= 8.0
Found bound state at E= -37.536490985 E[Hartree]= -18.768245493 l=0
Found bound state at E=  -1.750877659 E[Hartree]=  -0.875438830 l=0
Found bound state at E=  -0.684684255 E[Hartree]=  -0.342342128 l=1
Adding state with l= 0 and E= -18.7682454925  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.875438829671  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.34234212772  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 23 Etot[Ry]= -148.962757427 Etot[Hartre]= -74.4813787133 Diff= 0.308706405068
Total density has weight= 8.0
Found bound state at E= -37.532696100 E[Hartree]= -18.766348050 l=0
Found bound state at E=  -1.749343874 E[Hartree]=  -0.874671937 l=0
Found bound state at E=  -0.683192604 E[Hartree]=  -0.341596302 l=1
Adding state with l= 0 and E= -18.7663480498  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.87467193688  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.341596302007  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 24 Etot[Ry]= -149.113943343 Etot[Hartre]= -74.5569716714 Diff= 0.151185916185
Total density has weight= 8.0
Found bound state at E= -37.494507667 E[Hartree]= -18.747253834 l=0
Found bound state at E=  -1.733811168 E[Hartree]=  -0.866905584 l=0
Found bound state at E=  -0.668113431 E[Hartree]=  -0.334056716 l=1
Adding state with l= 0 and E= -18.7472538337  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.866905584125  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.33405671569  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 25 Etot[Ry]= -148.834546045 Etot[Hartre]= -74.4172730224 Diff= 0.279397298054
Total density has weight= 8.0
Found bound state at E= -37.519926521 E[Hartree]= -18.759963260 l=0
Found bound state at E=  -1.744130031 E[Hartree]=  -0.872065016 l=0
Found bound state at E=  -0.678126618 E[Hartree]=  -0.339063309 l=1
Adding state with l= 0 and E= -18.7599632603  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.872065015596  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.33906330879  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 26 Etot[Ry]= -148.912247218 Etot[Hartre]= -74.4561236092 Diff= 0.0777011735939
Total density has weight= 8.0
Found bound state at E= -37.527639853 E[Hartree]= -18.763819927 l=0
Found bound state at E=  -1.747260392 E[Hartree]=  -0.873630196 l=0
Found bound state at E=  -0.681168170 E[Hartree]=  -0.340584085 l=1
Adding state with l= 0 and E= -18.7638199265  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.873630196191  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.340584085062  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 27 Etot[Ry]= -149.034276942 Etot[Hartre]= -74.5171384711 Diff= 0.122029723805
Total density has weight= 8.0
Found bound state at E= -37.507556727 E[Hartree]= -18.753778363 l=0
Found bound state at E=  -1.739099860 E[Hartree]=  -0.869549930 l=0
Found bound state at E=  -0.673243237 E[Hartree]=  -0.336621618 l=1
Adding state with l= 0 and E= -18.7537783634  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.869549930126  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.336621618254  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 28 Etot[Ry]= -148.9131813 Etot[Hartre]= -74.4565906499 Diff= 0.121095642318
Total density has weight= 8.0
Found bound state at E= -37.515050361 E[Hartree]= -18.757525180 l=0
Found bound state at E=  -1.742143236 E[Hartree]=  -0.871071618 l=0
Found bound state at E=  -0.676197360 E[Hartree]=  -0.338098680 l=1
Adding state with l= 0 and E= -18.7575251805  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871071618232  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338098679914  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 29 Etot[Ry]= -148.912681926 Etot[Hartre]= -74.4563409628 Diff= 0.000499374331071
Total density has weight= 8.0
Found bound state at E= -37.522660717 E[Hartree]= -18.761330359 l=0
Found bound state at E=  -1.745232060 E[Hartree]=  -0.872616030 l=0
Found bound state at E=  -0.679197400 E[Hartree]=  -0.339598700 l=1
Adding state with l= 0 and E= -18.7613303587  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.872616030031  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.33959870023  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 30 Etot[Ry]= -148.986220623 Etot[Hartre]= -74.4931103113 Diff= 0.0735386970794
Total density has weight= 8.0
Found bound state at E= -37.513515646 E[Hartree]= -18.756757823 l=0
Found bound state at E=  -1.741517845 E[Hartree]=  -0.870758923 l=0
Found bound state at E=  -0.675590230 E[Hartree]=  -0.337795115 l=1
Adding state with l= 0 and E= -18.7567578228  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.87075892271  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.337795114891  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 31 Etot[Ry]= -148.941990218 Etot[Hartre]= -74.4709951092 Diff= 0.0442304041557
Total density has weight= 8.0
Found bound state at E= -37.514445519 E[Hartree]= -18.757222760 l=0
Found bound state at E=  -1.741895569 E[Hartree]=  -0.870947785 l=0
Found bound state at E=  -0.675956950 E[Hartree]=  -0.337978475 l=1
Adding state with l= 0 and E= -18.7572227597  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.870947784535  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.337978475069  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 32 Etot[Ry]= -148.924263673 Etot[Hartre]= -74.4621318367 Diff= 0.0177265450819
Total density has weight= 8.0
Found bound state at E= -37.519414924 E[Hartree]= -18.759707462 l=0
Found bound state at E=  -1.743912921 E[Hartree]=  -0.871956461 l=0
Found bound state at E=  -0.677916014 E[Hartree]=  -0.338958007 l=1
Adding state with l= 0 and E= -18.759707462  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871956460725  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338958006969  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 33 Etot[Ry]= -148.961744105 Etot[Hartre]= -74.4808720525 Diff= 0.0374804315697
Total density has weight= 8.0
Found bound state at E= -37.515844461 E[Hartree]= -18.757922231 l=0
Found bound state at E=  -1.742463082 E[Hartree]=  -0.871231541 l=0
Found bound state at E=  -0.676508001 E[Hartree]=  -0.338254000 l=1
Adding state with l= 0 and E= -18.7579222307  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871231540851  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338254000261  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 34 Etot[Ry]= -148.94978914 Etot[Hartre]= -74.4748945702 Diff= 0.0119549646056
Total density has weight= 8.0
Found bound state at E= -37.514997560 E[Hartree]= -18.757498780 l=0
Found bound state at E=  -1.742119181 E[Hartree]=  -0.871059591 l=0
Found bound state at E=  -0.676174078 E[Hartree]=  -0.338087039 l=1
Adding state with l= 0 and E= -18.7574987799  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871059590665  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338087039198  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 35 Etot[Ry]= -148.934339712 Etot[Hartre]= -74.467169856 Diff= 0.0154494284
Total density has weight= 8.0
Found bound state at E= -37.517670583 E[Hartree]= -18.758835291 l=0
Found bound state at E=  -1.743204448 E[Hartree]=  -0.871602224 l=0
Found bound state at E=  -0.677227935 E[Hartree]=  -0.338613968 l=1
Adding state with l= 0 and E= -18.7588352913  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871602223879  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338613967552  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 36 Etot[Ry]= -148.950922154 Etot[Hartre]= -74.4754610769 Diff= 0.0165824418804
Total density has weight= 8.0
Found bound state at E= -37.516565448 E[Hartree]= -18.758282724 l=0
Found bound state at E=  -1.742755720 E[Hartree]=  -0.871377860 l=0
Found bound state at E=  -0.676792169 E[Hartree]=  -0.338396084 l=1
Adding state with l= 0 and E= -18.7582827241  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871377859933  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338396084464  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 37 Etot[Ry]= -148.950237524 Etot[Hartre]= -74.4751187619 Diff= 0.000684630013097
Total density has weight= 8.0
Found bound state at E= -37.515616337 E[Hartree]= -18.757808168 l=0
Found bound state at E=  -1.742370314 E[Hartree]=  -0.871185157 l=0
Found bound state at E=  -0.676417927 E[Hartree]=  -0.338208963 l=1
Adding state with l= 0 and E= -18.7578081683  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871185157169  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338208963253  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 38 Etot[Ry]= -148.940614546 Etot[Hartre]= -74.4703072728 Diff= 0.0096229781069
Total density has weight= 8.0
Found bound state at E= -37.516859589 E[Hartree]= -18.758429794 l=0
Found bound state at E=  -1.742875116 E[Hartree]=  -0.871437558 l=0
Found bound state at E=  -0.676908114 E[Hartree]=  -0.338454057 l=1
Adding state with l= 0 and E= -18.7584297944  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871437558211  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338454057052  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 39 Etot[Ry]= -148.946852687 Etot[Hartre]= -74.4734263436 Diff= 0.00623814152075
Total density has weight= 8.0
Found bound state at E= -37.516681583 E[Hartree]= -18.758340791 l=0
Found bound state at E=  -1.742802840 E[Hartree]=  -0.871401420 l=0
Found bound state at E=  -0.676837927 E[Hartree]=  -0.338418964 l=1
Adding state with l= 0 and E= -18.7583407913  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871401420108  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338418963733  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 40 Etot[Ry]= -148.948901586 Etot[Hartre]= -74.4744507932 Diff= 0.00204889922324
Total density has weight= 8.0
Found bound state at E= -37.516036797 E[Hartree]= -18.758018398 l=0
Found bound state at E=  -1.742541019 E[Hartree]=  -0.871270509 l=0
Found bound state at E=  -0.676583684 E[Hartree]=  -0.338291842 l=1
Adding state with l= 0 and E= -18.7580183985  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871270509283  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338291841939  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 41 Etot[Ry]= -148.943885561 Etot[Hartre]= -74.4719427805 Diff= 0.00501602539367
Total density has weight= 8.0
Found bound state at E= -37.516534787 E[Hartree]= -18.758267393 l=0
Found bound state at E=  -1.742743224 E[Hartree]=  -0.871371612 l=0
Found bound state at E=  -0.676780036 E[Hartree]=  -0.338390018 l=1
Adding state with l= 0 and E= -18.7582673934  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871371612243  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338390018164  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 42 Etot[Ry]= -148.945681401 Etot[Hartre]= -74.4728407005 Diff= 0.00179583987676
Total density has weight= 8.0
Found bound state at E= -37.516623632 E[Hartree]= -18.758311816 l=0
Found bound state at E=  -1.742779300 E[Hartree]=  -0.871389650 l=0
Found bound state at E=  -0.676815068 E[Hartree]=  -0.338407534 l=1
Adding state with l= 0 and E= -18.758311816  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871389649888  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338407534052  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 43 Etot[Ry]= -148.947630406 Etot[Hartre]= -74.473815203 Diff= 0.0019490051605
Total density has weight= 8.0
Found bound state at E= -37.516268443 E[Hartree]= -18.758134221 l=0
Found bound state at E=  -1.742635075 E[Hartree]=  -0.871317537 l=0
Found bound state at E=  -0.676675016 E[Hartree]=  -0.338337508 l=1
Adding state with l= 0 and E= -18.7581342213  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871317537256  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338337508127  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 44 Etot[Ry]= -148.945363786 Etot[Hartre]= -74.4726818931 Diff= 0.00226661990098
Total density has weight= 8.0
Found bound state at E= -37.516429648 E[Hartree]= -18.758214824 l=0
Found bound state at E=  -1.742700532 E[Hartree]=  -0.871350266 l=0
Found bound state at E=  -0.676738579 E[Hartree]=  -0.338369289 l=1
Adding state with l= 0 and E= -18.7582148242  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871350265765  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.33836928935  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 45 Etot[Ry]= -148.945556041 Etot[Hartre]= -74.4727780204 Diff= 0.000192254692735
Total density has weight= 8.0
Found bound state at E= -37.516547053 E[Hartree]= -18.758273527 l=0
Found bound state at E=  -1.742748203 E[Hartree]=  -0.871374102 l=0
Found bound state at E=  -0.676784871 E[Hartree]=  -0.338392435 l=1
Adding state with l= 0 and E= -18.7582735267  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871374101551  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338392435493  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 46 Etot[Ry]= -148.946811528 Etot[Hartre]= -74.4734057638 Diff= 0.00125548680617
Total density has weight= 8.0
Found bound state at E= -37.516378424 E[Hartree]= -18.758189212 l=0
Found bound state at E=  -1.742679731 E[Hartree]=  -0.871339866 l=0
Found bound state at E=  -0.676718380 E[Hartree]=  -0.338359190 l=1
Adding state with l= 0 and E= -18.7581892119  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871339865598  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338359190168  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 47 Etot[Ry]= -148.945935275 Etot[Hartre]= -74.4729676375 Diff= 0.000876252640637
Total density has weight= 8.0
Found bound state at E= -37.516409428 E[Hartree]= -18.758204714 l=0
Found bound state at E=  -1.742692321 E[Hartree]=  -0.871346160 l=0
Found bound state at E=  -0.676730605 E[Hartree]=  -0.338365303 l=1
Adding state with l= 0 and E= -18.758204714  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871346160307  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338365302707  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 48 Etot[Ry]= -148.945705754 Etot[Hartre]= -74.472852877 Diff= 0.000229521081337
Total density has weight= 8.0
Found bound state at E= -37.516492724 E[Hartree]= -18.758246362 l=0
Found bound state at E=  -1.742726142 E[Hartree]=  -0.871363071 l=0
Found bound state at E=  -0.676763448 E[Hartree]=  -0.338381724 l=1
Adding state with l= 0 and E= -18.7582463619  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871363071067  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338381724135  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 49 Etot[Ry]= -148.946375007 Etot[Hartre]= -74.4731875034 Diff= 0.000669252860575
Total density has weight= 8.0
Found bound state at E= -37.516423545 E[Hartree]= -18.758211772 l=0
Found bound state at E=  -1.742698053 E[Hartree]=  -0.871349026 l=0
Found bound state at E=  -0.676736172 E[Hartree]=  -0.338368086 l=1
Adding state with l= 0 and E= -18.7582117724  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871349026313  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338368085781  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 50 Etot[Ry]= -148.946108865 Etot[Hartre]= -74.4730544325 Diff= 0.000266141804616
Total density has weight= 8.0
Found bound state at E= -37.516415001 E[Hartree]= -18.758207500 l=0
Found bound state at E=  -1.742694583 E[Hartree]=  -0.871347292 l=0
Found bound state at E=  -0.676732803 E[Hartree]=  -0.338366401 l=1
Adding state with l= 0 and E= -18.7582075004  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871347291703  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338366401367  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 51 Etot[Ry]= -148.945864884 Etot[Hartre]= -74.4729324422 Diff= 0.00024398064852
Total density has weight= 8.0
Found bound state at E= -37.516462042 E[Hartree]= -18.758231021 l=0
Found bound state at E=  -1.742713684 E[Hartree]=  -0.871356842 l=0
Found bound state at E=  -0.676751351 E[Hartree]=  -0.338375676 l=1
Adding state with l= 0 and E= -18.7582310212  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.8713568422  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338375675503  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 52 Etot[Ry]= -148.946173635 Etot[Hartre]= -74.4730868174 Diff= 0.000308750399711
Total density has weight= 8.0
Found bound state at E= -37.516438742 E[Hartree]= -18.758219371 l=0
Found bound state at E=  -1.742704223 E[Hartree]=  -0.871352112 l=0
Found bound state at E=  -0.676742164 E[Hartree]=  -0.338371082 l=1
Adding state with l= 0 and E= -18.758219371  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352111702  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371081887  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 53 Etot[Ry]= -148.946134434 Etot[Hartre]= -74.4730672172 Diff= 3.92002743865e-05
Total density has weight= 8.0
Found bound state at E= -37.516424373 E[Hartree]= -18.758212186 l=0
Found bound state at E=  -1.742698389 E[Hartree]=  -0.871349194 l=0
Found bound state at E=  -0.676736498 E[Hartree]=  -0.338368249 l=1
Adding state with l= 0 and E= -18.7582121863  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.87134919433  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338368248933  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 54 Etot[Ry]= -148.94597129 Etot[Hartre]= -74.4729856449 Diff= 0.000163144573605
Total density has weight= 8.0
Found bound state at E= -37.516447172 E[Hartree]= -18.758223586 l=0
Found bound state at E=  -1.742707646 E[Hartree]=  -0.871353823 l=0
Found bound state at E=  -0.676745487 E[Hartree]=  -0.338372744 l=1
Adding state with l= 0 and E= -18.7582235859  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871353823074  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338372743735  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 55 Etot[Ry]= -148.946093755 Etot[Hartre]= -74.4730468776 Diff= 0.000122465381708
Total density has weight= 8.0
Found bound state at E= -37.516442070 E[Hartree]= -18.758221035 l=0
Found bound state at E=  -1.742705575 E[Hartree]=  -0.871352787 l=0
Found bound state at E=  -0.676743476 E[Hartree]=  -0.338371738 l=1
Adding state with l= 0 and E= -18.758221035  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.87135278742  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371738055  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 56 Etot[Ry]= -148.946118378 Etot[Hartre]= -74.4730591892 Diff= 2.4623144526e-05
Total density has weight= 8.0
Found bound state at E= -37.516431359 E[Hartree]= -18.758215679 l=0
Found bound state at E=  -1.742701225 E[Hartree]=  -0.871350613 l=0
Found bound state at E=  -0.676739253 E[Hartree]=  -0.338369626 l=1
Adding state with l= 0 and E= -18.7582156794  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871350612732  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338369626294  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 57 Etot[Ry]= -148.946029354 Etot[Hartre]= -74.4730146771 Diff= 8.9024311194e-05
Total density has weight= 8.0
Found bound state at E= -37.516440930 E[Hartree]= -18.758220465 l=0
Found bound state at E=  -1.742705112 E[Hartree]=  -0.871352556 l=0
Found bound state at E=  -0.676743026 E[Hartree]=  -0.338371513 l=1
Adding state with l= 0 and E= -18.7582204648  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352555797  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371513131  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 58 Etot[Ry]= -148.946068333 Etot[Hartre]= -74.4730341665 Diff= 3.8978847499e-05
Total density has weight= 8.0
Found bound state at E= -37.516441620 E[Hartree]= -18.758220810 l=0
Found bound state at E=  -1.742705392 E[Hartree]=  -0.871352696 l=0
Found bound state at E=  -0.676743299 E[Hartree]=  -0.338371649 l=1
Adding state with l= 0 and E= -18.7582208099  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352695975  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371649255  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 59 Etot[Ry]= -148.946098624 Etot[Hartre]= -74.4730493119 Diff= 3.02907997423e-05
Total density has weight= 8.0
Found bound state at E= -37.516435409 E[Hartree]= -18.758217705 l=0
Found bound state at E=  -1.742702870 E[Hartree]=  -0.871351435 l=0
Found bound state at E=  -0.676740849 E[Hartree]=  -0.338370425 l=1
Adding state with l= 0 and E= -18.7582177046  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871351434941  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338370424706  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 60 Etot[Ry]= -148.946056695 Etot[Hartre]= -74.4730283477 Diff= 4.19284119175e-05
Total density has weight= 8.0
Found bound state at E= -37.516438751 E[Hartree]= -18.758219375 l=0
Found bound state at E=  -1.742704227 E[Hartree]=  -0.871352113 l=0
Found bound state at E=  -0.676742167 E[Hartree]=  -0.338371084 l=1
Adding state with l= 0 and E= -18.7582193753  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352113438  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371083574  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 61 Etot[Ry]= -148.946063741 Etot[Hartre]= -74.4730318704 Diff= 7.0454900083e-06
Total density has weight= 8.0
Found bound state at E= -37.516440487 E[Hartree]= -18.758220244 l=0
Found bound state at E=  -1.742704932 E[Hartree]=  -0.871352466 l=0
Found bound state at E=  -0.676742852 E[Hartree]=  -0.338371426 l=1
Adding state with l= 0 and E= -18.7582202436  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352465994  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371425927  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 62 Etot[Ry]= -148.946084853 Etot[Hartre]= -74.4730424263 Diff= 2.11118428126e-05
Total density has weight= 8.0
Found bound state at E= -37.516437414 E[Hartree]= -18.758218707 l=0
Found bound state at E=  -1.742703684 E[Hartree]=  -0.871351842 l=0
Found bound state at E=  -0.676741640 E[Hartree]=  -0.338370820 l=1
Adding state with l= 0 and E= -18.7582187069  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871351842022  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338370820012  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 63 Etot[Ry]= -148.946067813 Etot[Hartre]= -74.4730339065 Diff= 1.70397333932e-05
Total density has weight= 8.0
Found bound state at E= -37.516438223 E[Hartree]= -18.758219111 l=0
Found bound state at E=  -1.742704012 E[Hartree]=  -0.871352006 l=0
Found bound state at E=  -0.676741959 E[Hartree]=  -0.338370979 l=1
Adding state with l= 0 and E= -18.7582191113  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352006117  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338370979353  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 64 Etot[Ry]= -148.946065345 Etot[Hartre]= -74.4730326725 Diff= 2.46785859304e-06
Total density has weight= 8.0
Found bound state at E= -37.516439593 E[Hartree]= -18.758219797 l=0
Found bound state at E=  -1.742704569 E[Hartree]=  -0.871352285 l=0
Found bound state at E=  -0.676742499 E[Hartree]=  -0.338371250 l=1
Adding state with l= 0 and E= -18.7582197966  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352284505  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371249689  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 65 Etot[Ry]= -148.946077153 Etot[Hartre]= -74.4730385766 Diff= 1.18081559322e-05
Total density has weight= 8.0
Found bound state at E= -37.516438274 E[Hartree]= -18.758219137 l=0
Found bound state at E=  -1.742704033 E[Hartree]=  -0.871352017 l=0
Found bound state at E=  -0.676741979 E[Hartree]=  -0.338370990 l=1
Adding state with l= 0 and E= -18.758219137  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352016647  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338370989582  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 66 Etot[Ry]= -148.946071499 Etot[Hartre]= -74.4730357496 Diff= 5.654095105e-06
Total density has weight= 8.0
Found bound state at E= -37.516438243 E[Hartree]= -18.758219121 l=0
Found bound state at E=  -1.742704021 E[Hartree]=  -0.871352010 l=0
Found bound state at E=  -0.676741967 E[Hartree]=  -0.338370983 l=1
Adding state with l= 0 and E= -18.7582191215  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352010291  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338370983408  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 67 Etot[Ry]= -148.946067774 Etot[Hartre]= -74.4730338872 Diff= 3.72478507416e-06
Total density has weight= 8.0
Found bound state at E= -37.516439060 E[Hartree]= -18.758219530 l=0
Found bound state at E=  -1.742704353 E[Hartree]=  -0.871352176 l=0
Found bound state at E=  -0.676742289 E[Hartree]=  -0.338371145 l=1
Adding state with l= 0 and E= -18.7582195302  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352176301  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371144615  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 68 Etot[Ry]= -148.946073453 Etot[Hartre]= -74.4730367263 Diff= 5.67813913221e-06
Total density has weight= 8.0
Found bound state at E= -37.516438584 E[Hartree]= -18.758219292 l=0
Found bound state at E=  -1.742704159 E[Hartree]=  -0.871352080 l=0
Found bound state at E=  -0.676742101 E[Hartree]=  -0.338371051 l=1
Adding state with l= 0 and E= -18.7582192921  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352079564  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371050675  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 69 Etot[Ry]= -148.946072268 Etot[Hartre]= -74.4730361342 Diff= 1.18418830652e-06
Total density has weight= 8.0
Found bound state at E= -37.516438378 E[Hartree]= -18.758219189 l=0
Found bound state at E=  -1.742704075 E[Hartree]=  -0.871352038 l=0
Found bound state at E=  -0.676742020 E[Hartree]=  -0.338371010 l=1
Adding state with l= 0 and E= -18.7582191888  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352037671  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371009995  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 70 Etot[Ry]= -148.946069548 Etot[Hartre]= -74.4730347741 Diff= 2.72019792646e-06
Total density has weight= 8.0
Found bound state at E= -37.516438791 E[Hartree]= -18.758219396 l=0
Found bound state at E=  -1.742704243 E[Hartree]=  -0.871352122 l=0
Found bound state at E=  -0.676742183 E[Hartree]=  -0.338371092 l=1
Adding state with l= 0 and E= -18.7582193955  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.87135212167  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371091568  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 71 Etot[Ry]= -148.946071912 Etot[Hartre]= -74.4730359562 Diff= 2.36432430256e-06
Total density has weight= 8.0
Found bound state at E= -37.516438666 E[Hartree]= -18.758219333 l=0
Found bound state at E=  -1.742704192 E[Hartree]=  -0.871352096 l=0
Found bound state at E=  -0.676742134 E[Hartree]=  -0.338371067 l=1
Adding state with l= 0 and E= -18.758219333  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352096214  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371066846  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 72 Etot[Ry]= -148.946072129 Etot[Hartre]= -74.4730360646 Diff= 2.16683872623e-07
Total density has weight= 8.0
Found bound state at E= -37.516438491 E[Hartree]= -18.758219246 l=0
Found bound state at E=  -1.742704121 E[Hartree]=  -0.871352061 l=0
Found bound state at E=  -0.676742065 E[Hartree]=  -0.338371032 l=1
Adding state with l= 0 and E= -18.7582192456  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352060685  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.33837103234  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 73 Etot[Ry]= -148.946070566 Etot[Hartre]= -74.4730352828 Diff= 1.56348016844e-06
Total density has weight= 8.0
Found bound state at E= -37.516438673 E[Hartree]= -18.758219336 l=0
Found bound state at E=  -1.742704195 E[Hartree]=  -0.871352098 l=0
Found bound state at E=  -0.676742136 E[Hartree]=  -0.338371068 l=1
Adding state with l= 0 and E= -18.7582193363  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352097568  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371068161  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 74 Etot[Ry]= -148.94607138 Etot[Hartre]= -74.4730356902 Diff= 8.14678685401e-07
Total density has weight= 8.0
Found bound state at E= -37.516438669 E[Hartree]= -18.758219334 l=0
Found bound state at E=  -1.742704193 E[Hartree]=  -0.871352097 l=0
Found bound state at E=  -0.676742135 E[Hartree]=  -0.338371067 l=1
Adding state with l= 0 and E= -18.7582193343  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352096742  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371067356  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 75 Etot[Ry]= -148.946071834 Etot[Hartre]= -74.4730359169 Diff= 4.53573704817e-07
Total density has weight= 8.0
Found bound state at E= -37.516438561 E[Hartree]= -18.758219281 l=0
Found bound state at E=  -1.742704150 E[Hartree]=  -0.871352075 l=0
Found bound state at E=  -0.676742092 E[Hartree]=  -0.338371046 l=1
Adding state with l= 0 and E= -18.7582192806  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352074868  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371046115  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 76 Etot[Ry]= -148.946071066 Etot[Hartre]= -74.4730355329 Diff= 7.6817207173e-07
Total density has weight= 8.0
Found bound state at E= -37.516438629 E[Hartree]= -18.758219314 l=0
Found bound state at E=  -1.742704177 E[Hartree]=  -0.871352089 l=0
Found bound state at E=  -0.676742119 E[Hartree]=  -0.338371059 l=1
Adding state with l= 0 and E= -18.7582193143  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352088574  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371059424  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 77 Etot[Ry]= -148.946071255 Etot[Hartre]= -74.4730356275 Diff= 1.89304046216e-07
Total density has weight= 8.0
Found bound state at E= -37.516438653 E[Hartree]= -18.758219326 l=0
Found bound state at E=  -1.742704187 E[Hartree]=  -0.871352094 l=0
Found bound state at E=  -0.676742129 E[Hartree]=  -0.338371064 l=1
Adding state with l= 0 and E= -18.7582193265  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352093578  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371064287  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 78 Etot[Ry]= -148.946071607 Etot[Hartre]= -74.4730358033 Diff= 3.51544656496e-07
Total density has weight= 8.0
Found bound state at E= -37.516438597 E[Hartree]= -18.758219299 l=0
Found bound state at E=  -1.742704164 E[Hartree]=  -0.871352082 l=0
Found bound state at E=  -0.676742107 E[Hartree]=  -0.338371053 l=1
Adding state with l= 0 and E= -18.7582192987  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352082232  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371053267  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 79 Etot[Ry]= -148.946071279 Etot[Hartre]= -74.4730356397 Diff= 3.27106505438e-07
Total density has weight= 8.0
Found bound state at E= -37.516438616 E[Hartree]= -18.758219308 l=0
Found bound state at E=  -1.742704172 E[Hartree]=  -0.871352086 l=0
Found bound state at E=  -0.676742114 E[Hartree]=  -0.338371057 l=1
Adding state with l= 0 and E= -18.758219308  Hartree with Z= 2 with ferm= 1
Adding state with l= 0 and E= -0.871352085984  Hartree with Z= 4 with ferm= 1
Adding state with l= 1 and E= -0.338371056908  Hartree with Z= 10 with ferm= 0.666666666667
Itteration 80 Etot[Ry]= -148.946071264 Etot[Hartre]= -74.4730356318 Diff= 1.59294302193e-08
In [ ]:
 
In [ ]:
 
In [ ]: