Hey Guys,
 
I'm new to this forum and also new to python/rdkit, so I hope you'll be indulgent.
 
I wanna make a TanimotoSimilarity Comparison with compound-smiles that were put into a scaffolding form, e.g. 
'CC1C(CC2CC3CCCCC3C2)CCC2CCCCC21' 
So these scaffolds are stored in a DataFrame and I want to compare them one by one to find out if there are any outliers for a QSAR Model I'm feeding my compounds into.

 
My code looks like this (copied it mostly from the RDkit doc):
 
from rdkit import Chem, DataStructs, RDConfig
from rdkit.Chem import AllChem
from rdkit.Chem.Pharm2D import Gobbi_Pharm2D, Generate
 
ref = Chem.MolFromSmiles(df4.scaff[0])

mol1 = Chem.MolFromSmiles(df4.scaff[0])
mol1 = AllChem.AssignBondOrdersFromTemplate(ref, mol1)
mol2 = Chem.MolFromSmiles(df4.scaff[1])
mol2 = AllChem.AssignBondOrdersFromTemplate(ref, mol2)
# pharmacophore fingerprint
factory = Gobbi_Pharm2D.factory
fp1 = Generate.Gen2DFingerprint(mol1, factory, dMat=Chem.Get3DDistanceMatrix(mol1))
fp2 = Generate.Gen2DFingerprint(mol2, factory, dMat=Chem.Get3DDistanceMatrix(mol2))
# Tanimoto similarity
tani = DataStructs.TanimotoSimilarity(fp1, fp2)
print(tani)
 
But it doesn't work :( What do I need a reference for? So either I get a
ValueError: No matching found 
Or, i get pass that, I get a
ValueError: Bad Conformer Id
 
Can anybody help me? Thanks in Advance!
 
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to