Hi,
That carbon is only three-coordinate, so the rdkit is removing the chiral
flag.
If you add the missing H you will get the desired chirality:
[2]>>> Chem.CanonSmiles('O=C1C[C@H](O)[C@@]1S')
[2]: 'O=C1C[C@H](O)[C]1S'
[3]>>> Chem.CanonSmiles('O=C1C[C@H](O)[C@@H]1S')
[3]: 'O=C1C[C@H](O)[C@@H]1S'
-greg
On Tuesday, May 7, 2013, Syeda Sabrina wrote:
> Hi Greg,
>
> At some point of my script I figured out that in the output SMILES of a
> molecule, one desired chirality is missing.
> So,
> Desired SMILES: O=C1C[C@H](O)[C@@]1S
>
> but I was getting,
> Actual SMILES: O=C1C[C@H](O)[C]1S
>
> So I did the following check on that molecule, I tried to check each
> atom's chiral tag in the molecule. Although the chirality information was
> in the atoms, but it did not appear in the smiles. And thus later on, when
> I converted it back into moelcule chiral information one of the atom was
> lost. I thought it might be a bug since it's not a usual case in other
> molecules.
>
> code:
>
> try:
> Chem.SanitizeMol(rdmol)
> for atomIdx, atom in enumerate(rdmol.GetAtoms()):
> print atomIdx, atom.GetAtomicNum(), atom.GetChiralTag(),
> 'before'
> print Chem.MolToSmiles(rdmol, isomericSmiles = True)
> m = Chem.MolFromSmiles(Chem.MolToSmiles(rdmol, isomericSmiles =
> True))
> for atomIdx, atom in enumerate(m.GetAtoms()):
> print atomIdx, atom.GetAtomicNum(), atom.GetChiralTag(),
> 'after'
> except:
>
> Output:
> 0 8 CHI_UNSPECIFIED before
> 1 6 CHI_TETRAHEDRAL_CW before
> 2 6 CHI_UNSPECIFIED before
> 3 6 CHI_UNSPECIFIED before
> 4 8 CHI_UNSPECIFIED before
> 5 6 CHI_TETRAHEDRAL_CCW before
> 6 16 CHI_UNSPECIFIED before
>
> [1OH][2C@H]1[3CH2][4C](=[5O])[6C]1[7SH]
>
> 0 8 CHI_UNSPECIFIED after
> 1 6 CHI_TETRAHEDRAL_CW after
> 2 6 CHI_UNSPECIFIED after
> 3 6 CHI_UNSPECIFIED after
> 4 8 CHI_UNSPECIFIED after
> 5 6 CHI_UNSPECIFIED after
> 6 16 CHI_UNSPECIFIED after
>
> *Thanks,*
> *Syeda Sabrina*
> *Graduate Assistant*
> *Penn State University*
> *University Park, PA*
> *
> *
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss