Unexpected results for substructure search #7254
Replies: 2 comments 2 replies
-
Smiles uses implicit hydrogens by default, your query is asking for an explicit hydrogen so can never match. These style of queries either require recursive smarts, or you can make a new molecule calling Chem.AddHs and do the structure match on that. |
Beta Was this translation helpful? Give feedback.
-
Thanks Brian! Yes makes sense... I didn't think about implicit hydrogens. I would prefer not to come up with recursive smarts so I tried as suggested with a new molecule using Chem.AddHs but still can't get it to match? Also tried reading in with the removeHs=False option, any ideas? In [1]: import rdkit As an aside, we originally encountered this issue using the PostgreSQL cartridge and using mol_from_ctab to read in the database molecules. However, I believe the hydrogens are also lost when using mol_from_ctab and I can't see a function to addHs to database molecules either unless I overlooked this? Thanks, Susan |
Beta Was this translation helpful? Give feedback.
-
Hi all!
I expect both of these SMARTS queries to match my molecule, does anyone know why the second query (patt2) does not match?
Many thanks,
Susan
Beta Was this translation helpful? Give feedback.
All reactions