Carbon 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  = 6
Zb = 0

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

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

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      -47.07842      +4.06268e-02       +1.00000e+00
    2      -39.35222      -4.15177e-01       +1.96334e-01
    3      -38.20657      -3.07153e-01       +2.99858e-02
    4      -37.73128      -2.47922e-01       +1.25966e-02
    5      -37.53763      -2.19361e-01       +5.15898e-03
    6      -37.48970      -2.05967e-01       +1.47783e-03
    7      -37.43071      -1.99693e-01       +1.57617e-03
    8      -37.42208      -1.96697e-01       +4.89459e-04
    9      -37.41911      -1.95332e-01       +2.65462e-04
   10      -37.41841      -1.94686e-01       +1.41107e-04
   11      -37.41839      -1.94378e-01       +7.37073e-05
   12      -37.41852      -1.94230e-01       +3.80013e-05
   13      -37.41865      -1.94159e-01       +1.93993e-05
   14      -37.41873      -1.94125e-01       +9.82422e-06
 Total Energy: -37.4187337652327

Compare againts Nist: Etot = -37.425749