WOLFRAM

creates a two-dimensional structure diagram of the molecule mol.

MoleculePlot[mol,patt]

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

Details and Options

Examples

open allclose all

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

Create a molecule and plot it:

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

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[2]=2

Options  (7)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

PlotLegends  (1)

Use placeholders for plot legends:

Out[2]=2

Use the expressions to label the highlights:

Out[3]=3

PlotTheme  (1)

By default, aromatic bonds are shown in their delocalized Kekule form. Use the "Aromatic" plot theme to show which bonds are aromatic. Phenyl rings are shown with a circle to indicate the delocalized bonding electrons. Aromatic heterocycles use dashed lines for aromatic bonds:

Out[1]=1

Combine different plot themes:

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

Text

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

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

CMS

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

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

APA

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

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

BibTeX

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

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

BibLaTeX

@online{reference.wolfram_2025_moleculeplot, organization={Wolfram Research}, title={MoleculePlot}, year={2021}, url={https://reference.wolfram.com/language/ref/MoleculePlot.html}, note=[Accessed: 29-March-2025 ]}

@online{reference.wolfram_2025_moleculeplot, organization={Wolfram Research}, title={MoleculePlot}, year={2021}, url={https://reference.wolfram.com/language/ref/MoleculePlot.html}, note=[Accessed: 29-March-2025 ]}