All Projects → MooersLab → pymolsnips

MooersLab / pymolsnips

Licence: MIT License
Pymolsnips is a library of PyMOL scripting language code fragments for several popular text editors.

Programming Languages

Vim Snippet
174 projects
Promela
5 projects
HTML
75241 projects
YASnippet
69 projects

Projects that are alternatives of or similar to pymolsnips

pymolshortcuts
The repository pymolschortucts contains the a collection of shortcuts that are loaded on startup of PyMOL. These shortcuts enable websearches from within PyMOL as well as many other convienent functions that make work in PyMOL more productive..
Stars: ✭ 34 (+78.95%)
Mutual labels:  pymol, pml, molecular-artwork
network tech
Cisco config syntax and snippets for Sublime Text
Stars: ✭ 82 (+331.58%)
Mutual labels:  snippets, autocompletion, sublime-text-3
atom-standardjs-snippets
⚡ A collection of JavaScript snippets for Atom, Standard Style
Stars: ✭ 47 (+147.37%)
Mutual labels:  atom, snippets
language-mjml
Atom Editor package providing syntax support for MJML
Stars: ✭ 48 (+152.63%)
Mutual labels:  atom, snippets
AvalonHelper
avalon completion for sublime 3
Stars: ✭ 40 (+110.53%)
Mutual labels:  autocompletion, sublime-text-3
Snippets
Atom snippets package
Stars: ✭ 191 (+905.26%)
Mutual labels:  atom, snippets
Sublime-GameMaker-Studio-Language-Bundle
A sublime bundle for GameMaker Language (GML)
Stars: ✭ 32 (+68.42%)
Mutual labels:  snippets, autocompletion
Nineties
💾 Colors for World Wide Web pioneers
Stars: ✭ 16 (-15.79%)
Mutual labels:  textmate, sublime-text-3
Magicpython
Cutting edge Python syntax highlighter for Sublime Text, Atom and Visual Studio Code. Used by GitHub to highlight your Python code!
Stars: ✭ 1,238 (+6415.79%)
Mutual labels:  atom, sublime-text-3
atom-perl6-editor-tools
A collection of useful Perl 6 editor tools
Stars: ✭ 19 (+0%)
Mutual labels:  atom, snippets
sublime-node-snippets
A collection of completions/snippets for node.js v8.x
Stars: ✭ 14 (-26.32%)
Mutual labels:  snippets, sublime-text-3
github markdown snippets
GitHub flavored Markdown with plain'ol HTML knowledge! Boom!
Stars: ✭ 23 (+21.05%)
Mutual labels:  snippets, sublime-text-3
Wsl Proxy
WSL proxy files for editor/linux interop
Stars: ✭ 134 (+605.26%)
Mutual labels:  atom, sublime-text-3
Atom Turbo Javascript
Commands and snippets for faster Javascript and Typescript with the Atom Editor
Stars: ✭ 100 (+426.32%)
Mutual labels:  atom, snippets
autocomplete-haskell
Atom autocomplete-plus provider for haskell
Stars: ✭ 23 (+21.05%)
Mutual labels:  atom, autocompletion
Atom Ava
Snippets for AVA and run tests directly in the editor
Stars: ✭ 96 (+405.26%)
Mutual labels:  atom, snippets
LuaExtended
An improved ST3 Lua syntax definition.
Stars: ✭ 19 (+0%)
Mutual labels:  snippets, sublime-text-3
Atom Modular Snippets
:atom: A modular solution to snippets in @Atom.
Stars: ✭ 8 (-57.89%)
Mutual labels:  atom, snippets
Language Dot
Dot (Graphviz) package for Atom
Stars: ✭ 11 (-42.11%)
Mutual labels:  atom, snippets
iro4cli
An open-source rewrite of Iro, a grammar generator, supporting automatic VSCode & Atom extension generation.
Stars: ✭ 21 (+10.53%)
Mutual labels:  atom, textmate

pymolpysnips: Templates for writing PyMOL scripts.

License: MIT DOI Version

For more details on installing libraries for specific editors, go to the GitHub Page.

Animated demo of snippet use in Visual Studio Code

The animation below demonstrates the use of the ao tab trigger in the text editor Visual Studio Code to insert 17 lines of code for generating the ambient occlusion effect. Two-levels of cascading menus appear. The menu on the left shows the alternate tab triggers that contain the letters a and o. The corresponding code for the selected tab trigger is displayed in the right window. By entering these two letters, you have inserted 16 lines of code!

The result of applying a variant of the above code to a 27-nucleotide RNA hairpin is shown below.

HTML5 Icon

There is not an option in a pulldown menu in PyMOL to make such an image: A script is required.

This code can be applied to any molecular object in PyMOL's veiwport, not just RNA.

If you are not ready to write PyMOL scripts, please consider using PyMOL shortcuts to enhance your productivity in PyMOL interactive sessions. For example, the above ambient occlussion effect can be invoked at anytime by entering AO at the PyMOL prompt, if the pymolshortcuts.py file has been loaded.

Application Description

