예제 #1
0
	def get_np( self, s):
		fscore = self.fscore
		m = Chem.MolFromSmiles( s)
		np = npscorer.scoreMol(m,fscore)

		if self.graph: jchem.show_mol( s)
		if self.disp: print('NP Score is', np)
		return np
예제 #2
0
def CalculateNPscore(mol):
    """
    A function to calculate the natural product-likeness score
    --->NPscore
    
    Reference:
        (1) `Ertl Peter (2008)`_.
    
    :param mol: molecular
    :type mol: rdkit.Chem.rdchem.Mol
    :return: product-likeness score
    :rtype: float
    
    .. _Ertl Peter (2008):
        https://pubs.acs.org/doi/abs/10.1021/ci700286x
    
    """
    return round(npscorer.scoreMol(mol, fscore=fscore), 2)
예제 #3
0
def CalculateNPscore(mol):
    """
    ---
    Ref.: Ertl, Peter, Silvio Roggo, and Ansgar Schuffenhauer.
          J Chem Inf Model, 48(1), 68-74.
    
    Based: Https://github.com/rdkit/rdkit/tree/master/Contrib/NP_Score
    
    ---
    Brief: A function to calculate the natural product-likeness score
    
    ---
    Parameters:
        >>> mol: dkit.Chem.rdchem.Mol;
    
    Return:
        float, meant NP score
    """
    filename = os.path.join(ContriDir, 'NP_Score/publicnp.model.gz')
    fscore = npscorer.pickle.load(npscorer.gzip.open(filename))
    return round(npscorer.scoreMol(mol, fscore=fscore), 2)
예제 #4
0
def NP(mol):
    """
    Computes RDKit's Natural Product-likeness score
    """
    return npscorer.scoreMol(mol)
예제 #5
0
def get_rd_mol_NPS(rd_mol):
    return npscorer.scoreMol(rd_mol, get_NPS_model())