MeridianMERIDIAN

SMILES Notation

representation.scientific.smiles

Simplified Molecular-Input Line-Entry System. Compact linear notation for describing chemical structures using ASCII characters. Atoms represented by element symbols, bonds by special characters. Widely used in cheminformatics and drug discovery databases.

Casts to
VARCHAR
Scope
broad_characters

Shape

Length 1 to 1000 characters.

Pattern
^[A-Za-z0-9@+\-\[\]\(\)\\/#=%.:]+$
ValueLengthShape
O1matches
CCO3matches
CC(=O)Oc1ccccc1C(=O)O21matches
c1ccccc18matches
CC(=O)O7matches
C(=O)(N)N9matches
0rejected: one character short

Told apart

Going the other way, this type's own rule accepts 6 of 6 samples of CAS Registry Number, 3 of 3 samples of DNA Sequence, 4 of 5 samples of InChI Identifier, 7 of 7 samples of Measurement Unit, 3 of 3 samples of Protein Sequence and 3 of 3 samples of RNA Sequence.

The broad_characters designation reflects that single values like "O" or "CC" are indistinguishable from plain text — column-level disambiguation (header hints) is essential.

Background

Origin

SMILES, the Simplified Molecular Input Line Entry System, is a line notation that uses printable characters for entering and representing molecules and reactions.[1] Daylight's SMILES theory manual records that development of SMILES was initiated by David Weininger at the Environmental Research Laboratory of the U.S. EPA in Duluth, Minnesota.[1] The SMILES design was completed at Pomona College in Claremont, California.[1] The Environmental Protection Agency funded the initial project to develop SMILES.[2] David Weininger's paper "SMILES, a Chemical Language and Information System. 1. Introduction to Methodology and Encoding Rules" was published in the Journal of Chemical Information and Computer Sciences in 1988.[3] A second paper, "SMILES 2. Algorithm for Generation of Unique SMILES Notation", by David Weininger, Arthur Weininger and Joseph L Weininger, appeared in the same journal in 1989.[3]

The OpenSMILES specification says that since its introduction in the late 1980s, SMILES has become widely accepted as a de facto standard for exchange of molecular structures.[3] In 2007, an open standard called OpenSMILES was developed by the Blue Obelisk open-source chemistry community.[2] The OpenSMILES authors wrote that Daylight's specification, being proprietary, limits the universal adoption of SMILES and has no mechanism for contributions from the chemistry community.[3] The current OpenSMILES specification is version 1.0, dated 2016-05-15.[3]

Use

Hydrogen atoms do not normally need to be specified when writing SMILES for most organic structures.[1] In SMILES, atoms in aromatic rings are specified by lower case letters, so aromatic carbon is written c.[1] SMILES branches are specified by enclosing them in parentheses, and can be nested or stacked.[1] A SMILES ring closure is marked by a digit immediately following the atomic symbol at each end of the ring-closing bond.[1] Disconnected compounds are written in SMILES as individual structures separated by a period.[1] SMILES written with isotopic and chiral specifications are collectively known as isomeric SMILES.[1]

There are usually a large number of valid SMILES strings which represent a given structure.[1] A canonicalisation algorithm exists to generate one special SMILES among all the valid possibilities.[1] RDKit's documentation shows the inputs C1=CC=CN=C1, c1cccnc1 and n1ccccc1 all being written back as the same canonical SMILES, c1ccncc1.[4] A canonical SMILES depends on the canonicalisation algorithm used to generate it.[2] The Daylight and OpenEye algorithms for generating canonical SMILES differ in their treatment of aromaticity.[2] OpenSMILES warns that a canonical SMILES should not be considered a universal, global identifier, because two systems may use different rules and one system's output can change as it is improved or has bugs fixed.[3] OpenSMILES advises that anyone considering canonical SMILES for a database system should also investigate InChI.[3] OpenSMILES notes that names for SMILES flavours such as isomeric SMILES conflict between vendors and toolkits.[3] When you join or deduplicate molecules from more than one source, re-canonicalise every string with one toolkit and one version, rather than comparing the strings as they arrived. (Meridian's view)

Under OpenSMILES, a SMILES string ends at a whitespace character (space, tab, newline or carriage return) or at the end of the string.[3] OpenSMILES allows other data, such as a name, properties or a registration number, to follow the SMILES on a line after the whitespace.[3] RDKit's MolFromSmiles returns None when it fails to parse a SMILES string, with an error message such as "Can't kekulize mol".[4] Short values such as O, CC or CCO read as ordinary text, so trust a SMILES column on its header and on whether its values parse in a chemistry toolkit, not on a character pattern alone. (Meridian's view) Keep SMILES as case-sensitive text through every step of a pipeline, and if a line from a .smi file holds more than one field, split it at the first whitespace before parsing. (Meridian's view)

Where you'll meet it

ChEMBL's chembl_37 release publishes chembl_37_chemreps.txt.gz, a tab-separated file containing SMILES, InChI and InChI Key representations of its compounds.[5] ChEMBL's COMPOUND_STRUCTURES table holds a CANONICAL_SMILES column, generated using RDKit.[6] ChEMBL's schema documentation declares CANONICAL_SMILES as VARCHAR2(4000).[6]

Detection notes

New in taxonomy expansion. SMILES is extremely common in chemical and pharmaceutical datasets. The broad_characters designation reflects that single values like "O" or "CC" are indistinguishable from plain text — column-level disambiguation (header hints) is essential. Common molecules: O=water, CCO=ethanol, c1ccccc1=benzene, CC(=O)O=acetic acid.

Use it

CLI · DuckDB
$ finetype infer -i "O" --mode column
→ representation.scientific.smiles

SELECT ft_infer('O');
-- → 'representation.scientific.smiles'
Cast expression
CAST({col} AS VARCHAR)

Schema

https://meridian.online/schemas/representation.scientific.smiles · Frictionless type string

finetype taxonomy representation.scientific.smiles -o json-schema

Aliases

smiles_stringmolecular_notation

Type Registry