I want to evaluate the effectiveness of Open Babel's substructure screen 
fingerprint.

More specifically, I have a query benchmark where the queries are SMILES 
strings for molecules (not SMARTS patterns - they come from, for example, 
Marvin or another structure editor), and for the target I have a set of SMILES 
derived from the ChEMBL data set.

I want to use the molecule as a query, and find all matches, then generate the 
fingerprint for the query and the targets and do a substructure screen. Then I 
can compare the screen count to the actual count.

I'm stuck on the first part; using an input molecule as a substructure query. 
My code is something like the following:

======
import pybel
ob = pybel.ob

target_pybmol = pybel.readstring("smi", "c1ccccc1C")
target_mol = target_pybmol.OBMol


query_pybmol = pybel.readstring("smi", "CC")

query_mol = query_pybmol.OBMol
compiled_query = ob.CompileMoleculeQuery(query_mol)
mapper = ob.OBIsomorphismMapper.GetInstance(compiled_query)
isomorph = ob.vpairUIntUInt()

mapper.MapFirst(target_mol, isomorph)

print list(isomorph)
======

The problem is, this doesn't report any matches. I think that's because the 
"CC" in the query doesn't exactly match the "c-C" in the target - the ring 
carbon aromaticity gets in the way.

Is there any way I can ask Open Babel to generate a query which only considers 
the atom element number, and not the aromaticity? Better yet, if it considers 
the atom element number, and if the query charge != 0 then also considers the 
charge?

Or I am I going about this in the wrong way?

Cheers,

                                Andrew
                                da...@dalkescientific.com



------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to