Awesome, thanks for the tip! Connor, that also is a great idea, I didn't know about atom-mapped SMILES strings. That would definitely be a good method if the indexing algorithm changes across rdkit versions.
Thanks! -- Peter On Tue, Oct 2, 2018 at 2:56 PM Nils Weskamp <nils.wesk...@gmail.com> wrote: > 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