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

Uploaded Source

Built Distribution

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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: py3dmol-2.5.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6abb21ebb36033b03199567bf6a49e81622f635bfebc70ef4d055ac95ca040e2
MD5 e39b6fe8c91578c4f341dac3d789d213
BLAKE2b-256 8b118e3521bce91757f036963a07482aca760bcb983c2b740c01731fbcd91df5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py3dmol-2.5.1-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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d17bb829bee1ec63f43c7d89c413976b28f3cfbea55bd04d64ddd7c52d402f17
MD5 75b0bd9b41aad3dd458ceb81d8ca2ec5
BLAKE2b-256 7f8be2a3faa7ddf03a7ace87ae99a87eee1220d33e33cb42cba246215621f408

See more details on using hashes here.

Supported by

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