Hi Rafal, It is not always possible to preserve the atom ordering in the SMILES string because there is an implied bond between contiguous symbols in the SMILES. I think, for example, that the molecule with the SMILES OCCl couldn’t have the order in the molecule object O first, Cl second, C third, with bonds between 1 and 3 and 2 and 3 and get the SMILES in that order.
I hope that made sense. Please ask again if not. Best regards, Dave On Mon, 18 Nov 2019 at 12:33, Rafal Roszak <rmrmg.c...@gmail.com> wrote: > Hi all, > > Is there any way to preserve atom order from Mol object during > exporting to smiles? I tried MolToSmiles with rootedAtAtom=0 and > canonical=False options but it not always prevent oryginal order. > I know I can use _smilesAtomOutputOrder to map old indices to new one > in canonical smiles but maybe we have something more handy? > > Best, > > Rafał > > > _______________________________________________ > 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