Hi Greg, Thank you, I can reproduce your example, and my own case works fine now... Best, Michal
On Mon, 25 Feb 2019 at 14:26, Greg Landrum <greg.land...@gmail.com> wrote: > Hi Michal, > > Which version of the RDKit are you using? This should already be working. > Here's an example demonstrating that: > > In [16]: m = Chem.AddHs(Chem.MolFromSmiles('c1ccccc1.N')) > > In [17]: AllChem.EmbedMolecule(m) > Out[17]: 0 > > In [18]: fs = Chem.GetMolFrags(m,asMols=True) > > In [19]: print(Chem.MolToMolBlock(fs[0])) > > RDKit 3D > > 12 12 0 0 0 0 0 0 0 0999 V2000 > 0.7943 -1.1490 0.0150 C 0 0 0 0 0 0 0 0 0 0 0 0 > 1.3607 0.1298 -0.0022 C 0 0 0 0 0 0 0 0 0 0 0 0 > 0.5898 1.2681 -0.0170 C 0 0 0 0 0 0 0 0 0 0 0 0 > -0.7866 1.1450 -0.0149 C 0 0 0 0 0 0 0 0 0 0 0 0 > -1.3413 -0.1124 0.0019 C 0 0 0 0 0 0 0 0 0 0 0 0 > -0.5806 -1.2656 0.0170 C 0 0 0 0 0 0 0 0 0 0 0 0 > 1.4026 -2.0428 0.0267 H 0 0 0 0 0 0 0 0 0 0 0 0 > 2.4183 0.2113 -0.0036 H 0 0 0 0 0 0 0 0 0 0 0 0 > 1.0075 2.2686 -0.0304 H 0 0 0 0 0 0 0 0 0 0 0 0 > -1.4182 2.0293 -0.0265 H 0 0 0 0 0 0 0 0 0 0 0 0 > -2.4222 -0.2172 0.0037 H 0 0 0 0 0 0 0 0 0 0 0 0 > -1.0241 -2.2652 0.0304 H 0 0 0 0 0 0 0 0 0 0 0 0 > 1 2 2 0 > 2 3 1 0 > 3 4 2 0 > 4 5 1 0 > 5 6 2 0 > 6 1 1 0 > 1 7 1 0 > 2 8 1 0 > 3 9 1 0 > 4 10 1 0 > 5 11 1 0 > 6 12 1 0 > M END > > > In [20]: print(Chem.MolToMolBlock(fs[1])) > > RDKit 3D > > 4 3 0 0 0 0 0 0 0 0999 V2000 > -0.0066 -0.0099 0.2620 N 0 0 0 0 0 0 0 0 0 0 0 0 > -0.4136 0.8845 -0.0859 H 0 0 0 0 0 0 0 0 0 0 0 0 > -0.5574 -0.8197 -0.0901 H 0 0 0 0 0 0 0 0 0 0 0 0 > 0.9775 -0.0549 -0.0860 H 0 0 0 0 0 0 0 0 0 0 0 0 > 1 2 1 0 > 1 3 1 0 > 1 4 1 0 > M END > > > In [21]: print(Chem.MolToMolBlock(m)) > > RDKit 3D > > 16 15 0 0 0 0 0 0 0 0999 V2000 > 0.7943 -1.1490 0.0150 C 0 0 0 0 0 0 0 0 0 0 0 0 > 1.3607 0.1298 -0.0022 C 0 0 0 0 0 0 0 0 0 0 0 0 > 0.5898 1.2681 -0.0170 C 0 0 0 0 0 0 0 0 0 0 0 0 > -0.7866 1.1450 -0.0149 C 0 0 0 0 0 0 0 0 0 0 0 0 > -1.3413 -0.1124 0.0019 C 0 0 0 0 0 0 0 0 0 0 0 0 > -0.5806 -1.2656 0.0170 C 0 0 0 0 0 0 0 0 0 0 0 0 > -0.0066 -0.0099 0.2620 N 0 0 0 0 0 0 0 0 0 0 0 0 > 1.4026 -2.0428 0.0267 H 0 0 0 0 0 0 0 0 0 0 0 0 > 2.4183 0.2113 -0.0036 H 0 0 0 0 0 0 0 0 0 0 0 0 > 1.0075 2.2686 -0.0304 H 0 0 0 0 0 0 0 0 0 0 0 0 > -1.4182 2.0293 -0.0265 H 0 0 0 0 0 0 0 0 0 0 0 0 > -2.4222 -0.2172 0.0037 H 0 0 0 0 0 0 0 0 0 0 0 0 > -1.0241 -2.2652 0.0304 H 0 0 0 0 0 0 0 0 0 0 0 0 > -0.4136 0.8845 -0.0859 H 0 0 0 0 0 0 0 0 0 0 0 0 > -0.5574 -0.8197 -0.0901 H 0 0 0 0 0 0 0 0 0 0 0 0 > 0.9775 -0.0549 -0.0860 H 0 0 0 0 0 0 0 0 0 0 0 0 > 1 2 2 0 > 2 3 1 0 > 3 4 2 0 > 4 5 1 0 > 5 6 2 0 > 6 1 1 0 > 1 8 1 0 > 2 9 1 0 > 3 10 1 0 > 4 11 1 0 > 5 12 1 0 > 6 13 1 0 > 7 14 1 0 > 7 15 1 0 > 7 16 1 0 > M END > > > > Best, > -greg > > > On Mon, Feb 25, 2019 at 5:54 AM Michal Krompiec <michal.kromp...@gmail.com> > wrote: > >> Hello, >> Let mol be a molecule with a conformer with 3D coordinates, consisting of >> 2 fragments. Chem.GetMolFrags(mol, asMols=true) returns these fragments as >> Molecule objects, but the 3D coordinates are lost. Is there any way to >> preserve them? >> Best, >> Michal >> _______________________________________________ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss