Skip to main content

An IPython interface for embedding 3Dmol.js views

Project description

A simple [IPython/Jupyter](http://jupyter.org/) widget to embed an interactive [3Dmol.js](http://3dmol.csb.pitt.edu) 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](http://3dmol.csb.pitt.edu/doc/$3Dmol.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-0.9.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

py3Dmol-0.9.2-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: py3Dmol-0.9.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for py3Dmol-0.9.2.tar.gz
Algorithm Hash digest
SHA256 755c79f744b34107f7b2001733eafa28d490439e3162ce6ced2b864b6eecbe80
MD5 e95132324a4e035222be6cb0da2c608b
BLAKE2b-256 1ff790d09afca91fd4193973b8d386e00daab1922c4fb64c08267b866537bafb

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: py3Dmol-0.9.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for py3Dmol-0.9.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ae361be10d903326e890bb84052bac5e77ed2d3eaadff1135597f3223213d9a3
MD5 fde85ef88808f5632967b4600367b53d
BLAKE2b-256 ea5e044713fee4c34fb38abbe231b6a550226ef5f76558ca4080b4aeacaeeda6

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