# Proper handling of 1-2 1-3 1-4 bonded neighbors in long range electrostatic solver

I have been wrestling with how to properly deal with bonded (1-2 1-3 and 1-4) particle neighbor interactions, or whether they have to be dealt with, in the long range electrostatic solver codes (PME, SPME, etc). For instance, in the short range calculation, these interactions are typically excluded by omitting them from the neighbor list, or are simply scaled by the appropriate factor (0.0, 0.5, 0.833 etc) in the short range calculation. However, I am confused as to where this would happen, or how it could happen, in the long range solver. In the long range calculation, we, to my understanding, perform the following steps.

1. interpolate charges on the mesh, and obtain total charge density
2. FFT and solve for the electrostatic field
3. FFT back and obtain electrostatic potential
4. interpolate forces back to particles

I am not seeing where in these steps we could exclude bonded neighbor interactions. The electric field is obtained via the total charge density which contains information from all particles, whether or not they are bonded. Is it even necessary to exclude these interactions here?

Note that the same correction term used in SPME is also valid in PME, since this term does not depend on the choice of interpolating functions used to compute the forces. This is so because $E_{\text{rec}}$ can be written as (following the same notation as [1]): $$E_{\text{rec}} = \frac{1}{2} \sum_{n}^{\star} \sum_{i,j=1}^N \frac{q_i q_j\text{erf}(\beta \, | r_j - r_i + n |)}{|r_j - r_i + n|} +\frac{\beta}{\sqrt{\pi}} \sum_{i=1}^N q_i^2,$$ so the first term in $E_{\text{corr}}$, namely $$-\frac{1}{2} \sum_{(i,j)\in M} \frac{q_i q_j\text{erf}(\beta \, | r_j - r_i|)}{|r_j - r_i|}$$ takes care of removing the contribution of the nearest neighbors to the $E_{\text{rec}}$.