0.1.0 • Published 4 years ago

@osscar/widget_jsmol v0.1.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
4 years ago

widget-jsmol

A Jupyter widget to use Jmol/Jsmol.

Installation

You can install using pip:

pip install widget_jsmol

Or if you use jupyterlab:

pip install widget_jsmol
jupyter labextension install @osscar/widget_jsmol

If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable the nbextension:

jupyter nbextension enable --py [--sys-prefix|--user|--system] widget_jsmol

Usage

from widget_jsmol import WidgetJmol

w = WidgetJmol()
display(w)

Image of Jmol

Load new file by using the structure element:

w.structure = "/H2O/POSCAR"

Run the Jmol/Jsmol script:

w.script = "set background red"

This widget need internet to fetch Jsmol files to show the visualizer.