Determining whether a chemical environment matches a SMARTS pattern inherently requires computing a map between the two respective graphs. Although each chemical environment a ∈ A may all match a SMARTS S 0 , the union of all chemical environments Q 0 may not match S 0 given the greedy mapping approach in Sec. II D. For example, take the SMARTS S 0 = [#6:1]∼[#6:2]=[#6:3], which would represent an angle parameter in a force field, and the two SMARTS expressions