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()
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(),
2 matches
Mail list logo