I have been trying to use the RDKit's reaction substructure matching for some time. I want to match all reactions where a C-H bond is being broken to form a new C-C bond.
This is my code:
from rdkit.Chem import AllChem from rdkit.Chem import rdChemReactions c_h_template = AllChem.ReactionFromSmarts('[#6:1]-[#1]>>[#6:1]~[#6]') x = AllChem.ReactionFromSmarts('C1=[CH:1]C=CC=C1.C[CH:2]=C.[Pd]>>C[C:2](=C)[CH:1]1=CC=CC=C1',useSmiles=True) result = rdChemReactions.HasReactionSubstructMatch(x,c_h_template) print(result) # always False
The result is always False, even though the reaction pattern should match.
The template, and the reaction are shown below (in jupyter notebook):
I am not sure what I am doing wrong here. I have read about SMARTS from daylight website, and I think the atom mapping is correct, and it should match. Any help is greatly appreciated.