Hi Pablo, You could loop over the atoms and use SetProp to add a relevant property to each one. That should survive the embedding.
Cheers, Dave On Mon, 29 Mar 2021 at 11:18, Pablo Ramos <pablo.ra...@covestro.com> wrote: > Dear community, > > > > I want to embed a molecule. For my personal application, I really need the > atom indices to be respected, even if they are indistinguishable. > > The problem is that, because of symmetry, some atoms may be > indistinguishable. This is something you can see by using > CanonicalRankAtoms(): > > > > mol = Chem.MolFromSmiles('[H]C([H])=O.[H]N([H])[H]') > > print("canonical rank atoms for mol:", list(Chem.CanonicalRankAtoms(mol, > breakTies=False))) > > à canonical rank atoms for mol: [6, 5, 7, 0, 0, 2, 2, 2] > > > > In the above example we have one group of two identical atoms (labelled as > 0), and another one of three identical atoms (labelled as 2). > > > > Therefore, the mol object created after embedding may have swapped > indistinguishable atoms, losing the track of the initial indexes I had. > > > > Such problem was discussed in the link bellow. Unfortunately, I cannot > find any solution from it more than understanding where my problem comes > from… > > > > Is there, for the new RDKit version, any way to prevent atom labelling > changes when embedding / some available solution to this? > > > > https://github.com/rdkit/rdkit/issues/3219 > > > > Thank you, and have a nice day :) > > > > Best regards, > > > > *Pablo Ramos* > Ph.D. at Covestro Deutschland AG > > > > > > covestro.com <http://www.covestro.com/> > > *Telephone* > > +49 214 6009 7356 > > > > Covestro Deutschland AG > > COVDEAG-Chief Commer-PUR-R&D-EMEA-PMD > > B103, R164 > > 51365 Leverkusen, Germany > > pablo.ra...@covestro.com > > > > > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss