On Thu, May 8, 2014 at 8:27 AM, Andrew Dalke <da...@dalkescientific.com>wrote:
> 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.
>
Yes. As far as I know, it's the only way to get the correct answer. Your
original question essentially asked, "Is there a way to get OpenBabel to
change the semantics of SMARTS?" One could write such a substructure
matcher, but then it wouldn't be a SMARTS.
Craig
------------------------------------------------------------------------------
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