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.5.4.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py3dmol-2.5.4-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file py3dmol-2.5.4.tar.gz.

File metadata

  • Download URL: py3dmol-2.5.4.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for py3dmol-2.5.4.tar.gz
Algorithm Hash digest
SHA256 6142e1605f51e0fd8ec000db5ab045a90a08bc6147176735631a20be301dd19d
MD5 5fe00ee95601f229a69c27cabf92e409
BLAKE2b-256 397ad7be826cf33a917f4ff78fd07237368dfdf21e09ab463b9de9a33c61ec0c

See more details on using hashes here.

File details

Details for the file py3dmol-2.5.4-py2.py3-none-any.whl.

File metadata

  • Download URL: py3dmol-2.5.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for py3dmol-2.5.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 32806726b5310524a2b5bfee320737f7feef635cafc945c991062806daa9e43a
MD5 8b281226b3cc62eeb82475db80c2f5e2
BLAKE2b-256 257dcea3531f77df694ac7f169378250d85f19f69b09a5f4fa45f650837ae7cc

See more details on using hashes here.

Supported by

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