We present a computational scheme for extracting the energy level alignment
of a metal/molecule interface, based on constrained density functional theory
and local exchange and correlation functionals. The method, applied here to
benzene on Li(100), allows us to evaluate charge transfer energies, as well as
the spatial distribution of the image charge induced on the metal surface. We
systematically study the energies for charge transfer from the molecule to the
substrate as function of the molecule-substrate distance, and investigate the
effects arising from image charge confinement and local charge neutrality
violation. For benzene on Li(100) we find that the image charge plane is
located at about 1.8 \AA above the Li surface, and that our calculated charge
transfer energies compare perfectly with those obtained with a classical
electrostatic model having the image plane located at the same position. The
methodology outlined here can be applied to study any metal/organic interface
in the weak coupling limit at the computational cost of a total energy
calculation. Most importantly, as the scheme is based on total energies and not
on correcting the Kohn-Sham quasiparticle spectrum, accurate results can be
obtained with local/semi-local exchange and correlation functionals. This
enables a systematic approach to convergence