docs: def sequence_charge(seq, pH=7.4):
      """Calculates the total charge of the input polypeptide sequence.
  
      Parameters
      ----------
      seq : str
          Sequence of amino acids.
      pH : float
          pH of interest.
      """
      if 'X' in seq:
          warnings.warn(_nc_warning_str, NoncanonicalWarning)
      adj_protein_charge = sum(
          [partial_charge(aa, pH) * residue_charge[aa] * n
           for aa, n in Counter(seq).items()])
      adj_protein_charge += (
          partial_charge('N-term', pH) * residue_charge['N-term'])
      adj_protein_charge += (
          partial_charge('C-term', pH) * residue_charge['C-term'])
      return adj_protein_charge