Boron 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  = 5
Zb = 0

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

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

optKS = {
        "interaction_type" : "dft",
        "SYM" : False,
        "FRACTIONAL" : True # Notice that Fractional is turned on.
        }

#Grid Options
NP = 4 #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      -30.01688      +3.67720e-02       +1.00000e+00
    2      -25.84524      -1.83671e-01       +1.61409e-01
    3      -24.83620      -1.78665e-01       +4.06276e-02
    4      -24.51224      -1.59976e-01       +1.32163e-02
    5      -24.39998      -1.47880e-01       +4.60086e-03
    6      -24.37244      -1.41464e-01       +1.41259e-03
    7      -24.34642      -1.38286e-01       +1.06873e-03
    8      -24.34254      -1.36685e-01       +4.58122e-04
    9      -24.34145      -1.35920e-01       +2.48393e-04
   10      -24.34128      -1.35548e-01       +1.32124e-04
   11      -24.34137      -1.35367e-01       +6.92865e-05
   12      -24.34148      -1.35277e-01       +3.59079e-05
   13      -24.34156      -1.35233e-01       +1.84181e-05
   14      -24.34162      -1.35211e-01       +9.36798e-06
 Total Energy: -24.341617173303305