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
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](https://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.4.2.tar.gz
.
File metadata
- Download URL: py3Dmol-2.4.2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 990ed67b2dda5493d21192fef53a52be6128b8afbdc13da8a40a009060120749 |
|
MD5 | 09d065aac7e39d6302fb383780343fcb |
|
BLAKE2b-256 | 8dba78bc5b451f314c06e6c2a3ca0f0ba18ee751f10e99fed94fc09175b16031 |
File details
Details for the file py3Dmol-2.4.2-py2.py3-none-any.whl
.
File metadata
- Download URL: py3Dmol-2.4.2-py2.py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec23d9a015d692279a5f7d4db92803e4e82ba3bdcc1434a5b6a2be98a347856 |
|
MD5 | f5e44864bde06c3865d23307b0217710 |
|
BLAKE2b-256 | 0420923885064f4e4d4392eb2be798532d91b315f9e60ef44f49f4800ba3c57a |