Support/Jupyter

From Jmol
Revision as of 17:04, 11 September 2021 by Perrim (talk | contribs)
Jump to navigation Jump to search

Running JSmol in Jupyter notebooks

The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text.

JSmol may be implemented in a Jupyter Notebook through Jupyter Notebook Extensions, which blend javascript with the notebook environment. One extension is jupyter-jsmol by Adam Fekete. Jupyter-jsmol provides a python wrapper to the JSmol widget.

Jupyter-jsmol can be installed with pip in your notebook virtual environment. (Note the use of the underscore in the pip package)

pip install jupyter_jsmol

Old versions of Jupyter Notebooks require you to enable the extension:

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

If you use JupyterLab you'll have to install the extension:

jupyter labextension install @jupyter-widgets/jupyterlab-manager






.

Contributors

Perrim, AngelHerraez