Skip to main content

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/d4cf7a1246ad37ad6e257ac5a48825a7707d3b5c/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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

py3Dmol-0.5.1-py2.py3-none-any.whl (3.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file py3Dmol-0.5.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for py3Dmol-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 864ce8a81685ffc229cae173f472233e9fdfeaa7ce4941fded94d3c4a1b5c941
MD5 dcccdcc70f02afc1cd9bf8a9ee71f718
BLAKE2b-256 1dd0f01675d75365e51ee6c3f36d2964ab8d38e86ebef948b511247449641abb

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page