Sodium LDAΒΆ

[1]:
import numpy as np
from CADMium import Psgrid
from CADMium import Kohnsham

#Distance of the nucley from grid center
a =  2.36 / 2

#Nuclear charges on centers AB
Za  = 11
Zb = 17

#Set polaization. 1 Unpolarized, 2 Polarized
pol = 1

Nmo = [[8],[6]]
N   = [[16],[12]]

optKS = {
        "interaction_type" : "dft",
        "SYM" : False,
        "FRACTIONAL" : False,
        }

#Grid Options
NP = 7 #Number of points per block
NM =  [8,8] #Number of blocks [angular, radial]
L = np.arccosh(15./a) #Maximum radial coordinate value
loc = np.array(range(-4,5)) #Non inclusive on upper bound

#Create and initialize grid object
grid = Psgrid(NP, NM, a, L, loc)
grid.initialize()

#Kohn Sham object
KS = Kohnsham(grid, Za, Zb, pol, Nmo, N, optKS)
KS.scf({})

print(f" Total Energy: {KS.E.E}")
 iter    Total Energy     HOMO Eigenvalue         Res

-----------------------------------------------------------

    1      -818.19077      +1.01813e-01       +1.00000e+00
    2      -592.60606      -3.82037e+00       +3.80666e-01
    3      -623.91403      -1.39911e+00       +5.01800e-02
    4      -626.10269      -5.68723e-01       +7.63083e-03
    5      -628.06436      -5.47590e-01       +3.58690e-03
    6      -620.58519      -1.92346e-01       +1.20518e-02
    7      -620.74720      -1.68060e-01       +8.67527e-04
    8      -619.24641      -1.69389e-01       +2.42358e-03
    9      -618.44937      -1.86828e-01       +1.28877e-03
   10      -620.08853      -1.51378e-01       +2.64342e-03
   11      -619.26910      -1.69601e-01       +1.32321e-03
   12      -619.75497      -1.58625e-01       +7.83974e-04
   13      -619.33883      -1.68434e-01       +6.71911e-04
   14      -619.70029      -1.60007e-01       +5.83274e-04
   15      -619.39198      -1.67243e-01       +4.97764e-04
   16      -619.65486      -1.61148e-01       +4.24242e-04
   17      -619.42974      -1.66430e-01       +3.63439e-04
   18      -619.62214      -1.61973e-01       +3.10511e-04
   19      -619.45737      -1.65834e-01       +2.65978e-04
   20      -619.59831      -1.62567e-01       +2.27465e-04
   21      -619.47764      -1.65391e-01       +1.94801e-04
   22      -619.58089      -1.62995e-01       +1.66659e-04
   23      -619.49249      -1.65061e-01       +1.42705e-04
   24      -619.56815      -1.63304e-01       +1.22111e-04
   25      -619.50338      -1.64817e-01       +1.04550e-04
   26      -619.55881      -1.63529e-01       +8.94707e-05
   27      -619.51136      -1.64636e-01       +7.65983e-05
   28      -619.55197      -1.63691e-01       +6.55550e-05
   29      -619.51720      -1.64502e-01       +5.61206e-05
   30      -619.54696      -1.63810e-01       +4.80318e-05
   31      -619.52149      -1.64404e-01       +4.11178e-05
   32      -619.54329      -1.63897e-01       +3.51925e-05
   33      -619.52463      -1.64332e-01       +3.01258e-05
   34      -619.54060      -1.63960e-01       +2.57851e-05
   35      -619.52693      -1.64278e-01       +2.20724e-05
   36      -619.53863      -1.64006e-01       +1.88924e-05
   37      -619.52861      -1.64239e-01       +1.61719e-05
   38      -619.53719      -1.64040e-01       +1.38422e-05
   39      -619.52985      -1.64211e-01       +1.18488e-05
   40      -619.53613      -1.64064e-01       +1.01420e-05
   41      -619.53075      -1.64190e-01       +8.68137e-06
 Total Energy: -619.5307535390275