  The paper proposes a method to obtain the optimal basis set for solving the
self consistent field (SCF) equations for large atomic systems in order to
calculate the energy barriers in tunneling structures, with higher accuracy and
speed. Taking into account the stochastic-like nature of the samples of all the
involved wave functions for many body problems, a statistical optimization is
made by considering the covariance matrix of these samples. An eigenvalues
system is obtained and solved for the optimal basis set and by inspecting the
rapidly decreasing eigenvalues one may seriously reduce the necessary number of
vectors that insures an imposed precision. This leads to a potentially
significant improvement in the speed of the SCF calculations and accuracy, as
the statistical properties of a large number of wave functions in an large
spatial domain may be considered. The eigenvalue problem has to be solved only
few times, so that the amount of time added may be much smaller that the
overall iterating SCF calculations. A simple implementation of the method is
presented for a situation where the analytical solution is known, and the
results are encouraging.
