Example #1
0
    def __init__(self, protein=None, n_jobs=-1):
        """NNScore implementation [1]_. Based on Binana descriptors [2]_ and
        an ensemble of 20 best scored nerual networks with a hidden layer of
        5 nodes. The NNScore predicts binding affinity (pKi/d).

        Parameters
        ----------
        protein : oddt.toolkit.Molecule object
            Receptor for the scored ligands

        n_jobs: int (default=-1)
            Number of cores to use for scoring and training. By default (-1)
            all cores are allocated.

        References
        ----------
        .. [1] Durrant JD, McCammon JA. NNScore 2.0: a neural-network
            receptor-ligand scoring function. J Chem Inf Model. 2011;51:
            2897-2903. doi:10.1021/ci2003889

        .. [2] Durrant JD, McCammon JA. BINANA: a novel algorithm for
            ligand-binding characterization. J Mol Graph Model. 2011;29:
            888-893. doi:10.1016/j.jmgm.2011.01.004
        """
        self.protein = protein
        self.n_jobs = n_jobs
        model = None
        decsriptors = binana_descriptor(protein)
        super(nnscore, self).__init__(model, decsriptors,
                                      score_title='nnscore')
Example #2
0
 def __init__(self, protein=None, n_jobs=-1):
     self.protein = protein
     self.n_jobs = n_jobs
     model = None
     decsriptors = binana_descriptor(protein)
     super(nnscore, self).__init__(model,
                                   decsriptors,
                                   score_title='nnscore')
Example #3
0
def featurise(protein_file, ligand_file):
    """Compute BINANA features for a protein and a ligand and return the results as a dictionary.

    Args:
        protein_file (str): Name of the .pdb file containing the protein.
        ligand_file (str): Name of the .sdf file containing the ligand.

    Returns:
        result (dict): A dictionary containing the BINANA features for the protein-ligand complex.
    """

    protein = next(ob.readfile('pdb', protein_file))
    protein.protein = True  # DO NOT SKIP THIS or you will be a sad panda
    ligand = next(ob.readfile('sdf', ligand_file))

    # Build BINANA features
    binana_engine = binana.binana_descriptor(protein)
    result = {
        name: value
        for name, value in zip(binana_engine.titles,
                               binana_engine.build([ligand])[0])
    }
    return result
Example #4
0
 def __init__(self, protein = None, n_jobs = -1, **kwargs):
     self.protein = protein
     self.n_jobs = n_jobs
     model = None
     decsriptors = binana_descriptor(protein)
     super(nnscore,self).__init__(model, decsriptors, score_title='nnscore')