  Given a partition of a large system into an active quantum mechanical (QM)
region and its environment, we present a simple way of embedding the QM region
into an effective electrostatic potential representing the environment. This
potential is generated by partitioning the environment into well defined
fragments, and assigning each one a set of electrostatic multipoles, which can
then be used to build up the electrostatic potential. We show that, providing
the fragments and the projection scheme for the multipoles are chosen properly,
this leads to an effective electrostatic embedding of the active QM region
which is of equal quality as a full QM calculation. We coupled our formalism to
the DFT code BigDFT, which uses a minimal set of localized in-situ optimized
basis functions; this property eases the fragment definition while still
describing the electronic structure with great precision. Thanks to the linear
scaling capabilities of BigDFT, we can compare the modeling of the
electrostatic embedding with results coming from unbiased full QM calculations
of the entire system. This enables a reliable and controllable setup of an
effective coarse-graining approach, coupling together different levels of
description, which yields a considerable reduction in the degrees of freedom
and thus paves the way towards efficient QM/QM and QM/MM methods for the
treatment of very large systems.
