I had a pretty busy week. Thank you for your answer, and forgive my delay.
Thank you for your answer; it actually help to partially tackle the
problem: there was a problem in the SMARTS I wrote (even if I cannot
"see" it)

Since it is possible to transform groups for tautomers, it should be
possible to do the same thing for resonant radicals. (from the
"computer" point of view I am simply transforming a group into another
to prevent name collision)

Here comes the question: is it "normal" that in the transformation
code I cannot specify either the explicit H atoms? Where should

If I try with vinoxy radical C=C[O] and apply the following transformation

TRANSFORM [C:1](-[OH0:2])(=[CH2:3]) >> [C:1](=[OH0:2])(-[CH2:3])

c:\Tests>obabel -:C=C[O] -h --mesomers -osmi
CC=[O]
(wrong #of H on the "left" carbon)

Same problem if I try the "opposite" transformation (from keto to enol):

TRANSFORM [C:1](=[OH0:2])(-[CH2:3]) >> [C:1](-[OH0:2])(=[CH2:3])

c:\Tests>obabel -:[CH2]C=O -h --mesomers -osmi
[CH2]=CO
(wrong #of H on the oxygen)

Note that the transformation actually occurred: the single and double
bond swap. I tryied to understand what is going on debugging the code
(and I report here what I found because it might help some of the
programmers)
As you can imagine, I just scratched the surface. Still, I quite don't
understand the following:

The struct Pattern contains a boolean variable named hasExplicitH.
which effects the behaviour of the Match function.
This one, a part during allocation, is changed only on row 1509 of
function OBSmartsPattern::SMARTSParser in parsmart.cpp.
In particular is set to true only if somewere in the string a  "[H]" is found.
I cannot understand why. Any hint? it seems to me, that [CH2] in
smarts means "an aliphatic C with 2 H attached " and that those 2 H
should be explicit.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to