Re: [Rdkit-discuss] Counting H Atoms

2016-06-21 Thread Greg Landrum
Answering this may require a long explanation, or it could be really quick let's see where we end up. :-) If you replace "a.GetTotalNumHs()" with "a.GetTotalNumHs(includeNeighbors=True)", do the results then make sense to you? -greg On Tue, Jun 21, 2016 at 4:50 PM, David Cosgrove

[Rdkit-discuss] Counting H Atoms

2016-06-21 Thread David Cosgrove
Hi All, I'm a bit confused about counting hydrogen atoms. It's a perennial problem with cheminformatics toolkits in my experience, but this seems particularly perverse. If I run the code: from rdkit import Chem from rdkit.Chem import AllChem mol = Chem.MolFromSmiles( 'CCO' ) mol = Chem.AddHs(