An IPython interface for embedding 3Dmol.js views
Project description
A simple [IPython/Jupyter](http://jupyter.org/) widget to embed an interactive [3Dmol.js](http://3dmol.csb.pitt.edu) 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](https://github.com/3dmol/3Dmol.js/issues).
[An example notebook](http://nbviewer.jupyter.org/github/3dmol/3Dmol.js/blob/master/py3Dmol/examples.ipynb)
Installation
>From PyPI:
pip install py3Dmol
Usage
Open a notebook
jupyter notebook
and issue
`Python import py3Dmol view = py3Dmol.view(query='pdb:1ubq') view.setStyle({'cartoon':{'color':'spectrum'}}) view `
API
The returned view object has the exact same API as [$3Dmol.GLViewer](http://3dmol.csb.pitt.edu/doc/$3Dmol.GLViewer.html) with the exception that functions return None.
License
MIT
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.
Source Distributions
Built Distribution
Hashes for py3Dmol-0.6.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c62b9d7c9aca9118a6548b2beadb8a147452cecf3b7f158e140e56ea098dd9c2 |
|
MD5 | b2e8e5b0da8336431ce24ad3f15f7ea3 |
|
BLAKE2b-256 | ab4e6d6167d7f9ac8dec5be1a49b6868f84c2fdf8d188500bc2a10d4adcd6ae6 |