We next briefly discuss how the RR-cpH algorithm can be modified to properly account for the requirement of charge neutrality inside the simulation cell. As was stressed previous, RR-cpH algorithm is intrinsically grand canonical. Therefore, we must treat the system as if it is connected to a reservoir of acid and salt. In a physical system this would require presence of a semipermeable membrane, which would allow for a free exchange of ions, but would restrict the motion of polymers to the system's interior. Since the concentration of counterions is larger inside the system than in the reservoir, they will tend to diffuse into reservoir, resulting in electric field and a potential drop across the membrane. This is the physical origin of the Donnan potential, ϕ D .