Ionic interactions in natural and synthetic macromolecules