Skip to content

How to Visualize Proteins in Jupyter Notebook§

Learn how to use OpenAD to visualize proteins and other macromolecules from:

  • FASTA strings
  • PDB or CIF files

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 FASTA string§

Bash
%openad show protein 'MSLNRHFTVSVFIVCKDKVLLHLHKKAKKMLPLGGHIEVNELPEEACIREAKEEAGLNVTLYNPIDINLKKSCDLSGEKLLINPIHTILGDVSPNHSHIDFVYYATTTSFETSPEIGESKILKWYSKEDLKNAHNIQENILVMATEALDLLEGHHHHHH'

Visualizing PDB and CIF Files§

Let's start with downloading some sample proteins:

In order to visualize a PDB or CIF file, all we need to do is to import them into your workspace. Update the source paths if needed.

Bash
%openad import from '~/Downloads/2g64.cif' to '2g64.cif'
%openad import from '~/Downloads/9bq4.pdb' to '9bq4.pdb'

Then simply open them:

Bash
%openad open '2g64.cif'
%openad open '9bq4.pdb'

Alternatively, you can open your workspace and double click on your protein files from there.

Bash
%openad launch gui

Inside the macromolecule viewer, you'll find a 3D visualization as well as the most important information from the PDB.

Protein details

Protein details

Protein details

If you need to see more details or get access to more advanced renderings, there's a link to the molecule's PDB entry page.

Protein Databank entry

Continue Learning§

Want to learn more about how to work with proteins in OpenAD?
Check out the other protein tutorials.