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

MOL2 (.mol2)

MIME type: chemical/x-mol2
Tripos MOL2 molecule model files.
Used in cheminformatics applications and on the web for storing and exchanging 3D molecule models.
Native format of the SYBYL cheminformatics application.
Plain text tabular format.
Represents a single chemical compound or multiple chemical compounds.
Stores atomic coordinates, chemical bond information, and metadata.
  • Import imports a list of molecule models or structure diagrams from a MOL2 file.
  • Export exports elements of molecule models to a MOL2 file.
  • Import gives a list of Graphics3D objects when reading 3D molecule models, and vector graphics when importing a planar representation of molecules.
  • Import imports the specified element from a MOL2 file.
  • Import imports multiple elements.
  • Export creates a MOL2 file 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 renderings of all molecule models stored in the file
"Graphics3D", n3D renderings of the n^(th) molecule
"StructureDiagram"2D structure formula of all molecule models
  • Import by default uses the element if the file represents a 3D model and for planar compounds.
  • Data representation elements:
"EdgeRules"connectivity data, given as a list of lists of rules
"EdgeTypes"bond types, given as a list of lists of strings
"VertexCoordinates"atomic coordinates, typically given in picometers
"VertexTypes"all atoms or groups constituting the molecule, typically given as a list of chemical element abbreviations
"PartialCharges"electric charges of the atoms given as a list of reals
"Residues"residue sequences, given as a list of lists of three-letter abbreviations
"Sequence"residue sequences given as a list of strings
"ResidueAtoms"list of lists of residue atoms
"ResidueCoordinates"3D coordinates of residue atoms
"ResidueCharges"charges of the atoms given by
  • Export creates a MOL2 file from a specification of atom types and their 2D or 3D coordinates.
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.
  • Select 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
Import a MOL2 file as a three-dimensional ball-and-stick model:
Show the Import elements available in a MOL2 file:
This gives a list of atoms that constitute a molecule:
Import the molecule and render it as a structure diagram:
This gives the residue atom types and their 3D coordinates for all molecules in this file:
This creates a MOL2 file from the previous output (the default value for the residue name is "Unk", the default atom charge is 0):
Import a MOL2 file as a three-dimensional ball-and-stick model:
In[1]:=
Click for copyable input
Out[1]=
Show the Import elements available in a MOL2 file:
In[2]:=
Click for copyable input
Out[2]=
This gives a list of atoms that constitute a molecule:
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
Import the molecule and render it as a structure diagram:
In[5]:=
Click for copyable input
Out[5]=
 
This gives the residue atom types and their 3D coordinates for all molecules in this file:
In[1]:=
Click for copyable input
Out[1]=
This creates a MOL2 file from the previous output (the default value for the residue name is "Unk", the default atom charge is 0):
In[2]:=
Click for copyable input
Out[2]=