[[!meta title="Reproducible molecular graphics with Org-mode"]] [[!meta copyright="Copyright © 2021 Blaine Mooers"]] [[!inline pages="internal(2021/info/molecular-nav)" raw="yes"]] # Reproducible molecular graphics with Org-mode Blaine Mooers Research papers in structural biology should include the code used to make the images of molecules in the article in the supplemental materials. Some structural bioinformaticists have started to include their computer code in the supplemental materials to allow readers to reproduce their analyses. However, authors of papers reporting new molecular structures often overlook the inclusion of the code that makes the images of the molecules reported in their articles. Nonetheless, this aspect of reproducible research needs to become the standard practice to improve the rigor of the science. In a literate programming document, the author interleaves blocks of explanatory prose between code blocks that make the images of molecules. The document allows the reader to reproduce the images in the manuscript by running the code. The reader can also explore the effect of altering the parameters in the code. Org files are one alternative for making such literate programming documents. We developed a **yasnippet** snippet library called **orgpymolpysnips** for structural biologists (). This library facilitates the assembly of literate programming documents with molecular images made by PyMOL. PyMOL is the most popular molecular graphics program for creating images for publication; it has over 100,000 users, which is a lot of users in molecular biology. PyMOL has been used to make many of the images of biological molecules found on the covers of many Cell, Nature, and Science issues. We used the **jupyter** language in **org-babel** to send commands from code blocks in Org files to PyMOL's Python API. PyMOL returns the molecular image to the output block below the code block. An Emacs user can convert the Org file into a PDF, `tangle' the code blocks into a script file, and submit these for non-Emacs users. We describe the content of the library and provide examples of the running PyMOL from Org-mode documents. # Outline - 5-10 minutes: (brief description/outline) - Title slide - Structural Biolog Workflow in the Mooers Lab - Cover images made with PyMOL - Why develop a snippet library for your field? - PyMOL in Org: kernel specification - Creating a conda env and installing PyMOL - Example code block in Org to make DSSR block model of tRNA - Resulting image - Summary - Acknowledgements [[!inline pages="internal(2021/info/molecular-schedule)" raw="yes"]] [[!inline pages="internal(2021/info/molecular-nav)" raw="yes"]]