All electronic structure calculations in this work were carried out using the Molpro system of ab initio programs. A modified version of the code was used to obtain the density fitted density matrix and exchange integrals required to optimize the exponents of the auxiliary basis sets, with BFGS or Nelder-Mead simplex algorithms employed in the optimisation. For the atoms aluminium through argon the cc-pV(n+d)Z orbital basis sets were used, and the cc-pVnZ/JKFit auxiliary basis sets of Weigend were the starting point for the auxiliary basis set optimisation. For sodium and magnesium, new cc-pVnZ/JKFit auxiliary sets matched to the corresponding orbital sets were optimized in this work, along with the analogous cc-pV(n+d)Z/JKFit auxiliary sets.