Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updated the version number.
  • Loading branch information
MooersLab authored May 9, 2024
1 parent 5c076ef commit 79adfb0
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4429717.svg)](https://doi.org/10.5281/zenodo.4429717)
![Version](https://img.shields.io/static/v1?label=jupyterlabpymolpysnips&message=0.2&color=brightcolor)
![Version](https://img.shields.io/static/v1?label=jupyterlabpymolpysnips&message=0.3&color=brightcolor)

There are many ways to get **PyMOL** running in **JupyterLab**. For details on installing **JupyterLab** and **PyMOL**, go to the [GitHub Page](https://mooerslab.github.io/jupyterlabpymolpysnips/) associated with this project.
For a list of the snippets and their descriptions, also go to the [GitHub Page](https://mooerslab.github.io/jupyterlabpymolpysnips/) associated with this project.
There are many ways to get PyMOL running in JupyterLab. For details on installing both, go to the [GitHub Page](https://mooerslab.github.io/jupyterlabpymolpysnips/) associated with this project.
Go to this project's [GitHub Page](https://mooerslab.github.io/jupyterlabpymolpysnips/) for a list of the snippets and their descriptions.

<a id="table-of-contents"><h2>Table of Contents</h2></a>

Expand Down Expand Up @@ -49,13 +49,13 @@ This code can be applied to any molecular object that has been loaded into **PyM


#### Streamlines the management of images for a project
You can store the images generated by PyMOL in one **Jupyter Notebook** file instead of having dozens of script and images files squirreled away in dozens of subfolders.
Using one file eases finding the code to make a particular figure because the code can be placed above the image.
You can store the images generated by PyMOL in one **Jupyter Notebook** file instead of having dozens of script and image files squirreled away in dozens of subfolders.
Using one file makes it easier to find the code to make a particular figure because the code can be placed above the image.
This ability to quickly find the required code at a later time reduces the resistance to remaking a figure for manuscript resubmission, journal cover artwork, posters, platform presentations, lectures, book chapters, review articles, websites, and wall hangings.

#### Ease the sharing of images with collaborators
The use of one file also eases the sharing of images with collaborators because only one file needs to be shared.
You can reformt the notebook as a static HTML or PDF file if your collaborators are not **PyMOL** or **Jupyter Notebook** users.
Using one file also eases sharing images with collaborators because only one file needs to be shared.
If your collaborators are not PyMOL or Jupyter Notebook users, you can reformat the notebook as a static HTML or PDF file.


#### Facilitates combining PyMOL with other software in molecular structure analysis
Expand All @@ -67,7 +67,7 @@ The primary caveat is that the nonPython software will require different kernels
This caveat means that you will have to switch kernels to use these packages in the same notebook and that you cannot run software with different kernels in the same cell.
These are minor limitations.

A secondary caveat is that, sadly, some heavily used structural biology programs have yet to migrate from Python2 to Python3.
A secondary caveat is that some heavily used structural biology programs have yet to migrate from Python2 to Python3.
You may have trouble running a Python2 kernel in **JupyterLab** installed to run with Python3.
Fortunately, you can run many of these programs by using the shell magic in the notebook.
This cell magic allows you to store the input and output in the notebook.
Expand All @@ -78,7 +78,7 @@ This workaround enables you to carry on with your modern reproducible research p

### But I will miss the interactive viewport in PyMOL!

1. There is nothing stopping you from running the PyMOL GUI next to your **JupyterLab** session. You can adjust the molecule's orientation manually, run the **get_view** command, copy the output in the command history window from PyMOL, and paste it into a cell in the **Jupyter Notebook**. The one line of settings returned by the **rv** shortcut are much easier to use. The **rv** shortcut is found in the the [pymolshortcuts.py](https://github.com/MooersLab/pymolshortcuts) script.
1. There is nothing stopping you from running the PyMOL GUI next to your **JupyterLab** session. You can adjust the molecule's orientation manually, run the **get_view** command, copy the output in the command history window from PyMOL, and paste it into a cell in the **Jupyter Notebook**. The one line of settings returned by the **rv** shortcut is much easier to use. The **rv** shortcut is in the [pymolshortcuts.py](https://github.com/MooersLab/pymolshortcuts) script.

2. **You will discover that you really do not need the PyMOL viewport.** With 10-15 minutes of practice, you can master the rapid iterating of the rotate and translate commands to adjust the molecule's orientation with much greater precision than via manipulation of the mouse. Iteratively issuing the rotate and the translate commands is less likely to cause repetitive stress injury than the use of the mouse to reorient the molecule. These injuries occur frequently when generating numerous molecular graphics images up against a deadline.

Expand Down Expand Up @@ -132,7 +132,7 @@ The latter task involves replacing print statements in Python2 with print() func
The command-line program **2to3** automates this process.
Note that multiple versions of **PyMOL** can operate side-by-side on a computer, so you do not have to delete that old version of **PyMOL**.

JupyterLab can use the **jupyterlab-snippets** extension to make the snippets available via a **snippets** pull-down menu.
JupyterLab can use the **jupyterlab-snippets** extension to make the snippets available via the **snippets** pull-down menu.
Conda, pip, or the extension manager in **Jupyter Lab** can install the extension.

Assuming that **JupyterLab**, **jupyterlab-snippets**, and **PyMOL** are already installed, run the following commands one line at a time,
Expand All @@ -152,9 +152,9 @@ There will be a **pymol** sub-menu and a **pymol+** sub-menu under this pull-dow
JupyterLab needs to be version >=2.2.0 for **jupyterlab-snippets** to run.
The current version of **JupyterLab** is 3.3.4.

You can install **Node.js** from the Node.js developer's web site or with a package manager.
You can install **Node.js** from the Node.js developer's website or with a package manager.
It needs to be more recent than version 10.0.0.
Be ware that Anaconda has in the past installed ancient versions of node and that you may have to set the version number to install a newer version of node via Anaconda.
Beware that Anaconda has in the past installed ancient versions of Node, and you may have to set the version number to install a newer version of Node via Anaconda.
You may have better luck using the installer from the developer.
Run it in the active conda env where you want to run jupyterlab.

Expand All @@ -164,7 +164,7 @@ Run it in the active conda env where you want to run jupyterlab.

Alternatively, you can use the **jupyterlab-snippets-multimenus** package.
The package will appear on the menu bar as separate pull-down menus: **pymol** and **pymol+**.
This approach removes a layer of hierarchy in the pull-down menus so that you can select the snippet of interest faster.
This approach removes a layer of hierarchy in the pull-down menus, allowing users to select the snippet of interest faster.
The downside is that you must use an older version of JupyterLab.

Assuming that **JupyterLab**, **jupyterlab-snippets-multimenus**, and PyMOL are already installed, run the following commands one line at a time:
Expand Down Expand Up @@ -324,6 +324,10 @@ A paper describing this library was published in April 2021.
- [jupyter-atom-pymolpysnips](https://github.com/MooersLab/jupyter-atom-pymolpysnips)


## Update history
|Version | Changes | Date |
|:-----------:|:------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------:|
| Version 0.3 | Added funding and update table. Corrected typos in README.md file | 2024 May 9 |


## Funding
Expand Down

0 comments on commit 79adfb0

Please sign in to comment.