def hydrophobic_atoms(self, all_atoms):
        """Select all carbon atoms which have only carbons and/or hydrogens as direct neighbors."""
        atom_set = []
        data = namedtuple('hydrophobic', 'atom orig_atom orig_idx')
        atm = [a for a in all_atoms if a.atomicnum == 6 and set([natom.GetAtomicNum() for natom
                                                                 in pybel.ob.OBAtomAtomIter(a.OBAtom)]).issubset(
            {1, 6})]
        for atom in atm:
            orig_idx = self.Mapper.mapid(atom.idx, mtype=self.mtype, bsid=self.bsid)
            orig_atom = self.Mapper.id_to_atom(orig_idx)
            if atom.idx not in self.altconf:
                atom_set.append(data(atom=atom, orig_atom=orig_atom, orig_idx=orig_idx))
        return atom_set
def hydrophobic_atoms ( self , all_atoms ) : atom_set = [ ] data = namedtuple ( 'hydrophobic' , 'atom orig_atom orig_idx' ) atm = [ a for a in all_atoms if a . atomicnum == 6 and set ( [ natom . GetAtomicNum ( ) for natom in pybel . ob . OBAtomAtomIter ( a . OBAtom ) ] ) . issubset ( { 1 , 6 } ) ] for atom in atm : orig_idx = self . Mapper . mapid ( atom . idx , mtype = self . mtype , bsid = self . bsid ) orig_atom = self . Mapper . id_to_atom ( orig_idx ) if atom . idx not in self . altconf : atom_set . append ( data ( atom = atom , orig_atom = orig_atom , orig_idx = orig_idx ) ) return atom_set
Select all carbon atoms which have only carbons and/or hydrogens as direct neighbors.