def is_aa(residue, standard=False):
 if (not isinstance(residue, basestring)):
  residue = residue.get_resname()
 residue = residue.upper()
 if standard:
  return (residue in d3_to_index)
 else:
  return (residue in SCOPData.protein_letters_3to1)

def is_aa ( residue , standard = False ) : if ( not isinstance ( residue , basestring ) ) : residue = residue . get_resname ( ) residue = residue . upper ( ) if standard : return ( residue in d3_to_index ) else : return ( residue in SCOPData . protein_letters_3to1 )
return true if residue object/string is an amino acid .