此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)
Import/Export 导入/导出 格式

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 can read the canonical and the isomeric version of the SMILES format.
  • Import["file.smi"] imports a file containing an arbitrary number of SMILES strings.
  • Import["file.smi"]converts SMILES data to a list of Mathematica 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 SMILE string to an expression.
"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
Import the SMILES string for caffeine:
In[1]:=
Click for copyable input
Out[1]=
 
ChemicalData has SMILES data for all common chemicals:
In[1]:=
Click for copyable input
Out[1]=
 
The data given by Import or ImportString can be used as input for GraphPlot:
In[1]:=
Click for copyable input
Out[1]=