Hi,

If you really want to rely on the order of atom you can renumber them
anyhow you like with Chem.RenumberAtoms()
http://rdkit.org/Python_Docs/rdkit.Chem.rdmolops-module.html#RenumberAtoms
There is also a function which returns canonical order of atoms for
you: Chem.CanonicalRankAtoms() As I remember correctly the order may differ
from the canonical smiles, although that might have changed.

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2017-06-15 9:03 GMT+02:00 Brian Kelley <fustiga...@gmail.com>:

> Yes, atoms are always added in file order.  It would take a major change
> in rdkit to change/violate this.
>
> ----
> Brian Kelley
>
> > On Jun 15, 2017, at 7:52 AM, Francois BERENGER <
> beren...@bioreg.kyushu-u.ac.jp> wrote:
> >
> > Hello,
> >
> > If I read a molecule from a .sdf file, will the atom indexes be
> conserved/preserved?
> >
> > 1st atom in the file will have index 0,
> > 2nd index 1, etc.
> >
> > And, will this always hold in the future?
> > Is this an invariant of rdkit?
> >
> > Thanks,
> > F.
> >
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to