On May 8, 2014, at 5:02 PM, Craig James wrote: >> 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? > > Replace every occurance of "c" or "C" with "[#6]". Inside brackets, same > deal, e.g. replace [C@H] with [#6@H]. It's a little trickier with aromatic > nitrogen, e.g. if you replace [nH] with [#7H], it won't match as a > substructure if there's a non-H substituent, so you have to erase the H too.
If I understand correctly, you're suggesting that I turn the SMILES into a SMARTS query. That's something I can surely do, though it's not a solution for the faint at heart. My thought was that the ob.CompileMoleculeQuery / ob.OBIsomorphismMapper.GetInstance was to make this sort of matching easier. 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