{"id":22901350,"url":"https://github.com/mooerslab/cctbxsnips-snipmate","last_synced_at":"2025-04-01T05:42:14.490Z","repository":{"id":165234112,"uuid":"594092280","full_name":"MooersLab/cctbxsnips-snipmate","owner":"MooersLab","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-13T09:26:25.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T03:42:05.262Z","etag":null,"topics":["cctbx","cctbx-snippets","cctbx-snips","code-snippets-python","colab","colab-notebook","crystallographic-computing","ghosttext","jupyter","python","snipmate","snippets","websocket"],"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":"2023-01-27T15:27:31.000Z","updated_at":"2023-01-29T03:56:49.000Z","dependencies_parsed_at":"2024-04-13T10:33:00.474Z","dependency_job_id":"b1b5baa3-ca71-4249-be79-afc3e6a672e2","html_url":"https://github.com/MooersLab/cctbxsnips-snipmate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fcctbxsnips-snipmate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fcctbxsnips-snipmate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fcctbxsnips-snipmate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Fcctbxsnips-snipmate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MooersLab","download_url":"https://codeload.github.com/MooersLab/cctbxsnips-snipmate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246591783,"owners_count":20801984,"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":["cctbx","cctbx-snippets","cctbx-snips","code-snippets-python","colab","colab-notebook","crystallographic-computing","ghosttext","jupyter","python","snipmate","snippets","websocket"],"created_at":"2024-12-14T01:33:03.211Z","updated_at":"2025-04-01T05:42:14.464Z","avatar_url":"https://github.com/MooersLab.png","language":"Vim Snippet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cctbxsnips-snipmate\n\n![Version](https://img.shields.io/static/v1?label=cctbxsnips-snipmate\u0026message=0.1\u0026color=brightcolor)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n## CCTBX\n\n[CCTBX](https://github.com/cctbx/cctbx_project) is the Computational Crystallography Toolbox. \nIts development is based at Lawrence-Berkeley National Laboratory.\nIt provides code for computations with diffraction data and atomic coordinates of proteins and small molecules.\nIt has C++ and Python ports.\nIt is available in Anaconda in the conda-forge channel as `cctbx-base` for python3.8 through 3.11 for Windows, macOS, and Linux.\n\n### Blaine's cctbx install protocol\n\nI assume that Anaconda has already been installed. While we are at it, we also create the Jupyter Notebook kernel. Execute one line at a time: Wait for the execution to finish before executing the next line.\n\n```bash\nconda create --name cctbx39 python=3.9\nconda activate cctbx39\nconda install -c conda-forge cctbx-base -y\nconda install ipykernel -y\npython -m ipykernel install --user --name cctbx39 --display-name \"cctbx python3.9\"\n```\n\nThe second to last command triggers the installation of Jupyter in the cctbx39 env.\nThe last command creates and installs the Jupyter kernel in `~/Library/Jupyter/kernels/cctbx39` on the Mac.\nSelect **cctbx python3.9** from the list of kernels when opening a new notebook in Jupyter.\n\nReplace the *3.9* or *39* above with whatever version of Python you want to use (between 3.8 and 3.11).\n\n## Snipmate\n\n[Snipmate](https://github.com/garbas/vim-snipmate) is a popular snippet manager for Vim.\nIt should work with NeoVim.\nThere are other snippets managers for Vim and NeoVim, such as `neosnippets`.\nTo complicate matters more, there several alternate systems for managing plugins.\n\n\n## The problems that this repo addresses\n\n1. ** Facilitation of code reuse **  Code snippets can save time by reusing existing code. The presence of tab stops in code snippets can help ensure that all parameters that need customization to a new problem are considered. Thus, tab stops can reduce subsequent debugging.\n\n2. **Use Emacs to edit Jupyter and Colab code and markdown cells** The existing snippet formats for Jupyter and Colab notebooks do not support tab triggers and tab stops, which are standard features of code snippet systems in most text editors. We can overcome these limitations by sending the active code cell to Emacs via the GhostText extension for the browser and the atomic-chrome package for Emacs.\n\n## Installation\n\n1. Install the snippets for Vim.\n\nI assume that the Ultisnips plugin has already been properly installed.\nThe snippets are stored in a single file called `python.snippets`.\nI store this file in a folder called my-snippets/Ultisnips.\nYou may have to concatenate `python.snippets` with an existing `python.snippets`` file.\n\n```bash\ncd ~/.vim/my-snippets/snipmate\ngit clone https://github.com/MooersLab/cctbxsnips-snipmate.git\ncd cctbxsnips-snipmate/\nmv cctbx.snippets ../.\ncd ..\nrm -rf cctbxsnips-snipmate\n```\n\n2. **Optional** If you want to use these snippets from Vim or NeoVim to edit live cells in Jupyter or Colab notebooks, install [GhostText](https://ghosttext.fregante.com/) in your browser and the [Vim Ghost](https://github.com/raghur/vim-ghost)plugin for Vim. Install the [nvim-ghost](https://github.com/subnut/nvim-ghost.nvim] plugin for NeoVim).\n\n\n## Related repositories\n- [cctbxsnips-Emacs](https://github.com/MooersLab/cctbxsnips-Emacs) CCTBX snippets for the yasnippet snippet system in for Emacs.\n- [cctbxsnips-SublimeText3](https://github.com/MooersLab/cctbxsnips-SublimeText3) CCTBX snippets for Sublime Text 3 (ST3).\n- [cctbxsnips-VSC](https://github.com/MooersLab/cctbxsnips-VSC) CCTBX snippets for Visual Studio Code (VSC).\n- [cctbxsnips-UltiSnips](https://github.com/MooersLab/cctbxsnips-Ultisnips) CCTBX snippets for Vim or NeoVim via UltiSnips plugin.\n- [cctbxsnips-neosnippets](https://github.com/MooersLab/cctbxsnips-neosnippets) CCTBX snippets for Vim or NeoVim via neosnippets plugin.\n- [cctbxsnips-Atom](https://github.com/MooersLab/cctbxsnips-Atom) CCTBX snippets for Atom.\n- [Jupyterlab cctbx snippets](https://github.com/MooersLab/jupyterlabcctbxsnips) CCTBX snippets for JupyterLab with the `jupyterlab-snippets` extension or the jupyterlab-snippets-mutlimenus extension.\n- [Jupyterlab cctbx plus snippets](https://github.com/MooersLab/jupyterlabcctbxsnipsplus) The variant of the `jupyterlabcctbxsnips` library with comments to guide editing of the snippets.\n- [Colab cctbx snippets](https://github.com/MooersLab/colabcctbxsnips) Colab snippets.\n\n## Update History\n\n|Version      | Changes                                                                      | Date                   |\n|:-----------:|:----------------------------------------------------------------------------:|:----------------------:|\n| Version 0.2|  Fixed typos in README.md. Added badges and update table                      | 2024 April 13          |\n\n\n## Sources of funding\n\n- NIH: R01 CA242845\n- NIH: R01 AI088011\n- NIH: P30 CA225520 (PI: R. Mannel)\n- NIH P20GM103640 and P30GM145423 (PI: A. West)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooerslab%2Fcctbxsnips-snipmate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmooerslab%2Fcctbxsnips-snipmate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmooerslab%2Fcctbxsnips-snipmate/lists"}