Nitrogen LDAΒΆ

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

#Distance of the nucley from grid center
a =  1.0

#Nuclear charges on centers AB
Za  = 7
Zb = 0

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

Nmo = [[2],[2]]
N   = [[4],[3]]

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

#Grid Options
NP = 7 #Number of points per block
NM =  [10,10] #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      -69.38570      +4.01641e-02       +1.00000e+00
    2      -56.25425      -7.58626e-01       +2.33430e-01
    3      -55.25403      -4.72147e-01       +1.81021e-02
    4      -54.56027      -3.52708e-01       +1.27156e-02
    5      -54.22580      -3.00448e-01       +6.16811e-03
    6      -54.13960      -2.76526e-01       +1.59218e-03
    7      -54.02925      -2.65433e-01       +2.04240e-03
    8      -54.01256      -2.60201e-01       +4.15936e-04
    9      -54.00604      -2.57871e-01       +2.27959e-04
   10      -54.00420      -2.56775e-01       +1.21733e-04
   11      -54.00385      -2.56260e-01       +6.37754e-05
   12      -54.00391      -2.56018e-01       +3.29513e-05
   13      -54.00404      -2.55903e-01       +1.68617e-05
   14      -54.00414      -2.55850e-01       +8.55148e-06
 Total Energy: -54.00414088771682

Compare against Nist: Etot = -54.025016