  The performance of basis sets made of numerical atomic orbitals is explored
in density-functional calculations of solids and molecules. With the aim of
optimizing basis quality while maintaining strict localization of the orbitals,
as needed for linear-scaling calculations, several schemes have been tried. The
best performance is obtained for the basis sets generated according to a new
scheme presented here, a flexibilization of previous proposals. The basis sets
are tested versus converged plane-wave calculations on a significant variety of
systems, including covalent, ionic and metallic. Satisfactory convergence
(deviations significantly smaller than the accuracy of the underlying theory)
is obtained for reasonably small basis sizes, with a clear improvement over
previous schemes. The transferability of the obtained basis sets is tested in
several cases and it is found to be satisfactory as well.
