creates a three-dimensional model of the molecule mol.


creates a model of mol where all atoms and bonds matching the pattern patt are highlighted.

Details and Options

  • If the molecule does not have structure diagram coordinates, they will be generated automatically according to the molecule's AtomCoordinates option.
  • Possible values for patt include any atom, bond or molecular pattern as recognized by FindMoleculeSubstructure.
  • Patterns entered as Style[patt,spec]will be styled according to spec.
  • MoleculePlot3D has the same options as Graphics3D, with the following additions and changes:
  • BoxedFalsewhether to draw the bounding box
    ColorRulesAutomatica list of rules
    PlotLegendsNonelegends for highlights
    PlotThemeAutomaticoverall theme for the plot
  • Supported plot themes include:
  • "HeavyAtom"do not display hydrogens
    "BallAndStick"display atoms and bonds using Sphere and Cylinder primitives
    "Spacefilling"atoms are depicted with spheres with radius matching the van der Waals radius
    "Tubes"atoms omitted
    "Wireframe"bonds rendered as lines
  • Typical settings for PlotLegends include:
  • Noneno legend
    Automaticautomatically determine legend
    {lbl1,lbl2,}use lbl1, lbl2, as legend labels
    Placed[lspec,]specify placement for legend


open allclose all

Basic Examples  (1)

Create a molecule and plot it:

Highlight all carbon-sulfur bonds:

Highlight two different patterns:

Scope  (2)

A pattern can match one or multiple positions in a molecule:

Highlight each carbonyl separately:

Highlight each carbonyl as a single color:

Highlight several patterns:

Options  (3)

ColorRules  (1)

Specify different colors for atomic elements:

PlotTheme  (1)

Use different plot themes to visualize a molecule in 3D:

PlotLegends  (1)

Use placeholders for plot legends:

Use the expressions to label the highlights:

Wolfram Research (2019), MoleculePlot3D, Wolfram Language function,


Wolfram Research (2019), MoleculePlot3D, Wolfram Language function,


@misc{reference.wolfram_2020_moleculeplot3d, author="Wolfram Research", title="{MoleculePlot3D}", year="2019", howpublished="\url{}", note=[Accessed: 19-January-2021 ]}


@online{reference.wolfram_2020_moleculeplot3d, organization={Wolfram Research}, title={MoleculePlot3D}, year={2019}, url={}, note=[Accessed: 19-January-2021 ]}


Wolfram Language. 2019. "MoleculePlot3D." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2019). MoleculePlot3D. Wolfram Language & System Documentation Center. Retrieved from