def worker(self, entry, pdbid): import lemon smallm = lemon.select_small_molecules(entry, lemon.small_molecule_types, 10) # Pruning phase lemon.prune_identical_residues(entry, smallm) lemon.prune_cofactors(entry, smallm, lemon.common_cofactors) lemon.prune_cofactors(entry, smallm, lemon.common_fatty_acids) # Output phase return pdbid + lemon.count_print_residue_names(entry, smallm)
def worker(self, entry, pdbid): import lemon wat_name = set() wat_name.add(lemon.ResidueName("HOH")) hemegs = lemon.select_specific_residues(entry, wat_name) smallm = lemon.select_small_molecules(entry, lemon.small_molecule_types, 10) # Pruning phase smallm = lemon.prune_identical_residues(entry, smallm) smallm = lemon.prune_cofactors(entry, smallm, lemon.common_cofactors) smallm = lemon.prune_cofactors(entry, smallm, lemon.common_fatty_acids) smallm = lemon.keep_interactions(entry, smallm, hemegs, 6.0) # Output phase return pdbid + lemon.count_print_residue_names(entry, smallm) + '\n'
def worker(self, entry, pdbid): import lemon heme_names = lemon.ResidueNameSet() heme_names.append(lemon.ResidueName("HEM")) heme_names.append(lemon.ResidueName("HEA")) heme_names.append(lemon.ResidueName("HEB")) heme_names.append(lemon.ResidueName("HEC")) hemegs = lemon.select_specific_residues(entry, heme_names) smallm = lemon.select_small_molecules(entry, lemon.small_molecule_types, 10) # Pruning phase lemon.prune_identical_residues(entry, smallm) lemon.prune_cofactors(entry, smallm, lemon.common_cofactors) lemon.prune_cofactors(entry, smallm, lemon.common_fatty_acids) lemon.keep_interactions(entry, smallm, hemegs, 6.0) # Output phase return pdbid + lemon.count_print_residue_names(entry, smallm) + '\n'
def worker(self, entry, pdbid): import lemon # Selection phase smallm = lemon.select_small_molecules(entry, lemon.small_molecule_types, 10) if (len(smallm) == 0): return "" # Pruning phase lemon.prune_identical_residues(entry, smallm) lemon.prune_cofactors(entry, smallm, lemon.common_cofactors) lemon.prune_cofactors(entry, smallm, lemon.common_fatty_acids) # Output phase prot = lemon.ResidueIDs() residues = entry.topology().residues() for resid in range(0, len(residues)): prot.append(resid) result = "" for smallm_id in smallm: lig_copy = lemon.ResidueIDs() lig_copy.append(smallm_id) # Hack to remove self prot_copy = lemon.ResidueIDs(prot) lemon.remove_interactions(entry, prot_copy, lig_copy, 0.001) vscore = lemon.vina_score(entry, smallm_id, prot_copy, 8.0) result += pdbid + "\t" result += residues[smallm_id].name() + "\t" result += str(vscore.g1) + "\t" result += str(vscore.g2) + "\t" result += str(vscore.hydrogen) + "\t" result += str(vscore.hydrophobic) + "\t" result += str(vscore.rep) + "\n" return result