Mooers Blaine H M
Department of Biochemistry and Molecular Biology, University of Oklahoma Health Sciences Center, Oklahoma City, Oklahoma, USA.
Stephenson Cancer Center, University of Oklahoma Health Sciences Center, Oklahoma City, Oklahoma, USA.
Comput Sci Eng. 2021 Mar-Apr;23(2):47-53. doi: 10.1109/mcse.2021.3059536. Epub 2021 Feb 16.
Snippets - code templates one line or longer - boost researcher productivity because they are faster to insert than writing the code from scratch and because they reduce debugging time. Several extensions support the use of snippets in Jupyter. We developed a Python version of the pymolsnips library and customized it for use in the jupyterlab-snippets-multimenus extension for JupyterLab. The extension provides access to the snippets by pull-down menus. Each snippet performs one task. Each task often requires many lines of code. This library's availability in Jupyter enables PyMOL users to run PyMOL efficiently inside Jupyter while storing the code and the associated molecular graphics images next to each other in one notebook document. This proximity of code and images supports reproducible research in structural biology, and the use of one computer file facilitates collaborations.
代码片段(即一行或更长的代码模板)提高了研究人员的工作效率,因为它们比从头编写代码插入速度更快,还能减少调试时间。有几个扩展支持在Jupyter中使用代码片段。我们开发了pymolsnips库的Python版本,并对其进行定制,以便在JupyterLab的jupyterlab-snippets-multimenus扩展中使用。该扩展通过下拉菜单提供对代码片段的访问。每个代码片段执行一项任务。每项任务通常需要多行代码。此库在Jupyter中的可用性使PyMOL用户能够在Jupyter中高效运行PyMOL,同时将代码和相关的分子图形图像存储在一个笔记本文档中彼此相邻的位置。代码与图像的这种接近性支持结构生物学中的可重复研究,并且使用一个计算机文件便于合作。