I'm trying to write a program to calculate fixed-point Hartree-Fock level energies of molecules (for my amusement) and everything makes sense but this. I've been agonizing over this for almost 3 hours now. I've tried pretty much every Google search I can think of (mostly returning results that were either too vague or without enough detail) and looked in almost every book/ebook I own (pretty much always too vague). Any help whatsoever would be extremely appreciated.
As far as I understand, an STO-NG contracted Gaussian basis function has the following form:
$$\phi_{\mu}^{\textrm{CGF}}(\vec{r}) = \sum_{p}^{N_{\textrm{PGF}}} d_{p\mu} (x-X_A)^{i_{p\mu}} (y-Y_A)^{j_{p\mu}} (z-Z_A)^{k_{p\mu}} e^{-\alpha_{p\mu}|\vec{r}-\vec{R_{A}}|^{2}}$$
where the contraction coefficients, $d_{k\mu}$ and exponents, $\alpha_{k\mu}$ are chosen such that $\phi_{\mu}$ provides the 'best fit' to a Slater-type orbital having a Slater exponent $\zeta$, $\vec{R_{A}}=(X_A,Y_A,Z_A)$ is a fixed reference centre (usually a nucleus) and $l_{p\mu} = i_{p\mu} + j_{p\mu} + k_{p\mu}$ defines the angular momentum of the primitive Gaussian function:
$$\phi_{p\mu}^{\textrm{PGF}} = (x-X_A)^{i_{p\mu}} (y-Y_A)^{j_{p\mu}} (z-Z_A)^{k_{p\mu}} e^{-\alpha_{p\mu}|\vec{r}-\vec{R_{A}}|^{2}}.$$
I'm having problems interpreting data files documenting contraction coefficients and exponents for various basis sets.
For example, please consider the following snippet from the Gaussian 94 STO-3G basis set file documenting contraction parameters for Carbon:
****
C 0
S 3 1.00
71.6168370 0.15432897
13.0450960 0.53532814
3.5305122 0.44463454
SP 3 1.00
2.9412494 -0.09996723 0.15591627
0.6834831 0.39951283 0.60768372
0.2222899 0.70011547 0.39195739
****
I have read in various places that there are enough coefficients here to describe 5 contracted functions, but I see only enough for 3 maximum (if the exponents are the same, but the coefficients change between 2S and 2P). I'd be eternally grateful if someone could explain for me, precisely how one would determine the following information from such a basis set data file:
1) Which EXACT basis functions appear within each contracted function?
2) How many contracted Gaussian basis functions there are?
If possible, would you be able to do the same for the following snippet, again for Carbon, Gaussian 94, but this time for the more complicated 6-31++G** basis set?:
****
C 0
S 6 1.00
3047.5249000 0.0018347
457.3695100 0.0140373
103.9486900 0.0688426
29.2101550 0.2321844
9.2866630 0.4679413
3.1639270 0.3623120
SP 3 1.00
7.8682724 -0.1193324 0.0689991
1.8812885 -0.1608542 0.3164240
0.5442493 1.1434564 0.7443083
SP 1 1.00
0.1687144 1.0000000 1.0000000
SP 1 1.00
0.0438000 1.0000000 1.0000000
D 1 1.00
0.8000000 1.0000000
****