The Chemistry Cartridge adds the NEAREST operator to SQL. When applied to a SMILES-containing column in a table, rows containing structures which match a given SMARTS pattern will be selected. This very powerful search is primarily useful for advanced users. Though this search is highly optimized, it can be relatively slow if all query nodes contain variablity. Note that this search takes a SMARTS (pattern) as input rather than a SMILES (structure). Other examples are also available.

TO_CHAR(SYSDATE,'MM:
--------------------
10:21:1998, 04:38:18
Elapsed: 00:00:00.00
old 3: where Nearest(smiles,'&1','&2')=1
new 3: where Nearest(smiles,'NCCc1ccc(O)c(O)c1','10')=1
ID SMILES
------- ----------------------------
8779 NCCc1ccc(O)c(O)c1
33028 NCCc1cc(O)c(O)c(O)c1
102401 NCCc1ccc(O)cc1
29783 CNCCc1ccc(O)c(O)c1
110045 NCCc1cc(O)c(O)cc1O
33812 C[N+](C)(C)CCc1ccc(O)c(O)c1
16732 COc1ccc(CCN)cc1O
114600 COc1cc(CCN)ccc1O
74983 COc1cccc(CCN)c1
85586 COc1ccc(CCN)cc1OC
10 rows selected.
Elapsed: 00:00:00.96
TO_CHAR(SYSDATE,'MM:
--------------------
10:21:1998, 04:38:19