Skip to content

How to Visualize a Molecule in Jupyter Notebook§

Learn how to use OpenAD to visualize a molecule in 2D and 3D from a SMILES, InChI, InChIKey, name or PubChem ID.

Install OpenAD§

If you haven't already, install OpenAD and activate the OpenAD magic commands.

Note

While this tutorial is about Jupyter Notebook, it can just as well be applied to the command line, simply omit the %openad magic command prefix.

Visualizing a Single Molecule§

You can also visualize a batch of molecules from a list or DataFrame, or from an SDF or CSV file.

Bash
%openad show molecule 'C1=CC(=C(C=C1CCN)O)O'

Display a single molecule in Jupyter Notebook

That was easy. And you can use any type of molecular identifier:

  • SMILES
  • InChI

.. and if the molecule exists on PubChem:

  • InChIKey
  • name
  • PubChem CID

Bash
%openad show molecule InChI=1S/C8H8/c1-2-5-3(1)7-4(1)6(2)8(5)7/h1-8H
Bash
%openad show molecule WAYJCOBMBRPWED-KWCYVHTRSA-N
Bash
%openad show molecule rubber
Bash
%openad show molecule 2854

Continue Learning§

Want to learn more about how to work with small molecules in OpenAD?
Check out the other small molecule tutorials.