Skip to main content

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


Download files

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

Source Distribution

py3Dmol-2.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

py3Dmol-2.1.0-py2.py3-none-any.whl (12.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: py3Dmol-2.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for py3Dmol-2.1.0.tar.gz
Algorithm Hash digest
SHA256 83d2f25a9107b4cef125c0c1f5caa4dce9b7577f1346fc0a3f7d12972e11c0e8
MD5 c34966708af42603558aa81c5876daf4
BLAKE2b-256 13de9a102f1b82d74993aca23b28bd2364fedb9af08eb92980491e02b1debde4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: py3Dmol-2.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for py3Dmol-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1093919800d66b229c0bb8d247869ccc26cbb4674644988ba2f4f3658f21ff0e
MD5 ae2b16a1b26cc0bc8cfa0321343deed1
BLAKE2b-256 d0068b41d1dd0ac73d653c76f68563a8a12f44de4de80d92807f9d35c2cbc33e

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