Difference between revisions of "Support/Jupyter"

From Jmol
Jump to navigation Jump to search
Line 10: Line 10:
  
 
Old versions of Jupyter Notebooks require you to enable the extension:
 
Old versions of Jupyter Notebooks require you to enable the extension:
 +
 
<code>jupyter nbextension enable --py [--sys-prefix|--user|--system] jupyter_jsmol</code>
 
<code>jupyter nbextension enable --py [--sys-prefix|--user|--system] jupyter_jsmol</code>
  
 
If you use JupyterLab you'll have to install the extension:
 
If you use JupyterLab you'll have to install the extension:
 +
 
<code>jupyter labextension install @jupyter-widgets/jupyterlab-manager</code>
 
<code>jupyter labextension install @jupyter-widgets/jupyterlab-manager</code>
  

Revision as of 17:04, 11 September 2021

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