  The projection of the eigenfunctions obtained in standard plane-wave
first-principle calculations is used for analyzing atomic-orbital basis sets.
The "spilling" defining the error in such a projection allows the evaluation of
the quality of an atomic-orbital basis set for a given system and its
systematic variational optimization. The same projection allows obtaining the
band structure and the Hamiltonian matrix elements in the previously optimized
atomic basis. The spilling is shown to correlate with the mean square error in
the energy bands, indicating that the basis optimization via spilling
minimization is qualitatively equivalent to the energy-minimization scheme, but
involves a much smaller computational effort. The spilling minimization also
allows the optimization of bases for uses different than total-energy
calculations, like the description of the band gap in semiconductors. The
method is applied to the characterization of finite-range pseudo-atomic
orbitals {[}O. F. Sankey and D. J. Niklewski, Phys. Rev. B {\bf 40}, 3979
(1989){]} in comparison to infinite-range pseudo-atomic and Slater-type
orbitals. The bases are evaluated and optimized for several zincblende
semiconductors and for aluminum. The quality of the finite-range orbitals is
found to be perfectly comparable to the others with the advantage of a limited
range of interacions. A simple scheme is proposed to expand the basis without
increasing the range. It is found that a double-$z$ basis substantially
improves the basis performance on diamond, whereas $d$-polarization is required
for Si and Al for similar results. Finally, the projection allows the chemical
analysis of the plane-wave results via population analysis on the previously
optimized atomic basis.
