The explicit hierarchy of SMARTS patterns also means that we can reduce the number of SMARTS queries for a given chemical environment. If, for example, a chemical environment does not match a given pattern, then we can confidently skip all successors. Also, because we prioritize the last node visited in the SMIRNOFF format, we can instead traverse the hierarchy in reverse. These two aspects combined can reduce the number of queries. For example, if a chemical environment matches C j in the example above and shown in Fig. , then we only need to check 4 SMARTS (1, 6, 3, 2). The naïve case would check all 6 nodes with a forward search, and 5 SMARTS (6, 5, 3, 4, 2) if the hierarchy is searched in reverse.