Layers indicates how many non-tagged atoms should also be included in the SMIRKS pattern. This is an integer describing how many bonds away from the tagged atoms should be considered, or it can be the string "all" indicating that all atoms in the molecule should be used in the SMIRKS. A NetworkX graph is used to store decorators for atoms (nodes) connected by bonds (edges). Then the SMIRKS can be created for this graph in two forms. First, the complex SMIRKS include all decorators for every atom. Second, the compressed SMIRKS include only the atomic number for atoms, leaving off other decorators (Table ). In both cases, bonds include decorators specifying their order and whether they are a part of a ring. Below is an example implementation of this module.