limit a rule only to the end group

User 6e47cbf906

05-06-2008 08:50:49

We prefer to R-SO-OH and R-O-SO-OH if SO2 is the end group;


R1-S(=O)(=O)-R2 if SO2 is NOT the end group.


The following rule not work for above purpose,


"[O:3]=([C,N,O,F,Cl,Br,I:4])=[O:2]>>[O:3]=([C,N,O,F,Cl,Br,I:4])[O-:2]"


How to limit the rule to end groups only or Would you suggest other tranformation rules? Thank you

ChemAxon d76e6e95eb

05-06-2008 14:58:51

Please upload two examples as images. One with the current transformation that is wrong, and one with the desired one.

User 6e47cbf906

05-06-2008 16:31:15

image attached.


Two cases (up and down).


Structure on the right is with expected form (red box)


to its case. Thank you

ChemAxon d76e6e95eb

11-06-2008 15:12:09

Try this:


[C,N,O,F,Cl,Br,I:4][S;!$(S[OH]),!$(S[O-]):1](=[O:3])=[O:2]>>[O-:2]([C,N,O,F,Cl,Br,I:4])=[O:3]





It contains an additional recursive SMARTS part specifying, that the sulfur atom is not connected to OH or O-.