User c5a59af6ca
11-02-2015 21:52:51
Hi, I was trying to exclude sulfonamides from being reactants in a reaction using an amine. However, specifying not a sulfonamide in the reactivity did not appear to exclude a sulfonamide from reacting.
not match(ratom(1), sulfonamide, 3)
Inspection of the SMARTS for sulfonamide (from https://docs.chemaxon.com/display/chemicalterms/Predefined+Functional+Groups+and+Named+Molecule+Groups) indicates that the nitrogen is specified not as an atom, but as a context for the sulfur atom:
[#6:1][$([SX4:2]([NX3:3])(=[OX1:4])(=[OX1:4])),$([SX4+2:2]([NX3:3])([OX1-:4])([OX1-:4]))]
modifying the SMARTS to make the nitrogen an explicit atom made the exclusion behave as expected:
[#6:1][$([SX4:2](=[OX1:4])(=[OX1:4])),$([SX4+2:2]([OX1-:4])([OX1-:4]))][NX3:3]
not match(ratom(1), "[#6:1][$([SX4:2](=[OX1:4])(=[OX1:4])),$([SX4+2:2]([OX1-:4])([OX1-:4]))][NX3:3]", 3)
Is it expected that context-only atoms are not matched as part of SMARTS? Is there some reason the sulfonamide definition was set up not to match nitrogen?
Thanks!