{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Importing Structures\n", "This tutorial demonstrates how to visualize 3D structures using the [py3Dmol](http://3dmol.csb.pitt.edu/index.html) Jupyter Notebook widget. Here we show how to download structures from the PDB as well as read local structure files.\n", "\n", "3Dmol.js: molecular visualization with WebGL, N. Rego, D. Koes, [Bioinformatics (2015) 31, 1322–1324](https://doi.org/10.1093/bioinformatics/btu829)\n", "\n", "Also, check out the [py3Dmol tutorial](http://nbviewer.jupyter.org/github/3dmol/3Dmol.js/blob/9050b97144e81f065df7eecc87ba9a16723ab14b/py3Dmol/examples.ipynb) for additional features." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import py3Dmol" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Download a structure from the RCSB Protein Data Bank\n", "py3Dmol downloads PDB structures using the [compressed](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0174846) binary [MMTF file format](https://doi.org/10.1371/journal.pcbi.1005575) from https://mmtf.rcsb.org. Prepend the 'pdb:\" prefix to the 4-letter PDB ID.\n", "\n", "Downloading PDB structures in MMTF format has the following advantages:\n", "* Very large structures are downloaded efficiently\n", "* Molecules contain bond order information\n", "* DSSP secondary structure has been recalculated for consistency" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "application/3dmoljs_load.v0": "
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol