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.5.tar.gz (7.8 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.5-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: py3dmol-2.5.5.tar.gz
  • Upload date:
  • Size: 7.8 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.5.tar.gz
Algorithm Hash digest
SHA256 cb102cc3370800a9ca7679774759f008e34a0f3a283778d85b0410849d370298
MD5 d364bda8fa47babbd0f0375c6fb5302c
BLAKE2b-256 8fce8fa27aa0fcf37a99df16f72d59300040dec61f3a5126c28d6b625bcb7f9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py3dmol-2.5.5-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.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9717ea9a899ec641b458f53de538e5bae758281f5053be78bc2db0706ae60bcb
MD5 d66871f9de7d693bacb7794ff18e48ac
BLAKE2b-256 8e5a7fd1b784a87e96e0078f49a0a13a98b4c5f644ba5597a4a3b70a2ba3e613

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