Finally, for fun (not required), you may wish to see if your code can handle uranium, the largest naturally occurring element. The specifications for it are
/* Specs for U */
Z=92;
lmax=3;
nmax=ivector(0,lmax);
nmax[0]=6;
nmax[1]=4;
nmax[2]=3;
nmax[3]=1;
nmaxmax=0;
for (l=0; l<=lmax; l++)
if (nmax[l]>nmaxmax) nmaxmax=nmax[l];
F=dmatrix(0,lmax,0,nmaxmax);
F[0][0]=2.;
F[0][1]=2.;
F[0][2]=2.;
F[0][3]=2.;
F[0][4]=2.;
F[0][5]=2.;
F[0][6]=2.;
F[1][0]=6.;
F[1][1]=6.;
F[1][2]=6.;
F[1][3]=6.;
F[1][4]=6.;
F[2][0]=10.;
F[2][1]=10.;
F[2][2]=10.;
F[2][3]=1;
F[3][0]=14.;
F[3][1]=3.;