Files
rdkit/Code/GraphMol/AddHs.cpp
Yakov Pechersky 1a3cc2d5e8 fix: kekulization failure for V3000 molblocks with aromatic bonds and explicit H (#9141)
V3000 parsing sets aromatic flags on bonds but not atoms. When removeHs
strips an explicit H from nitrogen in an aromatic ring, molRemoveH
checked heavyAtom->getIsAromatic() to decide whether to increment
numExplicitHs — but that flag was always false for V3000-parsed atoms.

Without the explicit H count, the kekulizer cannot distinguish pyrrole N from pyridine N,
causing
"Can't kekulize mol" errors on valid ChemDraw-exported molblocks.

Fix: use isAromaticAtom(), which checks both atom and bond aromatic
flags
2026-03-14 06:50:01 +01:00

50 KiB