where ∆E is the difference in electrostatic energy between systems with N and N + 1 protonated groups, and ϕ B is the Bethe potential that the virtual proton gains after entering into the Ewald "crystal". Since Ewald sum periodically replicates the whole simulation cell, it will also replicate the virtual proton. A periodic charge nonneutral system will have an infinite energy. To avoid this, together with the virtual proton, in the calculation of E, we also introduce a uniform neutralizing background, which regularizes the electrostatic energy calculation, see Appendix A. The average in Eqn. ( ) is calculated using the ensemble average of the unperturbed (without virtual proton) system. We notice that the left hand side of Eqn. ( ) is c ⊖ /a H + . Taking the decadic logarithm of the two sides of this equation, we finally obtain