Protonation and deprotonation of polypyrrole chain in aqueous solutions