Thank you for the very clear and informative response!
Sent from Mail for Windows 10
From: Greg Landrum
Sent: Wednesday, July 29, 2020 11:32 PM
To: Sean Stromberg
Cc: dmaziuk via Rdkit-discuss
Subject: Re: [Rdkit-discuss] PandasTools.WriteSDF Chirality Bits
Hi Sean,
What you're describing sounds like a bug in DataWarrior.
The chirality bit conveys information that cannot be conveyed in standard
SMILES.
The "official" definition (according to the "Biovia chemical representation
guide") is:
If the bit is set it means that the structure is a single stereoisomer where
the absolute stereochemistry is known. If the bit is not set then the relative
stereochemistry of specified centers is known, the structure is either a single
diastereomer or a mixture of two stereiosomers (if there's only stereocenter
then it's a mixture of enantiomers).
However, different people/pieces of code interpret the flag differently, so
YMMV there.
This information is all much more explicitly and flexibly expressed using
enhanced stereo in V3000 mol files, but that option is not available to
everyone.
To answer your question, if you want to set the chirality bit in the output,
you just need to set the property "_MolFileChiralFlag" on the molecule. Here's
an example:
In [7]: m = Chem.MolFromSmiles('C[C@H](F)Cl')
In [8]: print(Chem.MolToMolBlock(m))
RDKit 2D
4 3 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.2990 0.7500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.5981 -0.0000 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0
1.2990 2.2500 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0
2 1 1 1
2 3 1 0
2 4 1 0
M END
In [9]: m.SetProp("_MolFileChiralFlag","1")
In [10]: print(Chem.MolToMolBlock(m))
RDKit 2D
4 3 0 0 1 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.2990 0.7500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.5981 -0.0000 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0
1.2990 2.2500 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0
2 1 1 1
2 3 1 0
2 4 1 0
M END
If you set this property for each molecule in your dataframe that has a chiral
center, then you'll end up with the chiral flag set in the output SDF.
best,
-greg
On Wed, Jul 29, 2020 at 10:02 PM Sean Stromberg
<[email protected]> wrote:
Hello,
I’m using PandasTools.WriteSDF to generate an SDF from smiles strings. The
smiles strings have stereochemistry specified, and the bond tables in the SDF
have the correct bond orientations, but the chirality bits aren’t set. When I
open these SDFs in DataWarrior the bond angle information is ignored because
the chirality bits aren’t set. I wrote a script to parse the text file and turn
on the chirality bits to solve this and it works fine, but I’m wondering if
there is some way to get WriteSDF to set the chirality bit for me.
Thanks for any help!
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss