Hi Toby,

I can reproduce this behavior and agree that it looks like a bug.

I'll take a look.

-greg



On Mon, Mar 31, 2014 at 12:49 PM, Toby Wright <[email protected]>wrote:

> Further investigation shows that this issue is not related to the reaction
> code at all, it's a general SMILES canonicalisation bug I'm afraid.
> Consider the following:
>
> > mol = Chem.MolFromSmiles("C1C[C@@H](CC)CC[C@@H](CC)1")
> > print Chem.MolToSmiles(mol, isomericSmiles=True)
> CC[C@@H]1CC[C@@H](CC)CC1
>
> The output should be the same as the input but plugging those strings into
> the daylight website's depiction tool gives chirally different molecules.
> This behaviour is observed in RDKit 2013.09 with no custom patches.
>
> Yours,
>
> Toby Wright
>
> --
> InhibOx Ltd
>
>
>
> On 28 March 2014 15:47, Toby Wright <[email protected]> wrote:
>
>> Oops, forgot to mention: This is with the solution to github issue 
>> #233<https://github.com/rdkit/rdkit/issues/233>patched into my RDKit build.
>>
>> Yours,
>>
>> Toby Wright
>>
>> --
>> InhibOx Ltd
>>
>>
>> On 28 March 2014 15:43, Toby Wright <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I believe I've found a bug in the new code that deals with reactions
>>> that have chirality specified for untagged product atoms. Consider the
>>> following:
>>>
>>> > rxn = AllChem.ReactionFromSmarts("[C:1].[C:2]>>C1C[C@@H](C[C:1])CC[C@
>>> @H](C[C:2])1")
>>> > m1 = Chem.MolFromSmiles('FC')
>>> > m2 = Chem.MolFromSmiles('BrC')
>>> > p = rxn.RunReactants((m1,m2))[0][0]
>>> > Chem.SanitizeMol(p)
>>> rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE
>>> > Chem.MolToSmiles(p, isomericSmiles=True)
>>> 'FCC[C@@H]1CC[C@@H](CCBr)CC1'
>>>
>>> The output looks about right, the [C@@H]s are both still [C@@H] but
>>> whereas before they were both being approached from around the ring now the
>>> canonicalisation has us approaching one from outside the ring. Both
>>> extensions from the ring should be towards and if I convert the product
>>> part of the above reaction to a png I get:
>>> [image: Inline images 1]
>>> but in the output one is towards and the other is away:
>>> [image: Inline images 2]
>>>
>>> Note that I can work around this, if I specify my reaction as
>>> [C:1].[C:2]>>[C:1]C[C@H]1CC[C@@H](C[C:2])CC1 thus apeing the atom
>>> ordering of the product RDKit will give me I get the chirality I want, at
>>> least in my test cases so far.
>>>
>>> Yours,
>>>
>>> Toby Wright
>>>
>>> --
>>> InhibOx Ltd
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>

<<inline: MadeProduct.png>>

<<inline: ReactionProduct.png>>

------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to