Your loops over
k
andl
always started at zero for every iteration, meaning you never got past the first three basis functions when accessingzeta
andcijk
. I addedcurrent_i
andcurrent_j
to keep track of how far you had already travelled through these arrays. Having the loops include these variables and incrementing at the end of eachi
andj
loop, it will now go through all ofzeta
andcijk
.You need to normalize the integrals or each of the individual basis functions (I discuss this for a similar question on Chem SE). Here, I explicitly included values to normalize each function, but you will need to add code to do this in general. For an s-type function, the normalization formula is: $$N=\bigg(\frac{2\zeta}{\pi}\bigg)^{3/4}$$$$\tag{1}N=\bigg(\frac{2\zeta}{\pi}\bigg)^{3/4}$$ The normalization will be different for higher angular momentum functions (p, d, f, etc).
Nike Dattani - No Free Time
- 36.7k
- 4
- 100
- 252