ring in both implementations, for example [CR] (aliphatic carbon atom in ring). Lower case r specifies the size of the smallest ring of which the atom is a member. The carbon atoms of the ring fusion would both match [cr5]. Bonds can be specified as cyclic, for example C@C matches directly bonded atoms in a ring. Logical operators Four logical operators allow atom and bond descriptors to be combined. The 'and' operator ; can be used to define a protonated primary amine as [N;H3;+][C;X4]. The 'or' operator , has a higher priority so [c,n;H] defines (aromatic carbon or aromatic nitrogen) with implicit hydrogen. The 'and' operator & has higher priority than , so [c,n&H] defines aromatic carbon or (aromatic nitrogen with implicit hydrogen). The 'not' operator ! can be used to define unsaturated aliphatic carbon as [C;!X4] and acyclic bonds as *-!@*. Recursive SMARTS Recursive SMARTS allow detailed specification of an atom's environment. For example, the more reactive (with respect to electrophilic aromatic substitution) ortho and para carbon atoms of phenol can be defined as [$(c1c([OH])cccc1),$(c1ccc([OH])cc1)]. Examples of SMARTS A number of illustrative examples of SMARTS have been assembled by Daylight. The definitions of hydrogen bond donors and acceptors used to apply Lipinski's Rule of Five. are easily coded in SMARTS. Donors are defined as nitrogen or oxygen atoms that have at least one directly bonded hydrogen atom: [N,n,O;!H0] or [#7,#8;!H0] (aromatic oxygen cannot have a bonded hydrogen) Acceptors are defined as nitrogen or oxygen: [N,n,O,o] or [#7,#8] A simple definition of aliphatic amines that are likely to protonate at physiological pH can be written as the following recursive SMARTS: [$([NH2][CX4]),$([NH]([CX4])[CX4]),$([NX3]([CX4])([CX4])[CX4])] In real applications the CX4 atoms would need to be defined more precisely to prevent matching against electron withdrawing groups such as CF3 that would render the amine insufficiently basic to protonate at physiological pH. SMARTS can be used to encode pharmacophore elements such as anionic centers. In the following example, recursive SMARTS notation is used to combine acid oxygen and tetrazole nitrogen in a definition of oxygen atoms that are likely to be anionic under normal physiological conditions. [$([OH][C,S,P]=O),$([nH]1nnnc1)] The SMARTS above would only match the acid hydroxyl and the tetrazole N−H. When a carboxylic acid deprotonates the negative charge is delocalised over both oxygen atoms and it may be desirable to designate both as anionic. This can achieved using the following SMARTS. [$([OH])C=O),$(O=C[OH])] Applications of SMARTS The