The pymolsnips library contains 256 code fragments (i.e, templates or snippets) written in the PyMOL macro language (pml) for eighteen text editors. It is highly likely that you have experience with one of these text editors. If you want support for an additional text editor, please open an issue under the issues tab above or send me an e-mail. My contact information is at the bottom.

Note that each line in a snippet is terminated with a semicolon. This means that a user can copy multilines of code out of their script file and paste those multiple lines at the PyMOL prompt in one operation. This is an alternative to saving and reloading the script file.

For more details on using the snippets, a gallery of output, the supported text editors, library installation, and the content of the library, please see the associated GitHub Page. This page takes several seconds to load due to a large number of animated gifs.

The page has the content of the old README.md referred to in the associated manuscript. The old README.md file was moved to the webpage on 25 November 2020.

Table of Contents

Technology Stack

Technology Description
PyMOL 2.4 Molecular graphics program
Python 3.7 Programming language

Some of the snippets have Python3 code. If you are using an ancient version of PyMOL that relies on Python2, you can buy a license to the current version of PyMOL, install a free open-source version of PyMOL that depends on Python3 (See the PyMOL Wiki), or you can rewrite the snippet's code to be Python2 compliant. This often merely involves replacing print statements in Python2 with print() functions in Python3. Note that multiple versions of PyMOL can operate side-by-side on a computer: You do not have to delete that ancient version of PyMOL.

Return to Table of Contents

Installation

Unfortunately, GitHub does not yet provide an easy way to download part of a repository. It is easier to download the whole repository, pull out the parts that you need, and delete the rest. Setting up and maintaining 18 separate repositories was too unwieldy.

Download all of the libraries by using the command git clone https://github.com/MooersLab/pymolsnips.git in a terminal window if you have git installed. Alternatively, you download all of the libraries as a zip file by clicking on the green code button above.

See the GitHub Page for installation instructions for a specific text editor.

Return to Table of Contents

Configuration Setup

The snippet libraries are independent of PyMOL. No modification of PyMOL is required. The configuring of text editors is found on the GitHub Page.

Return to Table of Contents

Usage

Examples of the snippets in use in various editors are found in the animated gifs on the GitHub Page. These gifs convey the essential knowledge in seconds.

Return to Table of Contents

Testing

Try the ao snippet. You should get a result similar to the one should in the demo above.

Return to Table of Contents

Requests for new snippets and text editors

Please use the Issues tab above to request support for additional text editors, to suggest additional snippets, or to ask questions. Alternatively, you can send e-mail to me.

Questions about PyMOL should be directed to the PyMOL Mailing List.

Return to Table of Contents

Bug reports

Use the Issues tab above to report bugs or send e-mail to me. Refer bugs in the text editors to the developers of the text editors.

Return to Table of Contents

License

We use the permissive MIT license. The license information for this project is found in the License.txt file above.

Return to Table of Contents

Contact Information

I can be reached via the Issue tab above or via e-mail: blaine-mooers at ouhsc.edu.

Return to Table of Contents

Citation

If you use this library to make figures for publication, please site the following publication:

Mooers, B. H., & Brown, M. (2020). Templates for Writing PyMOL Scripts. Protein Science. 30 Nov. 10.1002/pro.3997

OR

Mooers, BHM, Brown, ME. Templates for writing PyMOL scripts. Protein Science. 2020; 1–8. https://doi.org/10.1002/pro.3997

For BibTex library.bib file:

@article{mooers2020templates,
  title={Templates for Writing PyMOL Scripts},
  author={Mooers, Blaine HM and Brown, Marina},
  journal={Protein Science},
  year={2020},
  publisher={Wiley Online Library},
  url={https://onlinelibrary.wiley.com/doi/abs/10.1002/pro.3997}
  doi=(10.1002/pro.3997)
  abstract={PyMOL commands are used to exert exquisite control over the 
  appearance of a molecular model.This control has made PyMOL popular 
  for making images of protein structures for publications and presentations. 
  However, many users have poor recall of the commands due to infrequent 
  use of PyMOL. This poor recall hinders the writing of new code in scripts. 
  One solution is to build the new script by using code fragments as 
  templates for modular parts of the task at hand. The code fragments 
  can be accessed from a library while writing the code from inside a 
  text editor (e.g., Visual Studio Code, Vim, and Emacs). We developed a 
  library of PyMOL code templates or snippets called pymolsnips to ease 
  the writing of PyMOL code in scripts. We made pymolsnips available on 
  GitHub in formats for 18 popular text editors. Most of the supported 
  text editors are available for Mac, Windows, and Linux operating systems. 
  The GitHub site includes animations that complement the instructions
  for installing the library for each text editor. We expect that the 
  library will help many PyMOL users to be more productive when writing 
  PyMOL script files.}
}

For ENDNOTE library.enw file.

%0 Journal Article
%T Templates for Writing PyMOL Scripts
%A Mooers, Blaine HM
%A Brown, Marina
%J Protein Science
%@ 0961-8368
%D 2020
%I Wiley Online Library

Return to Table of Contents

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].