  Based on Bardeen's perturbative approach to tunneling, we have found an
expression for the current between tip and sample, which can be efficiently
coded in order to perform fast ab initio simulations of STM images. Under the
observation that the potential between the electrodes should be nearly flat at
typical tunnel gaps, we have addressed the difficulty in the computation of the
tunneling matrix elements by considering a vacuum region of constant potential
delimited by two surfaces (each of them close to tip and sample respectively),
then propagating tip and sample wave functions by means of the vacuum Green's
function, to finally obtain a closed form in terms of convolutions. The current
is then computed for every tip-sample relative position and for every bias
voltage in one shot. The electronic structure of tip and sample is calculated
at the same footing, within density functional theory, and independently. This
allows us to carry out multiple simulations for a given surface with a database
of different tips. We have applied this method to the Si(111)-(7x7) and
Ge(111)-c(2x8) surfaces. Topographies and spectroscopic data, showing a very
good agreement with experiments, are presented.
