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

Important: In order to use with JupyterLab you must install the JupyterLab extension:

jupyter labextension install jupyterlab_3dmol

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

Uploaded Source

Built Distribution

py3Dmol-2.0.4-py2.py3-none-any.whl (12.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for py3Dmol-2.0.4.tar.gz
Algorithm Hash digest
SHA256 07909c587ba7e40d17e2ca9383193ead807af834f9569b108cff784ec4cfb525
MD5 734d932aa221bf9d540743cd6ec03b63
BLAKE2b-256 2f692a8cc6643b8dca681327560de4a6baf0262d153fc6b13e97d59d0c8367f2

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for py3Dmol-2.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 356a3a9fee9c48be9b010228790ce394bd4d90d3fd47448964fcbfa6dc5e0a84
MD5 53fdd9ca3125948c204de1c65c80bcc3
BLAKE2b-256 b53d052e5932ef95624e118b886feb58a9c60595e89da74515604933b6b0e6a5

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