An IPython interface for embedding iCn3D viewer
Project description
icn3dpy
A simple IPython/Jupyter widget to embed an interactive iCn3D viewer in a notebook.
The widget is completely static, which means the viewer doesn't need a running IPython kernel to be useful and web pages and presentations generated from the notebook will work as expected. However, this also means there is only one-way communication between the notebook and the viewer.
If you experience problems, please file an issue.
Installation
From PyPI:
pip install icn3dpy
Important: In order to use with JupyterLab you must install the JupyterLab extension:
jupyter labextension install jupyterlab_3dmol
Usage
Open a notebook
jupyter notebook
and issue
Python (mmdbid only works in Chrome)
import icn3dpy
view = icn3dpy.view(q='pdbid=1tup',command='color spectrum')
view
view = icn3dpy.view(q='mmtfid=1ffk',command='color spectrum')
view
view = icn3dpy.view(q='pdbid=6m0j',para='closepopup=1',command='line graph interaction pairs | !A !E | hbonds,salt bridge,interactions,halogen,pi-cation,pi-stacking | false | threshold 3.8 6 4 3.8 6 6; show selection; add residue number labels')
view
Command
All iCn3D commands work.
License
United States Government Work
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.