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


Download files

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

Source Distribution

py3Dmol-0.7.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

py3Dmol-0.7.0-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file py3Dmol-0.7.0.tar.gz.

File metadata

  • Download URL: py3Dmol-0.7.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for py3Dmol-0.7.0.tar.gz
Algorithm Hash digest
SHA256 2f4af41d607df3a5aef4bb0d3706c56fa45b410fe2bbbbf661677e71350f1554
MD5 4e854d4d97ca777be29574ceb35cc706
BLAKE2b-256 a9fb36755cec9248a72b2f872904bd4164e667965ba38dbd853be24780d098b5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for py3Dmol-0.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3da84c5a7d0d1257d580d44b00214e823debe6b1397a77ca1b372158db266216
MD5 4f22837fca00b5fedc98a726736adcc0
BLAKE2b-256 baf1e36dea28d4b655280bb18382f3d452717f2338402a618b6710bf04710cf6

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