Unfortunately, there are a number of ambiguities in the original paper describing the Daylight SMILES syntax. These have led to different SMILES being accepted or rejected by different SMILES parser implementations. The following historical table illustrates some of these corner-cases. These types of cases continue to be an issue with SMILES parsers.
|SMILES||Daylight 4.4-4.9||Corina 1.6||Corina WWW||Concord 3.2.1||COBRA 3.21A||Synopsis 4.0||OEChem 2.1.2|
Because of these types of SMILES ambiguities, the OEChem SMILES parser has two modes. The default is `relaxed`, which is more forgiving and accepts SMILES as per the table above and enables the SMILES extensions described in the next section. The SMILES parser also has a `strict` mode that is far less forgiving about dubious SMILES strings.
The OEChem SMILES parsers support several minor extensions to Daylight syntax. Each of these extensions and its motivations are listed below.
In addition to the standard Daylight unquoted elements, B, C, N, O, F, P, S, Cl, Br and I, OEChem‘s SMILES readers also allow H, D and T to specify hydrogen, deuterium and tritium. Additionally, to support Syracuse SMILES, ‘CL’ and ‘BR’ are considered ‘Cl’ and ‘Br’. The periodic table is also extended from 102 to 109 elements, i.e. [Sg] for Seaborgium, with the addition of [D] and [T] representing [2H] and [3H] respectively.
OEChem may support Na, Li, and K as unquoted elements to support Syracuse SMILES at some point in the future.
OEChem SMILES also allows supports external closures, or potentially unsatisfied ring closures. These have the syntax, ampersand followed by a ring closure specification, i.e. an optional bond order followed by either a digit or a % character and two digits. The index space of external bonds and ring closures is separate, so that the ring closure 2 and the external attachment point &2 are unrelated.
When external attachment points are paired within a SMILES string, they behave identically to ring closures, using a separate index space. Hence, the SMILES c&1ccccc&1 is interpreted the same way as c1ccccc1, and C&1.C&1 is interpreted like C1.C1, i.e. the SMILES CC.
However, unlike ring closures, unpaired external attachment points are allowed and are interpreted like RGroup attachment points above. Hence, the SMILES CC&1 (on its own) is equivalent to the RGroup attachment SMILES CC[R1], which is equivalent to the atom mapped molecule CC[*:1].
The major advantage of these semantics, inspired by Daylight’s CHUCKLES, is that it allows convenient enumeration of combinatorial libraries using string concatenation. For example, three components of a library may be specified as C&1CCC&2, F&1 and Br&2. The combined string C&1CCC&2.F&1.Br&2 is interpreted as the reaction product, i.e. FCCCCBr.
As with ring closures, bond orders may be specified after the ampersand and before the closure index, C&=1, and two digit closures are indicated by a % prefix, i.e. C&%12 or C&=%12.