Determining where parameters are inserted into the hierarchy is also important to maintain a deterministic approach to force field design. When a new specialized parameter is defined, we want to make sure the intended chemistry is assigned to it rather than any other parameters which may come later in the hierarchy which have higher priority. Simply appending new SMARTS to the end of a flat list to give them highest priority and would only work if they are disjoint from the existing SMARTS, which is generally not the case. In the methods described above, new SMARTS are created as a subset of an existing parameter, which establishes a hierarchical relation. Ordering a tree-like hierarchy into a flat list means that the most general parameters should precede the specialized parameters if we assume that the last matching parameter is the one applied. Let the generic and specialized parameters be C = [*:1] and D = [!#1:1], respectively, such that D ⊂ C. Using a tree data structure to represent this information, we see that C is the predecessor of D. Now, let us define a new parameter C j = [!#6:1] which is intended to specialize C and so C j ⊂ C. Now C j and D are both successors to C and there is overlap between them. It is important that chemical environments that match D before introduction of C j continue to match D. Although both D, C j ⊂ C, we also must ensure that the ordering is C, C j , D for correct application. In this order we see that chemical environments that match D are unaffected, and chemical environments that now match C j are preferred over C. This flattening can be performed if we iterate the tree depth-first. In this scheme, new parameters should be placed behind all current successors under a given predecessor, such that existing successors take precedent. See Fig. for an illustration.