AlloViz.AlloViz.trajutils.standardize_resnames#

AlloViz.AlloViz.trajutils.standardize_resnames(protein, **kwargs)[source]#

Change the residue names of a protein to standard 3-letter codes

Change the residue names of the passed Universe to standard 3-letter names and also put them in the same segment (the first segment of the Universe by default) to avoid problems with packages not recognizing non-standard residue names or producing unexpected results if residues are in various segments.

Bio.SeqUtils is used to change the codes and also retrieve the standard 3-to-1 and 1-to-3 residue code mapping, which is also extended with MDAnalysis.lib.util.inverse_aa_codes.

Parameters:
proteinAtomGroup

Atoms of the protein for which to standardize residue names.

**kwargs

special_res can be passed as an optional kwarg, and it should be a dictionary containing a mapping of special residue 3/4-letter code(s) present in the structure to the corresponding standard 1-letter code(s).