Hi Peter and Nils,

To supplement Nils comment I'd like to add that during writing the Mol
atoms nor bonds order is not changed, but the canonical atom mapping is
saved in molecular property "_smilesAtomOutputOrder". This does not include
bonds though, it shouldn't change, but if you wish to be safe it is best to
save the two atom indices instead the bond idx itself.

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


wt., 2 paź 2018 o 22:57 Nils Weskamp <nils.wesk...@gmail.com> napisał(a):

> Hi Peter,
>
> to the best of my knowledge: for a given SMILES string, you should
> always end up with the same molecule object.
>
> On the other hand, generation of (canonical / unique) SMILES often
> reorders atoms and bonds (to ensure that the SMILES is unique for a
> given structure). A conversion Molecule -> SMILES -> Molecule could thus
> lead to a different ordering of atoms and bonds and you will have to
> canonicalize your structure before you generate your index. [Or make
> sure that you use non-canonical SMILES.]
>
> Best,
> Nils
>
> Am 02.10.2018 um 22:32 schrieb Peter St. John:
> > If I store a molecule as a SMILES string, along with relevant
> > information about different bonds, is it safe to annotate those bond
> > entries by bond index?
> >
> > I.e., if I create a new rdkit Molecule with
> > rdkit.Chem.MolFromSmiles(xxx), will the bond ordering always be the
> > same? If not, does anyone know a a robust way of specifying a bond
> > within a molecule as a string-based representation?
> >
> > Thanks for the help!
> > -- Peter
> >
>
>
> _______________________________________________
> 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

Reply via email to