{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 5-Bioassembly\n", "By default, py3Dmol loads the content of a PDB entry, which represents the asymmetric unit for structures determined by crystographic methods and some structures determined by 3D electron microscopy. The asymmetric unit contains the unique part of a structure, but may not represent the biologically active form of a structures. See [PDB-101 tutorial](https://pdb101.rcsb.org/learn/guide-to-understanding-pdb-data/biological-assemblies#Anchor-BioUnit).\n", "\n", "An asymmetric unit may contain:\n", "* one biological assembly\n", "* a portion of a biological assembly\n", "* multiple biological assemblies\n", "\n", "This example has been copied from [py3Dmol tutorial](http://nbviewer.jupyter.org/github/3dmol/3Dmol.js/blob/9050b97144e81f065df7eecc87ba9a16723ab14b/py3Dmol/examples.ipynb)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import py3Dmol" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Display the asymmetric unit \n", "In this example below (3DEM structure of Zika virus) we load the content of the asymmetric unit. In this case, the asymmetric unit represents a portion of the biological assembly." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "view = py3Dmol.view(query='pdb:5ire')\n", "view.setStyle({'cartoon':{'color':'spectrum'}})\n", "view.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Display the biological assembly\n", "Using the 'doAssembly' option, the biological assembly will be created using symmetry operations in the PDB entry." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "view = py3Dmol.view(query='pdb:5ire',options={'doAssembly':True})\n", "view.setStyle({'cartoon':{'color':'spectrum'}})\n", "view.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" } }, "nbformat": 4, "nbformat_minor": 2 }