  The electronic spectrum of a chemically contacted molecule in the junction of
a scanning tunneling microscope can be modified by tip retraction. We analyze
this effect by a combination of density functional, many-body perturbation and
numerical renormalization group theory, taking into account both the
non-locality and the dynamics of electronic correlation. Our findings, in
particular the evolution from a broad quasiparticle resonance below to a narrow
Kondo resonance at the Fermi energy, correspond to the experimental
observations.
