summaryrefslogtreecommitdiffstats
path: root/2021/talks/molecular.md
blob: ecfaec10f73bb870c7387b62235ba6ab1bb4b116 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[[!meta title="Reproducible molecular graphics with Org-mode"]]
[[!meta copyright="Copyright © 2021 Blaine Mooers"]]
[[!inline pages="internal(2021/info/molecular-nav)" raw="yes"]]

<!-- You can manually edit this file to update the abstract, add links, etc. --->


# 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
structures have overlooked the inclusion of the code that makes the
images of the molecules 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 the code
that makes the images of molecules in the explanatory text. Such a
document allows the reader to reproduce the images in the manuscript.
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 library called orgpymolpysnips for structural
biologists (<https://github.com/MooersLab/orgpymolpysnips>). This
library facilitates the assembly of literate programming documents
with molecular images made by PyMOL. PyMOL is the most popular
molecular graphics program for making images for publication; it has
over 100,000 users, which is a lot of users in the sciences. PyMOL was
used to make many of the striking images of biological molecules on
the cover of Nature and Science. We use the emacs-jupyter package to
send commands from a code block in Org files to PyMOL's Python API.
PyMOL returns the molecular image to the output block below the
code block. Of course, an Emacs user can convert the Org file into a
PDF, convert the code blocks to script files, and submit these for
non-Emacs users. We describe the content of the library and provide
examples of the running PyMOL from Org-mode. We compare using Org,
Jupyter Notebook, Jupyter Lab, and RStudio with PyMOL to do
literate programming in structural biology.



# 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

<!--
-   20 minutes: (brief description/outline)
    
    I would prefer to give a 20-minute talk because this allows time to develop the context.

-   Title slide
-   Structural Biology Workflow in the Mooers Lab
-   Cover images made with PyMOL
-   Bar graph of PyMOL's popularity
-   Origin story of PyMOL
-   PyMOL's hybrid open-source model
-   PyMOL's GIU
-   Default molecular representations in PyMOL
-   Example of the PyMOL macro language
-   Same commands in Python
-   Corresponding code in yasnippet snippet
-   Extension of molecular representations with orgpymolpysnips
-   Hermann Ebbinghaus's Forgetting Curve
-   Why develop a snippet library for your field?
-   PyMOL in Org: kernel specification
-   Anatomy of kernel file
-   Creating a conda env and installing PyMOL
-   Example code block to make DSSR block model of tRNA
-   Resulting image
-   Org vs. JuptyerNotebook, Juptyer Lab, and RStudio
-   Summary
-   Acknowledgements

-->

[[!inline pages="internal(2021/info/molecular-schedule)" raw="yes"]]

[[!inline pages="internal(2021/info/molecular-nav)" raw="yes"]]