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



- MoleculePlot returns a Graphics expression.
- If the molecule does not have structure diagram coordinates, they will be generated automatically.
- mol can be a Molecule object or something that can be easily converted to one, such as a systematic chemical name, a "Chemical" entity, a BioSequence or an ExternalIdentifier.
- MoleculePlot[MoleculePattern[…]] will return a depiction of the given molecule pattern.
- Possible forms for patt include:
-
n the index of a particular atom Atom[…] a pattern for an atom Bond[…] a pattern for a bond MoleculePattern[…] a pattern for a molecule substructure {patt1,patt2,…} a list of patterns <label1patt1,… > an Association of labels and patterns - MoleculePlot has the same options as Graphics, with the following additions and changes: [List of all options]
-
AtomLabels Automatic labels and label placements for atoms AtomLabelStyle Automatic style to use for atom labels BondLabels None labels and label placements for bonds BondLabelStyle Automatic style to use for bond labels ColorRules Automatic a list of rules {elem1->col1,…} dictating which colors to use for atomic elements IncludeHydrogens Automatic whether to show hydrogen atoms PlotLegends None legends for highlights PlotTheme $PlotTheme overall theme for the plot - Supported plot themes include:
-
"AllAtom" display all hydrogens "Aromatic" aromatic bonds are shown as dashed lines or circles "HeavyAtom" hydrogen atoms are elided or combined with the connected heavy atom "Monochrome" all text and graphics are shown in black - Typical settings for PlotLegends include:
-
None no legend Automatic automatically determine legend {lbl1,lbl2,…} use lbl1, lbl2, … as legend labels Placed[lspec,…] specify placement for legend -
AlignmentPoint Center the default point in the graphic to align with AspectRatio Automatic ratio of height to width AtomLabels Automatic labels and label placements for atoms AtomLabelStyle Automatic style to use for atom labels Axes False whether to draw axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} style specifications for the axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic BondLabels None labels and label placements for bonds BondLabelStyle Automatic style to use for bond labels ColorRules Automatic a list of rules {elem1->col1,…} dictating which colors to use for atomic elements ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool Epilog {} primitives rendered after the main plot FormatType TraditionalForm the default format type for text Frame False whether to put a frame around the plot FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic IncludeHydrogens Automatic whether to show hydrogen atoms LabelStyle {} style specifications for labels Method Automatic details of graphics methods to use PlotLabel None an overall label for the plot PlotLegends None legends for highlights PlotRange All range of values to include PlotRangeClipping False whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RotateLabel True whether to rotate y labels on the frame Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks
List of all options



Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Create a molecule and plot it:

https://wolfram.com/xid/0bh0wv40lw4btu-s3w1zd

Highlight the first and third atoms:

https://wolfram.com/xid/0bh0wv40lw4btu-37oyfa


https://wolfram.com/xid/0bh0wv40lw4btu-4lw2hb

Highlight two different patterns:

https://wolfram.com/xid/0bh0wv40lw4btu-8w2koo

Scope (2)Survey of the scope of standard use cases
A pattern can match one or multiple positions in a molecule:

https://wolfram.com/xid/0bh0wv40lw4btu-nl4eii
Highlight each carbonyl separately:

https://wolfram.com/xid/0bh0wv40lw4btu-38f6bq

Highlight each carbonyl as a single color:

https://wolfram.com/xid/0bh0wv40lw4btu-j7xmk6


https://wolfram.com/xid/0bh0wv40lw4btu-4123i

https://wolfram.com/xid/0bh0wv40lw4btu-et8ak1

Options (7)Common values & functionality for each option
AtomLabels (1)
Label all atoms by their index:

https://wolfram.com/xid/0bh0wv40lw4btu-l4d3hw

Label only chlorine atoms by their index:

https://wolfram.com/xid/0bh0wv40lw4btu-md6o1o

Label non-hydrogen atoms by their hybridization:

https://wolfram.com/xid/0bh0wv40lw4btu-jp2izk

AtomLabelStyle (1)
BondLabels (1)
BondLabelStyle (1)
ColorRules (1)
PlotLegends (1)
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:

https://wolfram.com/xid/0bh0wv40lw4btu-75nzo6

Combine different plot themes:

https://wolfram.com/xid/0bh0wv40lw4btu-49omt7

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
]}
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
]}