@classmethod
def get(cls, key, abbronly=False):
    """
        Gets the amino acid corresponding to either the residue name, 3-letter
        abbreviation or 1-letter symbol. It is case-insensitive.

        Parameters
        ----------
        key : str
            1-letter symbol, 3-letter abbreviation, or residue name
        abbronly : bool
            If True, only look for the 3-letter abbreviation (not the 1-letter
            symbol)

        Returns
        -------
        residue : :class:`AminoAcidResidue`
            The residue corresponding to the given key

        Raises
        ------
        KeyError if ``key`` is not a symbol, abbreviation, or case-insensitive
        name of an amino acid residue, or any of its abbreviations.
        """
    if len(key) == 1 and not abbronly:
        return cls._all_residues_by_symbol[key.upper()]
    if len(key) == 3:
        return cls._all_residues_by_abbr[key.upper()]
    if len(key) == 4 and key[0].upper() in 'CN':
        return cls._all_residues_by_abbr[key[1:].upper()]
    return cls._all_residues_by_name[key.upper()]
