Tubert-Brohman
Sent: 08 July 2021 19:02:10
To: Adelene LAI
Cc: rdkit-discuss
Subject: Re: [Rdkit-discuss] Hydrogens not recognised as Dummy Atoms?
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
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 =
3 matches
Mail list logo