Formation of electrostatic interactions on the protein-folding pathway.