An IPython interface for embedding 3Dmol.js views in Jupyter notebooks
Project description
A simple [IPython/Jupyter](http://jupyter.org/) widget to embed an interactive [3Dmol.js](http://3dmol.org) 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
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 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.org/doc/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 Distribution
Built Distribution
File details
Details for the file py3Dmol-2.0.0.post1.tar.gz
.
File metadata
- Download URL: py3Dmol-2.0.0.post1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b732ba74a38002594711631675421e12a098ffae37d0171bb83f594eb746d063 |
|
MD5 | 100122e10380be5c2b989aca0f78dc9f |
|
BLAKE2b-256 | b5c1eec42fc95ab9e27ff71ca3fcd5a536e203182d617945e74dddfbf36306bb |
Provenance
File details
Details for the file py3Dmol-2.0.0.post1-py2.py3-none-any.whl
.
File metadata
- Download URL: py3Dmol-2.0.0.post1-py2.py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa4cd664ea7f15c0b90af92d92dca75d5d10dc009f86efe5dbf32138200e461b |
|
MD5 | 8556c1759f20479b038ef6142b044bb0 |
|
BLAKE2b-256 | 5370ba6f721a6c6dd711ac0fb50d8002c28e48a2114683f0d60cdac4a833511c |