[Rdkit-discuss] Chem.AddHs() doesn't care about compound layout

2014-08-20 Thread Michał Nowotka
Hello, Imagine I have a compound with some 2D coordinates I really like: mol Now I would like to add hydrogens to it: mol = Chem.AddHs(mol) The problem is, all new hydrogen atoms will have (0,0,0) coordinates, which doesn't look to good... I could force recomputing 2D coords for the

Re: [Rdkit-discuss] Chem.AddHs() doesn't care about compound layout

2014-08-20 Thread Sereina
Dear Michal, Chem.AddHs() has the option “addCoords” which is normally set to False. So, using mol = Chem.AddHs(mol, addCoords=True) should solve your problem. Best, Sereina On 20 Aug 2014, at 19:07, Michał Nowotka mmm...@gmail.com wrote: Hello, Imagine I have a compound with some 2D

Re: [Rdkit-discuss] Chem.AddHs() doesn't care about compound layout

2014-08-20 Thread Michał Nowotka
Perfect, thank you! On Wed, Aug 20, 2014 at 6:13 PM, Sereina sereina.rini...@gmail.com wrote: Dear Michal, Chem.AddHs() has the option “addCoords” which is normally set to False. So, using mol = Chem.AddHs(mol, addCoords=True) should solve your problem. Best, Sereina On 20 Aug

Re: [Rdkit-discuss] Chem.AddHs() doesn't care about compound layout

2014-08-20 Thread Michał Nowotka
Hmm, I've just checked and actually adding this flag doesn't solve my problem. It seems that adding this flag actually calls Compute2dCoords (at least this is how it looks like), because all coordinates are computed from scratch, for example if my compound was translated by some vector on 2D

Re: [Rdkit-discuss] Chem.AddHs() doesn't care about compound layout

2014-08-20 Thread Greg Landrum
On Wednesday, August 20, 2014, Michał Nowotka mmm...@gmail.com wrote: I've just checked and actually adding this flag doesn't solve my problem. It seems that adding this flag actually calls Compute2dCoords (at least this is how it looks like), because all coordinates are computed from

Re: [Rdkit-discuss] Chem.AddHs() doesn't care about compound layout

2014-08-20 Thread Dimitri Maziuk
On 08/20/2014 12:34 PM, Greg Landrum wrote: On Wednesday, August 20, 2014, Michał Nowotka mmm...@gmail.com wrote: It seems that adding this flag actually calls Compute2dCoords (at least this is how it looks like), because all coordinates are computed from scratch, Hmmm, that doesn't sound

Re: [Rdkit-discuss] Chem.AddHs() doesn't care about compound layout

2014-08-20 Thread Greg Landrum
I can't seem to reproduce the problem. Here's an example showing that the original atom coordinates are preserved when Chem.AddHs is called with the addCoords argument: # In [9]: mb= ...: Mrv0541 08211405312D ...: ...: 6 6 0 0 0 0999