F_2 LDAΒΆ

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

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

#Nuclear charges on centers AB
Za  = 9
Zb = 9

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

Nmo = [[5], [4]]
N   = [[10],[8]]

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

#Grid Options
NP = 7 #Number of points per block
NM =  [16,16] #Number of blocks [angular, radial]
L = np.arccosh(10./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({
        "alpha" : 0.1
      })

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

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

    1      -319.01838      +1.60351e-01       +1.00000e+00
    2      -302.67085      +1.60118e-02       +5.40109e-02
    3      -282.78688      -1.08019e-01       +7.03143e-02
    4      -267.70349      -2.27884e-01       +5.63437e-02
    5      -256.07324      -3.16335e-01       +4.54177e-02
    6      -246.65516      -3.80504e-01       +3.81832e-02
    7      -238.91135      -4.25934e-01       +3.24129e-02
    8      -232.50125      -4.56875e-01       +2.75702e-02
    9      -227.17430      -4.76684e-01       +2.34487e-02
   10      -222.73492      -4.88035e-01       +1.99312e-02
   11      -219.02643      -4.93047e-01       +1.69317e-02
   12      -215.92174      -4.93396e-01       +1.43788e-02
   13      -213.31697      -4.90393e-01       +1.22108e-02
   14      -211.12693      -4.85059e-01       +1.03731e-02
   15      -209.28154      -4.78182e-01       +8.81778e-03
   16      -208.01295      -4.77901e-01       +6.09857e-03
   17      -206.34999      -4.62871e-01       +8.05893e-03
   18      -205.23835      -4.54225e-01       +5.41635e-03
   19      -204.29112      -4.45680e-01       +1.58033e-02
   20      -203.45379      -4.31665e-01       +4.11562e-03
   21      -202.98892      -4.31521e-01       +2.29010e-03
   22      -202.15114      -4.20401e-01       +4.14432e-03
   23      -201.66665      -4.15125e-01       +2.40243e-03
   24      -201.24346      -4.09109e-01       +2.10286e-03
   25      -200.87369      -4.03246e-01       +1.84084e-03
   26      -200.55233      -3.97815e-01       +1.60234e-03
   27      -200.27343      -3.92862e-01       +1.39263e-03
   28      -200.03116      -3.88367e-01       +1.21113e-03
   29      -199.82045      -3.84301e-01       +1.05450e-03
   30      -199.63695      -3.80632e-01       +9.19198e-04
   31      -199.47694      -3.77326e-01       +8.02137e-04
   32      -199.33727      -3.74354e-01       +7.00678e-04
   33      -199.21523      -3.71685e-01       +6.12595e-04
   34      -199.10851      -3.69291e-01       +5.36004e-04
   35      -199.01511      -3.67147e-01       +4.69310e-04
   36      -198.93331      -3.65227e-01       +4.11160e-04
   37      -198.86164      -3.63510e-01       +3.60401e-04
   38      -198.79881      -3.61975e-01       +3.16045e-04
   39      -198.74371      -3.60604e-01       +2.77251e-04
   40      -198.69537      -3.59379e-01       +2.43294e-04
   41      -198.65295      -3.58285e-01       +2.13549e-04
   42      -198.61571      -3.57310e-01       +1.87478e-04
   43      -198.58302      -3.56439e-01       +1.64615e-04
   44      -198.55432      -3.55662e-01       +1.44557e-04
   45      -198.52912      -3.54969e-01       +1.26953e-04
   46      -198.50698      -3.54352e-01       +1.11497e-04
   47      -198.48755      -3.53801e-01       +9.79248e-05
   48      -198.47048      -3.53310e-01       +8.60037e-05
   49      -198.45549      -3.52872e-01       +7.55311e-05
   50      -198.44233      -3.52482e-01       +6.63300e-05
   51      -198.43077      -3.52134e-01       +5.84837e-05
   52      -198.42062      -3.51823e-01       +5.19780e-05
   53      -198.41171      -3.51547e-01       +4.61970e-05
   54      -198.40389      -3.51300e-01       +4.10598e-05
   55      -198.39703      -3.51080e-01       +3.64948e-05
   56      -198.39101      -3.50884e-01       +3.24378e-05
   57      -198.38572      -3.50710e-01       +2.88322e-05
   58      -198.38109      -3.50554e-01       +2.56276e-05
   59      -198.37702      -3.50415e-01       +2.27792e-05
   60      -198.37345      -3.50291e-01       +2.02476e-05
   61      -198.37033      -3.50181e-01       +1.79977e-05
   62      -198.36759      -3.50082e-01       +1.59978e-05
   63      -198.36519      -3.49995e-01       +1.42201e-05
   64      -198.36308      -3.49916e-01       +1.26400e-05
   65      -198.36124      -3.49846e-01       +1.12354e-05
   66      -198.35963      -3.49784e-01       +9.98682e-06
 Total Energy: -198.35962903765648

Compare against CCCBDB Enerty: Etot = -198.706387