where N A is the Avogadro number, N H is the number of free hydronium ions, and ∆E is the change in electrostatic energy after the protonation/deprotonation move, calculated using Eq. ( ). Once the system is fully equilibrated and the average number of protonated surface groups N p is obtained, we can use the surface Widom insertion algorithm to calculate the pH of the suspension :