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
fetch 6esf 6esh, async=0
hide everything, 6esh or 6esf

## Orient in disc view with dyad on top
rotate y, -90
rotate z, 90

## Move unwrapped nucleosome away so they don't overlap
translate [150,0,0], 6esh

## Center and zoom out to have both nucleosomes in the field of view
zoom all, -40

## Apply styling and color code to histones
select H3, chain A or chain E
select H4, chain B or chain F
select H2A, chain C or chain G
select H2B, chain D or chain H
select histones, H3 or H4 or H2A or H2B

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)
select DNA, chain I or chain J
show surface, DNA

select DNA_backbone, DNA and backbone
color gray70, DNA_backbone

select DNA_bases, DNA and sidechain
color gray90, DNA_bases

## Give a different color to unwrapped DNA
select unwrapped_DNA, (chain I and resi \-73-\-53) or (chain J and resi 53-73)
select uw_DNA_bases, unwrapped_DNA and DNA_bases
select uw_DNA_backbone, unwrapped_DNA and DNA_backbone
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
png disc-view.png, width=1200, dpi=300, ray=1

## From this initial view, look down the dyad
rotate x, 90

## Ray and save dyad view
png dyad-view.png, width=1200, dpi=300, ray=1

## From here, look from the point opposite to the dyad
rotate x, 180

## Ray and save gyres view
png gyres-view.png, width=1200, dpi=300, ray=1

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
fetch 1kx5, async=0
hide everything, 1kx5

## Orient in disc view and zoom out to see all atoms
rotate z, 5
zoom all, 10

## Apply styling and color code to histones
select H3, chain A or chain E
select H4, chain B or chain F
select H2A, chain C or chain G
select H2B, chain D or chain H
select histones, H3 or H4 or H2A or H2B

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
select DNA, chain I or chain J
show surface, DNA

select DNA_backbone, DNA and backbone
color gray70, DNA_backbone

select DNA_bases, DNA and sidechain
color gray90, DNA_bases

set transparency, 0.5

## Select residues with relevant PTMs, draw them as spheres and color them
select entry_exit_ptms, H3 and resi 9+14+18+23+41+42+45+56+57
select 35bp_in_ptms, H4 and resi 77+79
select dyad_ptms, H3 and resi 115+122
select PTMs, entry_exit_ptms or 35bp_in_ptms or dyad_ptms

show spheres, PTMs

color cyan, entry_exit_ptms
color green, 35bp_in_ptms
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
png PTMs.png, width=1200, dpi=300, ray=1

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