pH calculation and protonation percentage