[Ling: you should be aware that mail you send to the mailing list from your
yahoo account will often/always end up in the spam folder of gmail users.
Here's an explanation of why:
http://www.pcworld.com/article/2141120/yahoo-email-antispoofing-policy-breaks-mailing-lists.html
]


On Mon, Aug 24, 2015 at 3:29 AM, S.L. Chan <[email protected]> wrote:

> Dear colleagues,
>
> I used Chem.MolFromMolFile to read in an sd file with stereo info on some
> atoms. But the stereo info seems to be lost. Could you spot what I missed?
>
> The input file is attached. On the atom lines, the third column after the
> element name should contain the stereo data. I simply used mol.Debug() to
> dump out the atoms' info.
>

According to the CTAB spec, those parity flags are supposed to be ignored
on reading the file. This is what the RDKit does.

You can assign stereochemistry using the 3D coordinates:

In [16]: m = Chem.MolFromMolFile('r3.sdf')
In [17]: Chem.AssignAtomChiralTagsFromStructure(m)
In [18]: Chem.AssignStereochemistry(m,force=True,cleanIt=True)
In [19]: m.Debug()
Atoms:
0 7 N chg: 1  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
1 6 C chg: 0  deg: 3 exp: 3 imp: 1 hyb: 4 arom?: 0 chi: 2
2 6 C chg: 0  deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 0 chi: 0
3 8 O chg: 0  deg: 1 exp: 2 imp: 0 hyb: 3 arom?: 0 chi: 0
4 6 C chg: 0  deg: 2 exp: 2 imp: 2 hyb: 4 arom?: 0 chi: 0
5 6 C chg: 0  deg: 3 exp: 3 imp: 1 hyb: 4 arom?: 0 chi: 0
6 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
7 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
Bonds:
0 0->1 order: 1 conj?: 0 aromatic?: 0
1 1->2 order: 1 conj?: 0 aromatic?: 0
2 1->4 order: 1 conj?: 0 aromatic?: 0
3 2->3 order: 2 conj?: 0 aromatic?: 0
4 4->5 order: 1 conj?: 0 aromatic?: 0
5 5->6 order: 1 conj?: 0 aromatic?: 0
6 5->7 order: 1 conj?: 0 aromatic?: 0

That second step (line 18) is needed to remove the chiral  specification
that is otherwise added to carbon 5.


If you would like to provide information about stereochemistry in an SDF
without needing to perceive it from the coordinates, you can wedge the
bonds. Here's the example for your molecule:


In [6]: m = Chem.MolFromMolFile('r3.sdf')
In [7]: Chem.AssignAtomChiralTagsFromStructure(m)
In [8]: Chem.AssignStereochemistry(m,force=True,cleanIt=True)
In [9]: from rdkit.Chem import AllChem
In [10]: AllChem.Compute2DCoords(m)
Out[10]: 0
In [11]: print Chem.MolToMolBlock(m)
2tmn
     RDKit          2D

  8  7  0  0  1  0  0  0  0  0999 V2000
   -2.5981   -1.1250    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2990   -0.3750    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2990    1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    1.8750    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000   -1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.2990   -0.3750    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.5981   -1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.2990    1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  2  1  1  6
  2  3  1  0
  2  5  1  0
  3  4  2  0
  5  6  1  0
  6  7  1  0
  6  8  1  0
M  CHG  1   1   1
M  END

I hope this helps,
-greg
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to