In this excercise we add surfaces to pinpoint the location of a binding site and render the ligand in different styles.
import py3Dmol
viewer = py3Dmol.view(query='pdb:1OHR')
viewer.setStyle({'chain': 'A'}, {'cartoon': {'color': 'blue'}})
viewer.setStyle({'chain': 'B'}, {'cartoon': {'color':' yellow'}})
viewer.show()
You appear to be running in JupyterLab. You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
Note, we use the hetflag
here to exclude non-protein residues from the surface to have an unobstructed view of the binding site.
viewer.addSurface( ... your code here ... ,{'opacity':0.9,'color':'lightblue'},
{'chain': 'A', 'hetflag' : False})
viewer.addSurface(... your code here ... ,{'opacity':0.9,'color':'lightyellow'},
{'chain': 'B', 'hetflag' : False})
viewer.show()
You appear to be running in JupyterLab. You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
Set style for ligand 1UN
to sphere and color by greenCarbon color scheme.
... your code here ...
You appear to be running in JupyterLab. You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
Render the ligand 1UN
as stick, display the bond orders, and add the label 'Nelfinavir'.
... your code here ...
You appear to be running in JupyterLab. You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol