WOLFRAM

creates a three-dimensional model of the molecule mol.

MoleculePlot3D[mol,patt]

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

Details and Options

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Create a molecule and plot it in 3D:

Out[1]=1

Highlight the first and third atoms:

Out[2]=2

Highlight all oxygen atoms:

Out[3]=3

Highlight two different patterns:

Out[1]=1

Use different plot themes:

Out[1]=1

Scope  (2)Survey of the scope of standard use cases

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

Highlight each carbonyl separately:

Out[2]=2

Highlight each carbonyl as a single color:

Out[3]=3

Highlight several patterns:

Out[1]=1

Options  (8)Common values & functionality for each option

AtomLabels  (1)

Label all atoms by their index:

Out[1]=1

Label only chlorine atoms by their index:

Out[2]=2

Label non-hydrogen atoms by their hybridization:

Out[3]=3

AtomLabelStyle  (1)

Set all labels to have the same style:

Out[1]=1

Set the label style depending on atom type:

Out[2]=2

BondLabels  (1)

Label all bonds by their index:

Out[1]=1

Label only bonds to chlorine atoms by their bond type:

Out[2]=2

BondLabelStyle  (1)

Give all bond labels the same style:

Out[1]=1

Label bonds differently based on their atoms:

Out[2]=2

ColorRules  (1)

Specify different colors for atomic elements:

Out[1]=1
Out[2]=2
Out[3]=3

IncludeHydrogens  (1)

By default, all hydrogen atoms are shown:

Out[1]=1

Show only the heavy atoms:

Out[2]=2

Create a molecule with only a few explicit hydrogens and show them in 3D:

Out[3]=3

PlotLegends  (1)

Use placeholders for plot legends:

Out[2]=2

Use the expressions to label the highlights:

Out[3]=3

PlotTheme  (1)

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

Out[2]=2
Out[3]=3

Neat Examples  (1)Surprising or curious use cases

Combine a 3D molecule plot with a surface mesh using MoleculeMesh:

Out[1]=1
Wolfram Research (2019), MoleculePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/MoleculePlot3D.html (updated 2021).
Wolfram Research (2019), MoleculePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/MoleculePlot3D.html (updated 2021).

Text

Wolfram Research (2019), MoleculePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/MoleculePlot3D.html (updated 2021).

Wolfram Research (2019), MoleculePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/MoleculePlot3D.html (updated 2021).

CMS

Wolfram Language. 2019. "MoleculePlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/MoleculePlot3D.html.

Wolfram Language. 2019. "MoleculePlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/MoleculePlot3D.html.

APA

Wolfram Language. (2019). MoleculePlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MoleculePlot3D.html

Wolfram Language. (2019). MoleculePlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MoleculePlot3D.html

BibTeX

@misc{reference.wolfram_2025_moleculeplot3d, author="Wolfram Research", title="{MoleculePlot3D}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/MoleculePlot3D.html}", note=[Accessed: 30-May-2025 ]}

@misc{reference.wolfram_2025_moleculeplot3d, author="Wolfram Research", title="{MoleculePlot3D}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/MoleculePlot3D.html}", note=[Accessed: 30-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_moleculeplot3d, organization={Wolfram Research}, title={MoleculePlot3D}, year={2021}, url={https://reference.wolfram.com/language/ref/MoleculePlot3D.html}, note=[Accessed: 30-May-2025 ]}

@online{reference.wolfram_2025_moleculeplot3d, organization={Wolfram Research}, title={MoleculePlot3D}, year={2021}, url={https://reference.wolfram.com/language/ref/MoleculePlot3D.html}, note=[Accessed: 30-May-2025 ]}