SMILES (.smi)


    MIME type: chemical/x-daylight-smiles
    SMILES chemical format.
    Commonly used to describe the structure of chemical molecules.
    SMILES is an acronym for Simplified Molecular Input Line Entry Specification.
    Used in cheminformatics applications and in chemistry databases to represent chemical formulas.
    ASCII format.
    Uses a linear notation to represent the connectivity graph of a molecule.
    Can store data for multiple molecules.
    Developed in the 1980s by Arthur Weininger and David Weininger.

Import and Export

  • Import["file.smi"] imports a file containing an arbitrary number of SMILES strings.
  • Import["file.smi"] converts SMILES data to a list of Wolfram Language expressions representing the graph structures of chemical molecules.
  • Import["file.smi",elem] imports the specified element from SMILES.
  • Import["file.smi",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file","SMILES"] or Import["file",{"SMILES",elem,}].
  • See the reference pages for full general information on Import.
  • ImportString[string,"SMILES"] converts a SMILES string to an expression.


  • General Import elements:
  • "Elements"list of elements and options available in this file
    "Rules"full list of rules for each element and option
  • Import by default uses the "Rules" element when converting from SMILES.
  • Data representation elements:
  • "EdgeRules"connectivity data, given as a list of rules
    "EdgeTypes"bond types, given as a list of strings
    "FormalCharges"charges of the atoms given by "VertexTypes"
    "VertexTypes"all atoms or groups constituting the molecule, typically given as a list of chemical element abbreviations


Basic Examples  (3)

Import the SMILES string for caffeine:

Click for copyable input

ChemicalData has SMILES data for all common chemicals:

Click for copyable input

The data given by Import or ImportString can be used as input for GraphPlot:

Click for copyable input

See Also

"FASTA"  "PDB"  "MOL"  "SDF"  "XYZ"  ChemicalData

Introduced in 2008
| Updated in 2010