Difference between revisions of "Support/Jupyter"
Line 25: | Line 25: | ||
Wayne Decatur has setup a [https://mybinder.org/v2/gist/fomightez/c6c0954414a8e576c5c2611c64163790/HEAD?filepath=1%20-%20Basic%20usage.ipynb Binder container] to demonstrate usage | Wayne Decatur has setup a [https://mybinder.org/v2/gist/fomightez/c6c0954414a8e576c5c2611c64163790/HEAD?filepath=1%20-%20Basic%20usage.ipynb Binder container] to demonstrate usage | ||
− | ChemCompute has jupyter-jsmol preinstalled in its Jupyter notebooks. ChemCompute is a free website for students to run Computational Chemistry jobs. Through ChemCompute's Jupyter Notebook you can run a calculation with Psi4 and view the output in JSmol. | + | ChemCompute has jupyter-jsmol preinstalled in its Jupyter notebooks. ChemCompute is a free website for students to run Computational Chemistry jobs. Through ChemCompute's Jupyter Notebook you can run a calculation with [https://psicode.org/ Psi4] and view the output in JSmol. |
# Go to [https://chemcompute.org ChemCompute] and login or register at the top right. You can likely login with your institutional login. | # Go to [https://chemcompute.org ChemCompute] and login or register at the top right. You can likely login with your institutional login. | ||
# Access an [https://chemcompute.org/jupyterhub_internal/user-redirect/notebooks/experiments/05%20-%20H2%20MOs%20STO-3G.ipynb example Jupyter Notebook] | # Access an [https://chemcompute.org/jupyterhub_internal/user-redirect/notebooks/experiments/05%20-%20H2%20MOs%20STO-3G.ipynb example Jupyter Notebook] |
Revision as of 17:16, 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.
Installation
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
Examples
There are several examples on the jupyter-jsmol github
Wayne Decatur has setup a Binder container to demonstrate usage
ChemCompute has jupyter-jsmol preinstalled in its Jupyter notebooks. ChemCompute is a free website for students to run Computational Chemistry jobs. Through ChemCompute's Jupyter Notebook you can run a calculation with Psi4 and view the output in JSmol.
- Go to ChemCompute and login or register at the top right. You can likely login with your institutional login.
- Access an example Jupyter Notebook