Dear Lars,
On Tue, Oct 18, 2011 at 1:09 PM, Lars Ridder <[email protected]> wrote:
> Hi,
> A reaction that splits a molecule, [O:1][C:2]>>[O:1].[C:2] could be applied
> without problem on a linear molecule, i.e. CCOCCC
> This yields [CCCO,CC],[CCO,CCC] as expected.
>
> However the same reaction gives strange results when applied on a ring:
> C1COCCC1
> I'd expect this to yield CCCCCO, but the actual result is:
> [CCCCO,CCCCC],[CCCCO,CCCCC]
>
> A bug?
I admit that it's not the most intuitive behavior, but it is expected
(i.e. it's what the code is intended to do). Let me (try and) explain
what's happening.
Within the RDKit the reaction described by this reaction smarts
"[O:1][C:2]>>[O:1].[C:2]" does not mean "find a bond between an O and
a C and break it" -- this would lead to the behavior you expect --
instead it means: "find an O connected to a C. Start a new molecule
from from the O and everything connected to it. Start another new
molecule from the C and everything connected to it." The C doesn't end
up in the first molecule and the O doesn't end up in the second one.
There is not currently a way to express the transformation "find a
bond between an O and a C and break it" as a reaction in the RDKit.
-greg
>
> Here is my code:
>
> from rdkit import Chem
> from rdkit.Chem import AllChem
>
> # mol=Chem.MolFromSmiles('CCOCCC')
> mol=Chem.MolFromSmiles('C1COCCC1')
> reaction=AllChem.ReactionFromSmarts('[O:1][C:2]>>[O:1].[C:2]')
> products=reaction.RunReactants((mol,))
> for x in range(len(products)):
> for y in range(len(products[x])):
> print Chem.MolToSmiles(products[x][y])
>
>
>
> Best regards,
> Lars
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss