For a reservoir fulfilling electroneutrality and autodissociation of water, we have c res H + = c ref × 10 -pH res and the concentrations c res OH -, c res Na + and c res Cl -can be determined as explained in §1 of the supporting information (SI). Note that the reservoir employed here is a purely theoretical construct associated with our use of the semi-grandcanonical ensemble, that has no direct analogue in typical microgel swelling experiments. In particular, as has been explained earlier, the pH-value of the reservoir is in general not the same as inside the system due to the emergence of a Donnan potential. Nevertheless, since the same approach is used in the theory and simulations, we can perform a comparison on an equal footing.