In order to automate sampling of chemical perception trees, a language to express atom or fragment types directly was required. We utilize the SMILES Arbitrary Target Specification (SMARTS) and SMILES Reaction Specification (SMIRKS) languages for this purpose. A SMARTS string is a chemical substructure query, where a substructure is a set of atoms connected by bonds, and both atoms and bonds are typically further characterized with "decorators" (Table ). For example, a bond may be decorated with "@" to indicate that it in a ring, and/or "-" to indicate a single bond, and detailed specifications may be constructed by the use of Boolean operators. Atoms are set apart from bonds with square brackets, for example, "[#6X4]!@[#6r5]" describes a tetrahedral carbon atom ("[#6X4]") connected by a non-ring bond ("!@") to another carbon atom which is in a five-membered ring ("[#6r5]"). SMIRKS strings provide a language similar to SMARTS but which also includes atom indexing. SMIRKS were created to allow description of reactions, but here we use only the atom indexing feature. For our purposes, we take advantage of the indexing in SMIRKS to track relevant atoms involved in fragment types such as bond, angle, or torsion types. For example, the SMARTS above could become a SMIRKS string with the addition of ":" to identify the atom indices ("[#6X4:1]!@[#6r5:2]"). Following the SMIRNOFF notation, a bond parameter involves two indexed atoms, an angle parameter three, and so on. A selection of decorators that can be used for atoms (top section) and bonds (middle section) in SMIRKS or SMARTS strings. Decorators on atoms and bonds can be combined using Boolean operators (bottom section), where the high precedence and is applied before an or operator and the low precedence and is applied after. For a complete list of decorators and documentation for SMARTS and SMIRKS see the Daylight Theory Manual. The atom and fragment type definitions used here are based on the chemical environment of each atom extending up to two bonds away. In both SMARTY and SMIRKY, we only consider the chemical environment around the primary atom and atoms one bond away (alpha) or two bonds away (beta). Moves propose changes at any of these positions. The primary atom is the atom being typed by SMARTS or all of the indexed atoms in a SMIRKS. Atoms beyond this beta position are not currently considered. For example, consider a SMARTS describing the hydroxyl oxygen in an alcohol (Figure ). Here, the oxygen is the atom to be typed (yellow), the hydrogen and carbon bonded to the oxygen are the alpha atoms (blue), and the carbon two bonds away is a beta atom (pink), as are the ring oxygen and the hydrogen atom bonded to the alpha carbon (not included in the SMARTS pattern). Including just atoms up to two bonds away leads to a wide variety of possible SMARTS or SMIRKS patterns. The number of possible SMARTS patterns that can be generated using environments including atoms only out to the beta position is on the scale of 10 16 , estimated using the number of possible atoms in one pattern and the number of SMARTS decorators available. Atom types in most present-day force fields usually depend only on atoms out to the beta position, although future force fields might require going further. Therefore, SMARTY and SMIRKY currently do not propose new atom or fragment types that involve atoms past the beta position. The carbon ("[#6]") atom is connected to another carbon ("[#6]", which is considered a beta atom (pink)) via any bond ("∼"). The oxygen has a decorator (light green) ("X2") which means it has two connected atoms.