Calculates the net charge of a polypeptide at a given pH.