A SMARTS atom or bond is composed of primitives that contain some information about the underlying chemistry. These primitives include atom element, connectivity, ring membership, etc; see Mobley et al. for a list of commonly used primitives . Let each atom or bond map to primitives φ ∈ Z N , where each of the N primitives map to an integer. From this, using a two's compliment encoding we can uniquely map the bit vector of an integer to a primitive. This integer z can be written as a sum of bits: