The last term in Eq. 11 is the interaction of the Mulliken charges in the original cell with the QM charges in the replica cells (φ QM ) and all the MM charges, both in the original and the replicas (φ MM ). Explicit expressions for the MM and QM potentials are given in Ref. 9. In short, the MM potential is composed of two terms that account for the short and long-range part of the electrostatic interaction arising from MM atoms in both the original and replica cells. Instead, the QM potential accounts for the interactions arising from QM atoms in replicas and includes the same contributions plus a term that cancels the spurious self-interaction. As the interactions between QM atoms in the original cells are not easily removed from the long-range contribution, an additional term is added to avoid double counting. In our implementation, the long-range part of the potential that appears in both the MM and QM potential is computed by applying the sPME algorithm of Pedersen and coworkers. By projecting both the Mulliken and the MM atomic charges on the sPME grid it is possible to evaluate the long-range part of the potential by applying the original sPME algorithm without introducing modifications.