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 plane, after executing addHs it will be centered, if the compound had one atom dragged unusually, it will be aligned back.
The only difference between this flag and calling Compute2dCoords is that H bonds are longer, which actually looks worse... Cheers, Michał On Wed, Aug 20, 2014 at 6:14 PM, Michał Nowotka <[email protected]> wrote: > Perfect, thank you! > > On Wed, Aug 20, 2014 at 6:13 PM, Sereina <[email protected]> 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 2014, at 19:07, Michał Nowotka <[email protected]> wrote: >> >>> 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 whole compound: >>> >>> AllChem.Compute2dCoords(mol) >>> >>> But this will ruin my beautiful layout of the original, non-hydrogen part... >>> >>> Is it possible to layout hydrogens around my compound after I add them? >>> >>> Regards, >>> Michał Nowotka >>> >>> ------------------------------------------------------------------------------ >>> Slashdot TV. >>> Video for Nerds. Stuff that matters. >>> http://tv.slashdot.org/ >>> _______________________________________________ >>> Rdkit-discuss mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

