This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

MOL (.mol)

MIME type: chemical/x-mdl-molfile
MDL molecule model files.
Used in cheminformatics applications and on the web for storing and exchanging 3D molecule models.
Plain text tabular format.
Represents a single chemical compound.
Stores atomic coordinates, chemical bond information, and metadata.
Maintained by Elsevier Molecular Design Limited (MDL).
  • Import imports a molecule model or a structure diagram from a molfile.
  • Export exports elements of a molecule model to a molfile.
  • Import gives a Graphics3D object when reading a 3D molecule model and vector graphics when importing a planar representation of a molecule.
  • Import imports the specified element from a molfile.
  • Import imports multiple elements.
  • Export creates a molfile by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Graphics elements:
"Graphics3D"3D rendering of the molecule model
"StructureDiagram"2D structure formula
  • Import by default uses the element for molfiles that contain 3D molecule models, and for structure formulas.
  • Data representation elements:
"EdgeRules"connectivity data, given as a list of rules
"EdgeTypes"bond types, given as a list of strings
"FormalCharges"electric charges of the atoms, given as a list of integers
"MassNumbers"isotope mass numbers
"VertexCoordinates"2D or 3D atomic coordinates, typically given in picometers
"VertexTypes"all atoms or groups constituting the molecule, typically given as a list of chemical element abbreviations
  • Export creates a molfile from a specification of atom types and their 2D or 3D coordinates.
  • Meta-information element:
"Header"header information from the file
ImageSizeAutomaticspecifies the overall size of the graphics to display
BackgroundWhitespecifies what background color to use
ViewPointAutomaticpoint in space from which the 3D model is to be viewed
  • With the default setting Automatic, Mathematica automatically calculates the optimal viewing angle for the imported molecule geometry.
  • Selecting a 3D rendering style:
"Rendering""BallAndStick"specifies the visualization method
  • Possible settings for are:
"BallAndStick"displays atoms and bonds as a ball-and-stick model
"Spacefilling"atoms shown as overlapping spheres
"Wireframe"bonds rendered as lines
Show the Import elements available in a MOL file:
Import a 3D molecule model as a ball-and-stick model:
Show the bonds of the same molecule as a wireframe model:
Show the same molecule as space-filling atoms:
When importing a molfile that contains a 2D representation of a molecule, Mathematica automatically renders it as a chemical structure diagram:
This gives the atom types and their 2D coordinates for the structure diagram:
This creates a molfile from the previous output:
Show the Import elements available in a MOL file:
In[1]:=
Click for copyable input
Out[1]=
Import a 3D molecule model as a ball-and-stick model:
In[2]:=
Click for copyable input
Out[2]=
Show the bonds of the same molecule as a wireframe model:
In[3]:=
Click for copyable input
Out[3]=
Show the same molecule as space-filling atoms:
In[4]:=
Click for copyable input
Out[4]=
 
When importing a molfile that contains a 2D representation of a molecule, Mathematica automatically renders it as a chemical structure diagram:
In[1]:=
Click for copyable input
Out[1]=
This gives the atom types and their 2D coordinates for the structure diagram:
In[2]:=
Click for copyable input
Out[2]=
This creates a molfile from the previous output:
In[3]:=
Click for copyable input
Out[3]=