Re: [Rdkit-discuss] Are atom and bond indexes deterministic?

2018-10-03 Thread Stephen Roughley via Rdkit-discuss
It looks like it should be deterministic, in that it always loops through the existing non-hydrogen atoms in their internal order, adding H's to each in turn. https://github.com/rdkit/rdkit/blob/ffc123a6659705adae33a6f5bf3913d65aa7b54d/Code/GraphMol/AddHs.cpp Steve On Wed, 3 Oct 2018 at 21:23,

Re: [Rdkit-discuss] Are atom and bond indexes deterministic?

2018-10-03 Thread Dimitri Maziuk via Rdkit-discuss
On 10/03/2018 03:23 PM, Peter St. John wrote: > Ah, well I suppose the follow up question is then does 'AddHs' add > hydrogens in a deterministic fashion? It should, what's not guaranteed is that it will be the right order. Obviously, if (using my previous example) L- and D-alanine is the "same

Re: [Rdkit-discuss] Are atom and bond indexes deterministic?

2018-10-03 Thread Greg Landrum
Yep good point. Though you can opt to keep the Hs if you want, that is not the default behavior. On Wed, 3 Oct 2018 at 17:07, Dmitri Maziuk via Rdkit-discuss < rdkit-discuss@lists.sourceforge.net> wrote: > On Wed, 3 Oct 2018 06:21:06 +0200 > Greg Landrum wrote: > > > The atom ordering in the

Re: [Rdkit-discuss] Are atom and bond indexes deterministic?

2018-10-03 Thread Dmitri Maziuk via Rdkit-discuss
On Wed, 3 Oct 2018 06:21:06 +0200 Greg Landrum wrote: > The atom ordering in the RDKit molecule created from a SMILES or Mol block > will always be the same and will corresponds to the ordering of the atoms > in the input ... provided your molecule has no protons and/or you don't removeH/addH