Hi Adelene,
You can't match an atom that doesn't exist as a node in the molecular
graph, so if you really want to match a hydrogen, you'll have to add
explicit hydrogens to your molecule:
molh = Chem.AddHs(mol)
molh.HasSubstructMatch(q1)
> True
However, if all you want to know is whether the
Hi RDKit Community,
I've observed that hydrogens are not recognised as dummy atoms when trying to
do substructure matching.
Is there a way to make them so? Ideally without adding explicitHs.
-
smi = 'CCOCCOCCCO'
mol = Chem.MolFromSmiles(smi)
#with dummy atom
q1s = 'CCOCCOCCCO*'
q1m =
2 matches
Mail list logo