Protool/flags.py
def is_hbond_donor(self,atom):
        """Returns 1 if the atom can be a hydrogen donor"""
        atomname=atom.split(':')[-1]
        residuename=self.resname(atom)
        donors={'LYS':['NZ'],
                'ARG':['NE','NH1','NH2'],
                'SER':['OG'],
                'THR':['OG1'],
                'TYR':['OH'],
                'HIS':['ND1','NE2'],
                'CYS':['SG'],
                'ASN':['ND2'],
                'GLN':['NE2'],
                'TRP':['NE1']}
        #
        # Backbone
        #
        if self.is_mainchain(atom) and atomname=='N' and residuename!='PRO':
            return 1
        #
        # Other residues
        #
        if donors.has_key(residuename):
            if atomname in donors[residuename]:
                return 1
        return None
Returns 1 if the atom can be a hydrogen donor
Returns 1 if the atom can be a hydrogen donor
Returns 1 if the atom can be a hydrogen donor
def is_hbond_donor(self,atom):
        atomname=atom.split(':')[-1]
        residuename=self.resname(atom)
        donors={'LYS':['NZ'],
                'ARG':['NE','NH1','NH2'],
                'SER':['OG'],
                'THR':['OG1'],
                'TYR':['OH'],
                'HIS':['ND1','NE2'],
                'CYS':['SG'],
                'ASN':['ND2'],
                'GLN':['NE2'],
                'TRP':['NE1']}
         Backbone
        if self.is_mainchain(atom) and atomname=='N' and residuename!='PRO':
            return 1
         Other residues
        if donors.has_key(residuename):
            if atomname in donors[residuename]:
                return 1
        return None
def is_hbond_donor ( self , atom ) : atomname = atom . split ( ':' ) [ - 1 ] residuename = self . resname ( atom ) donors = { 'LYS' : [ 'NZ' ] , 'ARG' : [ 'NE' , 'NH1' , 'NH2' ] , 'SER' : [ 'OG' ] , 'THR' : [ 'OG1' ] , 'TYR' : [ 'OH' ] , 'HIS' : [ 'ND1' , 'NE2' ] , 'CYS' : [ 'SG' ] , 'ASN' : [ 'ND2' ] , 'GLN' : [ 'NE2' ] , 'TRP' : [ 'NE1' ] } if self . is_mainchain ( atom ) and atomname == 'N' and residuename != 'PRO' : return 1 if donors . has_key ( residuename ) : if atomname in donors [ residuename ] : return 1 return None
Returns 1 if the atom can be a hydrogen donor
Returns 1 if the atom can be a hydrogen donor
"""Returns 1 if the atom can be a hydrogen donor""" # # Backbone # # # Other residues #
self
atom