Visualizing Molecules
Visualizing Molecules
Out[]=
Molecules are not visible to the human eye so plots are needed to understand what is present.
2D plots are generated with the function.
Plot a water molecule:
In[]:=
water=MoleculePlot[Molecule["water"]]
Out[]=
Plot a benzene molecule:
In[]:=
benzene=MoleculePlot[Molecule["benzene"]]
Out[]=
Multiple plots can be combined with :
In[]:=
Show[water,benzene]
Out[]=
Rotatable 3D molecule plots are generated with the function.
In[]:=
MoleculePlot3D[Molecule["(2S)-N-[(1S)-2-carbamoyl-1-[[(2S)-1-[(2S)-2-[[(1S)-1-[[(1S)-1-carbamoyl-2-(4-methoxyphenyl)ethyl]carbamoyl]-4-(diaminomethylideneamino)butyl]carbamoyl]pyrrolidin-1-yl]-1-oxo-3-sulfanylidene-propan-2-yl]carbamoyl]ethyl]-2-[[(2S)-2-[[(2S)-3-(4-hydroxyphenyl)-2-[[2-(1-sulfanylcyclohexyl)acetyl]amino]propanoyl]amino]-3-phenyl-propanoyl]amino]pentanediamide"]]
Out[]=
Multiple 3D-representations of the same molecule are available:
In[]:=
MapMoleculePlot3D,ImageSizeSmall,PlotTheme#&,{"Spacefilling","BallAndStick","Tubes","Wireframe"}
Out[]=
,
,
,
Substructures are easily highlighted in both and using a .
In[]:=
MoleculePlot,MoleculePattern[{"S","O"},{Bond[{1,2},"Double"]}]
Out[]=
In[]:=
MoleculePlot3D,MoleculePattern[{"S","O"},{Bond[{1,2},"Double"]}]
Out[]=
The Wolfram Function Repository (WFR) function MoleculeView is a great way to see how 2D- and 3D-representations of the same molecule are related:
In[]:=
ResourceFunction["MoleculeView"]["5-fluoro-1-(2R,5S)-[2(hydroxymethyl)-1,3-oxathiolan-5-yl]cytosine"]
Out[]=
When visualizing DNA, RNA or peptides, use the WFR functions BioSequenceMoleculePlot and BioSequenceMoleculePlot3D.
View the structure of the “beefy meaty peptide”:
In[]:=
ResourceFunction["BioSequenceMoleculePlot"][BioSequence["Peptide","KGDEESLA"]]
Out[]=
View the three-dimensional structure of the “beefy meaty peptide”:
Last updated: 8/20/25
