iupacNaming
index


 
Routines to convert to/from Xplor-NIH/IUPAC atom naming

 
Functions
       
fromIUPAC(selection='all', check=False)
If check==True, before converting, test that there are no XPLOR-named
atoms present.
getCurrentScheme(selection='all', check=False, verbose=False)
Determine the current (proton) atom naming scheme by checking for the
first atom names unique to a naming scheme.
 
If check is True, go through all residues and make certain that no atom
from the other naming scheme is present. If there's a conflict, raise an
Exception.
getSavedScheme(selection, newScheme=None)
setSavedScheme(selection, newScheme)
toIUPAC(selection='all', check=False)
If check==True, before converting, test that there are no IUPAC-named
atoms present.

 
Data
        fromRestype = {'ARG': {'HB2': 'HB2', 'HB3': 'HB1', 'HD2': 'HD2', 'HD3': 'HD1', 'HG2': 'HG2', 'HG3': 'HG1'}, 'ASN': {'HB2': 'HB2', 'HB3': 'HB1'}, 'ASP': {'HB2': 'HB2', 'HB3': 'HB1'}, 'CYS': {'HB2': 'HB2', 'HB3': 'HB1'}, 'GLN': {'HB2': 'HB2', 'HB3': 'HB1', 'HG2': 'HG2', 'HG3': 'HG1'}, 'GLU': {'HB2': 'HB2', 'HB3': 'HB1', 'HG2': 'HG2', 'HG3': 'HG1'}, 'GLY': {'HA2': 'HA2', 'HA3': 'HA1'}, 'HIS': {'HB2': 'HB2', 'HB3': 'HB1'}, 'ILE': {'HG12': 'HG12', 'HG13': 'HG11'}, 'LEU': {'HB2': 'HB2', 'HB3': 'HB1'}, ...}
fromname = 'HB2'
restype = 'TYR'
savedScheme = {}
toRestype = {'ARG': {'HB1': 'HB3', 'HB2': 'HB2', 'HD1': 'HD3', 'HD2': 'HD2', 'HG1': 'HG3', 'HG2': 'HG2'}, 'ASN': {'HB1': 'HB3', 'HB2': 'HB2'}, 'ASP': {'HB1': 'HB3', 'HB2': 'HB2'}, 'CYS': {'HB1': 'HB3', 'HB2': 'HB2'}, 'GLN': {'HB1': 'HB3', 'HB2': 'HB2', 'HG1': 'HG3', 'HG2': 'HG2'}, 'GLU': {'HB1': 'HB3', 'HB2': 'HB2', 'HG1': 'HG3', 'HG2': 'HG2'}, 'GLY': {'HA1': 'HA3', 'HA2': 'HA2'}, 'HIS': {'HB1': 'HB3', 'HB2': 'HB2'}, 'ILE': {'HG11': 'HG13', 'HG12': 'HG12'}, 'LEU': {'HB1': 'HB3', 'HB2': 'HB2'}, ...}