I agree that this is a bug.
Here's a simpler reproducible:
In [11]: Chem.CanonSmiles("C[S@](Cl)=O")
Out[11]: 'C[S@@](=O)Cl'
In [12]: Chem.CanonSmiles("C[S@]2=O.Cl2")
Out[12]: 'C[S@](=O)Cl'
Note that it seems to have something to do with the special handling of the
S=O, because this looks fine:
In [8]: Chem.CanonSmiles("C[C@](F)(Cl)O")
Out[8]: 'C[C@](O)(F)Cl'
In [9]: Chem.CanonSmiles("C[C@]1(Cl)O.F1")
Out[9]: 'C[C@](O)(F)Cl'
I'll file the bug report and take a look.
-greg
On Tue, Feb 9, 2016 at 4:12 AM, Andrew Dalke <[email protected]>
wrote:
>
> Interestingly, I see that two different RDKit versions give two different
> answers. Which is correct?
>
> == most recent version appears to swap the chirality ==
>
> >>> import rdkit
> >>> rdkit.__version__
> '2016.03.1.dev1'
> >>> Chem.CanonSmiles("CN[S@](c1ccccc1)=O")
> 'CN[S@@](=O)c1ccccc1'
> >>> Chem.CanonSmiles("CN[S@]2=O.c12ccccc1")
> 'CN[S@](=O)c1ccccc1'
>
> == older version gives the answer I expect ==
>
> >>> import rdkit
> >>> rdkit.__version__
> '2015.09.1.dev1'
> >>> Chem.CanonSmiles("CN[S@](c1ccccc1)=O")
> 'CN[S@@](=O)c1ccccc1'
> >>> Chem.CanonSmiles("CN[S@]2=O.c12ccccc1")
> 'CN[S@@](=O)c1ccccc1'
>
> I think the older version is correct because the SMILES chirality depends
> on the bond ordering, not the lexical position.
>
>
> I don't see anything in the milestone:2016_03_1 issues related to this
> specific item, so I wonder if this change was deliberate.
>
>
>
> Andrew
> [email protected]
>
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss