Recipe for figure 2 of Zhou et al 2018
Now that a review I have been working on (Zhou et al, 2019) is published, I want to share a few “behind the scenes” things about it. In this post, I share the PyMOL commands used to generate the bitmap elements of figure 2.
Figure 2a
To replicate the bitmaps of figure 2a, save the following code in a file and
load it into a new PyMOL session (the reinitialize
command will clear
the current session):
# Set up nucleosome unwrapping figure
## Fetch nucleosome structures from the unwrapping cryoEM paper
6esf 6esh, async=0
fetch 6esh or 6esf
hide everything,
## Orient in disc view with dyad on top
-90
rotate y, 90
rotate z,
## Move unwrapped nucleosome away so they don't overlap
150,0,0], 6esh
translate [
## Center and zoom out to have both nucleosomes in the field of view
all, -40
zoom
## Apply styling and color code to histones
or chain E
select H3, chain A or chain F
select H4, chain B or chain G
select H2A, chain C or chain H
select H2B, chain D or H4 or H2A or H2B
select histones, H3
show spheres, histones
color blue, H3
color green, H4
color yellow, H2A
color red, H2B
## Draw DNA as surface and paint it (backbone same color a little bit darker)
or chain J
select DNA, chain I
show surface, DNA
and backbone
select DNA_backbone, DNA
color gray70, DNA_backbone
and sidechain
select DNA_bases, DNA
color gray90, DNA_bases
## Give a different color to unwrapped DNA
and resi \-73-\-53) or (chain J and resi 53-73)
select unwrapped_DNA, (chain I and DNA_bases
select uw_DNA_bases, unwrapped_DNA and DNA_backbone
select uw_DNA_backbone, unwrapped_DNA
color orange, uw_DNA_backbone
color brightorange, uw_DNA_bases
# Render scenes and save images
## Set transparent background and antialiasing for PNG export
set opaque_background, off
set ray_opaque_background, off
set antialias, 2
set ambient_occlusion_mode, 1
# Ray trace mode:
# 0 for default colors
# 1 for default colors + black outline
# 2 for black outline only
# 3 for quantized colors + black outline
set ray_trace_mode, 0
## Ray and save disc view
-view.png, width=1200, dpi=300, ray=1
png disc
## From this initial view, look down the dyad
90
rotate x,
## Ray and save dyad view
-view.png, width=1200, dpi=300, ray=1
png dyad
## From here, look from the point opposite to the dyad
180
rotate x,
## Ray and save gyres view
-view.png, width=1200, dpi=300, ray=1 png gyres
Figure 2b
To replicate the bitmap of figure 2b, save the following code in a file and
load it into a new PyMOL session (the reinitialize
command will clear
the current session):
# Set up nucleosome PTMs figure
## Fetch highest-resolution nucleosome structure
1kx5, async=0
fetch 1kx5
hide everything,
## Orient in disc view and zoom out to see all atoms
5
rotate z, all, 10
zoom
## Apply styling and color code to histones
or chain E
select H3, chain A or chain F
select H4, chain B or chain G
select H2A, chain C or chain H
select H2B, chain D or H4 or H2A or H2B
select histones, H3
show cartoon, histones
## Regular colors
#color blue, H3
#color green, H4
#color yellow, H2A
#color red, H2B
## Lighter colors so the PTMs colors will stand out
color slate, H3
color palegreen, H4
color paleyellow, H2A
color raspberry, H2B
## Draw DNA as surface and paint it (backbone same color a little bit darker),
## and give it 50% transparency to be able to see PTMs hidden behind DNA
or chain J
select DNA, chain I
show surface, DNA
and backbone
select DNA_backbone, DNA
color gray70, DNA_backbone
and sidechain
select DNA_bases, DNA
color gray90, DNA_bases
set transparency, 0.5
## Select residues with relevant PTMs, draw them as spheres and color them
and resi 9+14+18+23+41+42+45+56+57
select entry_exit_ptms, H3 35bp_in_ptms, H4 and resi 77+79
select and resi 115+122
select dyad_ptms, H3 or 35bp_in_ptms or dyad_ptms
select PTMs, entry_exit_ptms
show spheres, PTMs
color cyan, entry_exit_ptms35bp_in_ptms
color green,
color marine, dyad_ptms
# Render scene and save image
## Set transparent background and antialiasing for PNG export
set opaque_background, off
set ray_opaque_background, off
set antialias, 2
set ambient_occlusion_mode, 1
# Ray trace mode:
# 0 for default colors
# 1 for default colors + black outline
# 2 for black outline only
# 3 for quantized colors + black outline
set ray_trace_mode, 0
=1200, dpi=300, ray=1 png PTMs.png, width
References
Zhou K, Gaullier G & Luger K (2019) Nucleosome structure and dynamics are coming of age. Nature Structural & Molecular Biology 26: 3–13. https://doi.org/10.1038/s41594-018-0166-x