{"id":22901341,"url":"https://github.com/mooerslab/pymolsnips","last_synced_at":"2025-05-13T02:22:33.445Z","repository":{"id":165234173,"uuid":"141918853","full_name":"MooersLab/pymolsnips","owner":"MooersLab","description":"Pymolsnips is a library of PyMOL scripting language code fragments for several popular text editors.","archived":false,"fork":false,"pushed_at":"2024-05-08T15:18:22.000Z","size":108332,"stargazers_count":41,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T05:42:21.438Z","etag":null,"topics":["atom","autocompletion","code-fragments","cudatext","gedit","molecular-artwork","pml","pymol","pymol-code-fragments","pymol-macro-language","pymol-snippet-library","pymol-snippets","snippet-library","snippets","st3","sublime-text-3","tab-triggers","text-editors","textmate","vsc"],"latest_commit_sha":null,"homepage":"","language":"Vim Snippet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MooersLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-22T18:02:07.000Z","updated_at":"2024-09-25T06:36:17.000Z","dependencies_parsed_at":"2024-05-08T17:08:14.057Z","dependency_job_id":null,"html_url":"https://github.com/MooersLab/pymolsnips","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fpymolsnips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fpymolsnips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fpymolsnips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fpymolsnips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MooersLab","download_url":"https://codeload.github.com/MooersLab/pymolsnips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253857482,"owners_count":21974745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","autocompletion","code-fragments","cudatext","gedit","molecular-artwork","pml","pymol","pymol-code-fragments","pymol-macro-language","pymol-snippet-library","pymol-snippets","snippet-library","snippets","st3","sublime-text-3","tab-triggers","text-editors","textmate","vsc"],"created_at":"2024-12-14T01:33:00.629Z","updated_at":"2025-05-13T02:22:33.426Z","avatar_url":"https://github.com/MooersLab.png","language":"Vim Snippet","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4317774.svg)](https://doi.org/10.5281/zenodo.4317774)\n![Version](https://img.shields.io/static/v1?label=pymolpysnips\u0026message=0.2\u0026color=brightcolor)\n\n# pymolpysnips: Templates for writing PyMOL scripts.\n\n\u003c!--\nHit counter and download counters are not working.\n[![HitCount](http://hits.dwyl.com/MooersLab/pymolsnips.svg)](http://hits.dwyl.com/MooersLab/pymolsnips)\n![GitHub all releases](https://img.shields.io/github/downloads/MooersLab/pymolsnips/total)\nGet zendo badge at Zendo.\nGo to https://hits.dwyl.com to hit the counter (all-time hits starting December 1).\nGo to https://shields.io/category/version to generate a release badge in Markdown.\nGo to https://shields.io/downloads to generate a badge for all downloads.\n--\u003e\n\nFor more details on installing libraries for specific editors, go to the [GitHub Page](https://mooerslab.github.io/pymolsnips/).\n\n## Related Repos\n\n- [easypymol](https://github.com/MooersLab/EasyPyMOL/edit/master/README.md)\n- [pymolshortcuts (useful for non-coders)](https://github.com/MooersLab/pymolshortcuts)\n- [orgpymolpysnips](https://github.com/MooersLab/orgpymolpysnips)\n- [rstudiopymolpysnips](https://github.com/MooersLab/rstudiopymolpysnips)\n- [taggedpymolpysnips](https://github.com/MooersLab/taggedpymolpysnips)\n- [jupyterlabpymolpysnips](https://github.com/MooersLab/jupyterlabpymolpysnips)\n- [colabOpenSourcePyMOLpySnips](https://github.com/MooersLab/colabOpenSourcePyMOLpySnips)\n- [colabPyMOLpySnips](https://github.com/MooersLab/colabPyMOLpySnips)\n- [PyMOLwallhangings](https://github.com/MooersLab/PyMOLwallhangings)\n\n[Return to Table of Contents](#table-of-contents)\n\n## Animated demo of snippet use in Visual Studio Code\n\n\u003cp\u003eThe animation below demonstrates the use of the \u003cb\u003eao\u003c/b\u003e tab trigger in the text editor \u003cem\u003eVisual Studio Code\u003c/em\u003e to insert 17 lines of code for generating the ambient occlusion effect.\nTwo levels of cascading menus appear.\nThe menu on the left shows the alternate tab triggers that contain the letters \u003cb\u003ea\u003c/b\u003e and \u003cb\u003eo\u003c/b\u003e.\nThe corresponding code for the selected tab trigger is displayed in the right window.\nBy entering these two letters, you have inserted 16 lines of code!\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"gifs/VSCaoSnip.gif\"\u003e\u003c/p\u003e\n\nThe result of applying a variant of the above code to a 27-nucleotide RNA hairpin is shown below.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./images/5d99AOD.png\" alt=\"HTML5 Icon\" style=\"width:364px;height:630px;\"\u003e\u003c/p\u003e\n\nTo make such an image, PyMOL does not have a pulldown menu option; a script is required.\n\nThis code can be applied to any molecular object in PyMOL's viewport, not just RNA.\n\nIf you are not ready to write PyMOL scripts, please consider using [PyMOL shortcuts](https://github.com/MooersLab/pymolshortcuts) to enhance your productivity in PyMOL interactive sessions.\nFor example, the above ambient occlusion effect can be invoked at any time by entering `AO` at the PyMOL prompt if the pymolshortcuts.py file has been loaded.\n\n## Application Description\n\nThe pymolsnips library contains 256 code fragments (i.e., templates or snippets) written in the PyMOL macro language (pml) for eighteen text editors.\nIt is highly likely that you have experience with one of these text editors.\nIf you want support for an additional text editor, please open an issue under the issues tab above or send me an e-mail. \nMy contact information is at the bottom.\n\nNote that each line in a snippet is terminated with a semicolon. \nThis means that a user can copy multiple lines of code out of their script file and paste them at the PyMOL prompt in one operation. \nThis is an alternative to saving and reloading the script file.\n\nFor 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](https://mooerslab.github.io/pymolsnips/).\nThis page takes several seconds to load due to a large number of animated gifs.\n\nThe page has the content of the old *README.md* referred to in the associated manuscript.\nThe old *README.md* file was moved to the webpage on 25 November 2020.\n\n\u003ca id=\"table-of-contents\"\u003e\u003ch2\u003eTable of Contents\u003c/h2\u003e\u003c/a\u003e\n\n* [Tech Stack](#technology-stack)\n* [Installation](#installation)\n* [Configuration Setup](#configuration-setup)\n* [Usage](#usage)\n* [Testing](#testing)\n* [Requests for new snippets and text editors](#requests)\n* [Bug reports](#bugreports)\n* [License](#license)\n* [Contact Information](#contact-information)\n* [How to cite](#citation)\n\n\n\n\u003ca id=\"technology-stack\"\u003e\u003ch2\u003eTechnology Stack\u003c/h2\u003e\u003c/a\u003e\n\n| Technology | Description                               |\n|------------|-------------------------------------------|\n| PyMOL   2.4   | Molecular graphics program         | \n| Python  3.7     |  Programming language          |\n\nSome of the snippets have Python3 code.\nIf 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. \nThis often merely involves replacing print statements in Python2 with print() functions in Python3.\nNote that multiple versions of PyMOL can operate side-by-side on a computer: You do not have to delete that ancient version of PyMOL.\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\u003ca id=\"installation\"\u003e\u003ch2\u003eInstallation\u003c/h2\u003e\u003c/a\u003e\n\nUnfortunately, GitHub does not yet provide an easy way to download part of a repository. \nIt is easier to download the whole repository, select the necessary parts, and delete the rest.\nSetting up and maintaining 18 separate repositories was too unwieldy.\n\nDownload 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.\nAlternatively, you download all of the libraries as a zip file by clicking on the green **code** button above.\n\nSee the [GitHub Page](https://mooerslab.github.io/pymolsnips/) for installation instructions for a specific text editor.\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\n\u003ca id=\"configuration-setup\"\u003e\u003ch2\u003eConfiguration Setup\u003c/h2\u003e\u003c/a\u003e\n\nThe snippet libraries are independent of PyMOL. \nNo modification of PyMOL is required. \nThe configuring of text editors is found on the [GitHub Page](https://mooerslab.github.io/pymolsnips/).\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\n\u003ca id=\"usage\"\u003e\u003ch2\u003eUsage\u003c/h2\u003e\u003c/a\u003e\n\nExamples of the snippets in use in various editors are found in the animated gifs on the [GitHub Page](https://mooerslab.github.io/pymolsnips/). \nThese gifs convey the essential knowledge in seconds.\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\n\u003ca id=\"testing\"\u003e\u003ch2\u003eTesting\u003c/h2\u003e\u003c/a\u003e\n\nTry the **ao** snippet. You should get a result similar to the one in the demo above.\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\u003ca id=\"requests\"\u003e\u003ch2\u003eRequests for new snippets and text editors\u003c/h2\u003e\u003c/a\u003e\n\nPlease use the **Issues tab** above to request support for additional text editors, suggest additional snippets, or ask questions.\nAlternatively, you can send [e-mail](#contact-information) to me.\n\nQuestions about PyMOL should be directed to the [PyMOL Mailing List](https://pymolwiki.org/index.php/PyMOL_mailing_list).\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\u003ca id=\"bugreports\"\u003e\u003ch2\u003eBug reports\u003c/h2\u003e\u003c/a\u003e\n\nPlease use the **Issues tab** above to report bugs or send me [e-mail](# contact information) via the form.\nRefer bugs in the text editors to the developers of the text editors.\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\u003ca id=\"license\"\u003e\u003ch2\u003eLicense\u003c/h2\u003e\u003c/a\u003e\n\nWe use the permissive MIT license.\nThe license information for this project is found in the License.txt file above. \n\n[Return to Table of Contents](#table-of-contents)\n\n\n\u003ca id=\"contact-information\"\u003e\u003ch2\u003eContact Information\u003c/h2\u003e\u003c/a\u003e\n\nI can be reached via the Issue tab above or via e-mail: `blaine-mooers at ouhsc.edu`.\n\n[Return to Table of Contents](#table-of-contents)\n\n\n\u003ca id=\"citation\"\u003e\u003ch2\u003eCitation\u003c/h2\u003e\u003c/a\u003e\n\n\nIf you use this library to make figures for publication, please cite the following publication:\n\n\nMooers, BHM, Brown, ME. Templates for writing PyMOL scripts. Protein Science. 2021; 262--269. https://doi.org/10.1002/pro.3997\n\nFor BibTex library.bib file:\n\n```bibtex\n@article{mooers2021templates,\n  title={Templates for writing PyMOL scripts},\n  author={Mooers, Blaine HM and Brown, Marina E},\n  journal={Protein Science},\n  volume={30},\n  number={1},\n  pages={262--269},\n  year={2021},\n  publisher={Wiley Online Library}\n  url={https://onlinelibrary.wiley.com/doi/abs/10.1002/pro.3997}\n  doi={10.1002/pro.3997}\n  abstract={PyMOL commands are used to exert exquisite control over the \n  appearance of a molecular model. This control has made PyMOL popular \n  for making images of protein structures for publications and presentations. \n  However, many users have poor recall of the commands due to infrequent \n  use of PyMOL. This poor recall hinders the writing of new code in scripts. \n  One solution is to build the new script by using code fragments as \n  templates for modular parts of the task at hand. The code fragments \n  can be accessed from a library while writing the code from inside a \n  text editor (e.g., Visual Studio Code, Vim, and Emacs). We developed a \n  library of PyMOL code templates or snippets called pymolsnips to ease \n  the writing of PyMOL code in scripts. We made pymolsnips available on \n  GitHub in formats for 18 popular text editors. Most of the supported \n  text editors are available for Mac, Windows, and Linux operating systems. \n  The GitHub site includes animations that complement the instructions\n  for installing the library for each text editor. We expect that the \n  library will help many PyMOL users to be more productive when writing \n  PyMOL script files.}\n}\n```\n\nFor ENDNOTE library.enw file.\n\n```bash\n%0 Journal Article\n%T Templates for writing PyMOL scripts\n%A Mooers, Blaine HM\n%A Brown, Marina E\n%J Protein Science\n%V 30\n%N 1\n%P 262-269\n%@ 0961-8368\n%D 2021\n%I Wiley Online Library\n```\n\n|Version      | Changes                                                                                                                                    | Date                 |\n|:-----------:|:------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------:|\n| Version 0.2 |  Added funding and update table                                                                                                             | 2024 April 13        |\n\n\n\n## Funding\n- NIH: R01 CA242845, R01 AI088011\n- NIH: P30 CA225520 (PI: R. Mannel); P20GM103640 and P30GM145423 (PI: A. West)\n\n\n[Return to Table of Contents](#table-of-contents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooerslab%2Fpymolsnips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmooerslab%2Fpymolsnips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooerslab%2Fpymolsnips/lists"}