  As part of a project to obtain better optical response functions for nano
materials and other systems with strong excitonic effects we here calculate the
exchange-correlation (XC) potential of density-functional theory (DFT) at a
level of approximation which corresponds to the dynamically- screened-exchange
or GW approximation. In this process we have designed a new numerical method
based on cubic splines which appears to be superior to other techniques
previously applied to the "inverse engineering problem" of DFT, i.e., the
problem of finding an XC potential from a known particle density. The
potentials we obtain do not suffer from unphysical ripple and have, to within a
reasonable accuracy, the correct asymptotic tails outside localized systems.
The XC potential is an important ingredient in finding the particle-conserving
excitation energies in atoms and molecules and our potentials perform better in
this regard as compared to the LDA potential, potentials from GGA:s, and a DFT
potential based on MP2 theory.
