The definition above represents all SMARTS primitives as integers and each node and edge in the graph represents a set of SMARTS primitives, as described in the following section. Encoding primitives as bit vectors is beneficial because it facilitates the treatment of SMARTS as first class objects, specifically, they can be stored in data structures, compared using equality with other SMARTS, and most importantly be used in set operations expressed as bitwise operations. It is important to note that what we are describing is a representation of SMARTS, and not how the SMARTS information is generated. That is, we do not focus on the actual chemical perception of producing SMARTS patterns from a molecular input, e.g. from SMILES, which can be performed with existing toolkits such as RDKit . As the name binary-encoded SMARTS suggests, we offer an encoding scheme and algorithms for SMARTS clustering and force field chemical perception modeling.