Re: [Rdkit-discuss] chirality flag
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Greg L. <gre...@gm...> - 2013-07-09 03:46:10
|
yeah. There you can/should set the flag using an unsigned int. On Tue, Jul 9, 2013 at 5:44 AM, Igor Filippov <igo...@gm...>wrote: > Great - thank you! > This will work the same way from C++, correct? > > Igor > > > On Mon, Jul 8, 2013 at 11:42 PM, Greg Landrum <gre...@gm...>wrote: > >> Ok, it's checked in: >> In [2]: m = Chem.MolFromSmiles('C[C@H](F)Cl') >> >> In [3]: print Chem.MolToMolBlock(m) >> >> RDKit >> >> 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 >> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 0.0000 0.0000 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0 >> 0.0000 0.0000 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0 >> 1 2 1 0 >> 2 3 1 0 >> 2 4 1 0 >> M END >> >> In [5]: m.SetProp("_MolFileChiralFlag","1") >> >> In [6]: print Chem.MolToMolBlock(m) >> >> RDKit >> >> 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 >> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 0.0000 0.0000 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0 >> 0.0000 0.0000 0.0000 Cl 0 0 0 0 0 0 0 0 0 0 0 0 >> 1 2 1 0 >> 2 3 1 0 >> 2 4 1 0 >> M END >> >> The same flag will be set if the chiral flag is set when the mol block is >> parsed. >> >> -greg >> >> >> >> On Tue, Jul 9, 2013 at 5:08 AM, Greg Landrum <gre...@gm...>wrote: >> >>> Hi Igor, >>> >>> On Tue, Jul 9, 2013 at 1:23 AM, Igor Filippov <igo...@gm... >>> > wrote: >>> >>>> I noticed that RDKit generated MDL MOL file without the chirality flag >>>> set on the top of the mol >>>> block (there are stereo atoms with wedge and hash bonds present in the >>>> molecule): >>>> >>>> RDKit 2D >>>> >>>> 796808 0 0 0 0 0 0 0 0999 V2000 >>>> >>>> Is there any way to tell MolToMolBlock() to set the chirality flag? >>>> >>>> >>> There currently is no way to do this. I will add support for it (via a >>> molecule property) for the next release. >>> >>> -greg >>> >> >> > |