Protool/flags.py
def is_hbond_acceptor(self,atom):
        """Returns 1 if the atom can be a hydrogen acceptor"""
        atomname=atom.split(':')[-1]
        residuename=self.resname(atom)
        acceptors={'ASP':['OD1','OD2'],
                   'GLU':['OE1','OE2'],
                   'SER':['OG'],
                   'THR':['OG1'],
                   'TYR':['OH'],
                   'HIS':['ND1','NE2'],
                   'ASN':['OD1'],
                   'GLN':['OE1']}
        #
        # Backbone
        #
        if self.is_mainchain(atom) and atomname=='O':
            return 1
        if self.is_mainchain(atom) and atomname=='N' and residuename=='PRO':
            return 1
        #
        # Other residues
        #
        if acceptors.has_key(residuename):
            if atomname in acceptors[residuename]:
                return 1
        return None
Returns 1 if the atom can be a hydrogen acceptor
Returns 1 if the atom can be a hydrogen acceptor
Returns 1 if the atom can be a hydrogen acceptor
def is_hbond_acceptor(self,atom):
        atomname=atom.split(':')[-1]
        residuename=self.resname(atom)
        acceptors={'ASP':['OD1','OD2'],
                   'GLU':['OE1','OE2'],
                   'SER':['OG'],
                   'THR':['OG1'],
                   'TYR':['OH'],
                   'HIS':['ND1','NE2'],
                   'ASN':['OD1'],
                   'GLN':['OE1']}
         Backbone
        if self.is_mainchain(atom) and atomname=='O':
            return 1
        if self.is_mainchain(atom) and atomname=='N' and residuename=='PRO':
            return 1
         Other residues
        if acceptors.has_key(residuename):
            if atomname in acceptors[residuename]:
                return 1
        return None
def is_hbond_acceptor ( self , atom ) : atomname = atom . split ( ':' ) [ - 1 ] residuename = self . resname ( atom ) acceptors = { 'ASP' : [ 'OD1' , 'OD2' ] , 'GLU' : [ 'OE1' , 'OE2' ] , 'SER' : [ 'OG' ] , 'THR' : [ 'OG1' ] , 'TYR' : [ 'OH' ] , 'HIS' : [ 'ND1' , 'NE2' ] , 'ASN' : [ 'OD1' ] , 'GLN' : [ 'OE1' ] } if self . is_mainchain ( atom ) and atomname == 'O' : return 1 if self . is_mainchain ( atom ) and atomname == 'N' and residuename == 'PRO' : return 1 if acceptors . has_key ( residuename ) : if atomname in acceptors [ residuename ] : return 1 return None
Returns 1 if the atom can be a hydrogen acceptor
Returns 1 if the atom can be a hydrogen acceptor
"""Returns 1 if the atom can be a hydrogen acceptor""" # # Backbone # # # Other residues #
self
atom