Let's say I have a compound shown above (SMILES:
CCC(F)(F)F), and I want to exclude the trifluoromethyl group with SMARTS, how would I do that? I have tried
[CX4;!$(C(F)(F)F)] but it does not exclude
C(F)(F)F according to RDKit:
molecule = Chem.MolFromSmiles('CCC(F)(F)F') pattern = Chem.MolFromSmarts('[CX4;!$(C(F)(F)F)]') molecule.HasSubstructMatch(pattern) --> expected False, but returns True
I think the recursive portion is written incorrectly but I'm not sure how to correct it.