TECHNOLOGY

RDKit hydrogen removal can intentionally retain isotopic hydrogens

In this article
THE QUICK TAKE

The ordinary RemoveHs documentation lists exceptions, including labeled isotopic hydrogens and other structurally special cases. A parameterized overload provides finer controls over removal. The returned molecule is a new object under that contract. Keeping an isotope is not necessarily a failed cleanup, and removing it deliberately is a representation change that must be justified. Counting atomic-number categories after the operation is more informative than assuming the operation's name.

RDKit hydrogen removal is governed by chemical and parameter-specific rules, not a promise to delete every hydrogen atom. Isotopically labeled hydrogens can intentionally remain under the documented ordinary operation. A molecular AI pipeline that assumes all returned atoms are heavy atoms can therefore miscount features or silently erase meaningful isotope information in a later cleanup step.

The scientific interface

The ordinary RemoveHs documentation lists exceptions, including labeled isotopic hydrogens and other structurally special cases. A parameterized overload provides finer controls over removal. The returned molecule is a new object under that contract. Keeping an isotope is not necessarily a failed cleanup, and removing it deliberately is a representation change that must be justified. Counting atomic-number categories after the operation is more informative than assuming the operation’s name establishes a universal heavy-atom-only schema.

Implementation details

Define explicit versus implicit hydrogen and isotope policy in the dataset schema. Record the selected overload and parameters, then inspect the returned atom composition and annotation mapping. Preserve original molecular identity and any isotope-dependent targets where they matter. If a model intentionally ignores isotopes, document the resulting equivalence class rather than claiming unchanged chemical information. Keep graph normalization separate from coordinate or target transformation so a reduced graph cannot accidentally retain labels indexed to removed atoms or properties whose meaning depended on the original isotope state.

A constructed validation case

Prepare a controlled molecule containing ordinary and isotopically labeled hydrogens. Compare the documented ordinary removal with an explicitly configured alternative under the reviewed isotope policy. Inspect returned atom identities, counts and target associations, including cases where retained hydrogen is expected. Add a naive delete-all-hydrogens postprocessor as a negative control. Acceptance requires the intended chemical representation and visible information changes, not an assertion that every retained hydrogen proves failure or that all removal modes preserve every isotope-sensitive scientific target.

Numerical and data limits

This guide concerns molecular preprocessing semantics, not a prediction of physical properties or biological outcomes. Those need independent scientific evidence. Preserve isotope policy so a structural cleanup cannot silently redefine the examples and targets used to train or evaluate a molecular AI system.

Primary references

RDKit Chem rdmolops API; The RDKit Book: molecular representations and fingerprints.

This is a proposed scientific-interface validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the accuracy or performance of a scientific model.

SPICE: atomic numbers alone do not identify a charged molecular state; Tensor axes in a language model: batch, sequence and hidden width.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles