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§
%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.
%openad import from '~/Downloads/2g64.cif' to '2g64.cif'
%openad import from '~/Downloads/9bq4.pdb' to '9bq4.pdb'
Then simply open them:
Alternatively, you can open your workspace and double click on your protein files from there.
Inside the macromolecule viewer, you'll find a 3D visualization as well as the most important information from the PDB.
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.
Continue Learning§
Want to learn more about how to work with proteins in OpenAD?
Check out the other protein tutorials.