Dear Mikolaj,

On May 16, 2013, at 9:37 PM, Mikolaj Kowalik <[email protected]> wrote:

> Hi all,
> 
> I have came across quite puzzling (at least for me) RDKit's behavior while
> using SMILES with specified tetrahedral stereocenters.
> 
> Converting following SMILES 'F[C@H]1CCNSC1' seem to result in assignment of
> the incorrect chiral tag to the tetrahedral stereocenter.
> 
>    m = Chem.MolFromSmiles('F[C@H]1CCNSC1')
>    for a in m.GetAtoms():
>        print a.GetIdx(), a.GetSymbol(), a.GetChiralTag()
> 
>    0 F CHI_UNSPECIFIED
>    1 C CHI_TETRAHEDRAL_CW
>    2 C CHI_UNSPECIFIED
>    3 C CHI_UNSPECIFIED
>    4 N CHI_UNSPECIFIED
>    5 S CHI_UNSPECIFIED
>    6 C CHI_UNSPECIFIED
> 
> Although the molecule still gives back the correct SMILES.
> 
>    print Chem.MolToSmiles(m, isomericSmiles=True)
> 
>    F[C@H]1CCNSC1
> 
> Problem seems to vanish if I use non-canonical version the original
> input SMILES, e.g.: 
> 
>    m = Chem.MolFromSmiles('N1CC[C@H](F)CS1')
>    for a in m.GetAtoms():
>        print a.GetIdx(), a.GetSymbol(), a.GetChiralTag()
> 
>    0 N CHI_UNSPECIFIED
>    1 C CHI_UNSPECIFIED
>    2 C CHI_UNSPECIFIED
>    3 C CHI_TETRAHEDRAL_CCW
>    4 F CHI_UNSPECIFIED
>    5 C CHI_UNSPECIFIED
>    6 S CHI_UNSPECIFIED
> 
>    print Chem.MolToSmiles(m, isomericSmiles=True)
> 
>    F[C@H]1CCNSC1
> 
> Am I missing something obvious? If yes, I will be grateful for any pointers.

The chiral flags you are seeing there can not be interpreted without knowing 
the ordering of the bonds around the atom. They are really for internal use.

If you want the absolute stereochemistry, you need to do something like this:
In [38]:
m.GetAtomWithIdx(1).GetProp('_CIPCode')
Out[38]:
'S'
Hope this helps,
> 

-greg
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to