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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

py3Dmol-0.9.0-py3.6.egg (10.0 kB view details)

Uploaded Source

py3Dmol-0.9.0-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2 Python 3

py3Dmol-0.9.0-py2.7.egg (10.1 kB view details)

Uploaded Source

File details

Details for the file py3Dmol-0.9.0-py3.6.egg.

File metadata

  • Download URL: py3Dmol-0.9.0-py3.6.egg
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.17

File hashes

Hashes for py3Dmol-0.9.0-py3.6.egg
Algorithm Hash digest
SHA256 91a3901e89b37b00d4a1857a6c19eee2b69e5ecb527a55294c622345700a5bcf
MD5 b2b2028966d335e9e60eacd46ef61fe6
BLAKE2b-256 af7f2531d9c32fe70d4ac01c134903db73eea64d8bf2288db1a975ec808034a6

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: py3Dmol-0.9.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.17

File hashes

Hashes for py3Dmol-0.9.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d7bc2251653cc3b25af5ce73d8a7f240b1d335919da4d2987b313d18002a2678
MD5 fa6b1a9553c9ed6338d85e0383968025
BLAKE2b-256 f978812e79e152aeeec09d92c27d802186eb137a653c6b3b102afb7c4c755884

See more details on using hashes here.

Provenance

File details

Details for the file py3Dmol-0.9.0-py2.7.egg.

File metadata

  • Download URL: py3Dmol-0.9.0-py2.7.egg
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.17

File hashes

Hashes for py3Dmol-0.9.0-py2.7.egg
Algorithm Hash digest
SHA256 c2e9a09fff19a8634cf77206aa7a8d90a9d90612a5a94a09a83cf64bec201ab4
MD5 2178584b6caf7e9f74491879f373d72b
BLAKE2b-256 4e1a65042ded4816020fad6d52cf891bdfaa0a0a543db0dad70980507f3f7934

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