Re: [Open Babel] SMARTS with optional branches

2009-11-17 Thread Andreas Maunz
Craig, Craig A. James wrote on 11/17/2009 04:47 PM: > One last thing to beware of. The recursive match is truly recursive, > which means that only the "head" atom of the recursive expression is > marked as "used" once the recursion finishes. For example, the smarts > "C[$(CO)]O" would match the

Re: [Open Babel] SMARTS with optional branches

2009-11-17 Thread Andreas Maunz
Hello Craig, Craig A. James wrote on 11/16/2009 06:12 PM: > You may be able to do this using recursive SMARTS. In a recursive > SMARTS, an atom expression can itself be a whole SMARTS, ad infinitum. > And since an atom can be an OR list of alternatives, you can have an > atom that is "This OR th

Re: [Open Babel] SMARTS with optional branches

2009-11-16 Thread Andreas Maunz
the position where the branch to "O" is attached mandatory ("P-"), but not the part after the branch Rajarshi Guha wrote on 11/16/2009 03:10 PM: > On Mon, Nov 16, 2009 at 8:52 AM, Andrew Dalke > wrote: > >> On Nov 16, 2009, at 1:46 PM, Andreas Maunz w

[Open Babel] SMARTS with optional branches

2009-11-16 Thread Andreas Maunz
Hi list, this is strictly speaking not an OB question: How can I match a SMARTS pattern with optional branch? Example: My compound is "C-C(-O)=C-C". The SMARTS expressions are s1="[#6]-[#6](-[#8])=[#6]" matches, as well as s2="[#6]-[#6]=[#6]". Since s2 is contained in s1 in terms of subgraphs, I w