Re: [Rdkit-discuss] Chem.RemoveHs does not remove explicit hydrogens

2019-06-22 Thread Paolo Tosco
Dear Steven, yes, it is the expected behaviour. Molecule mol encodes acetone with all hydrogens made explicit, such that the RDKit does not need to use its valence model to compute the number of implicit Hs each heavy atom is connected to. However, as you can see in your mol.GetAtoms()

[Rdkit-discuss] Chem.RemoveHs does not remove explicit hydrogens

2019-06-17 Thread Steven Kearnes via Rdkit-discuss
mol = Chem.MolFromSmiles('C(C(=O)C([H])([H])[H])([H])([H])[H]') for atom in mol.GetAtoms(): print(atom.GetNumImplicitHs(), atom.GetNumExplicitHs()) >>> 0 3 0 0 0 0 0 3 mol_noh = Chem.RemoveHs(mol, updateExplicitCount=True) for atom in mol_noh.GetAtoms(): print(atom.GetNumImplicitHs(),