How to make a publication-quality protein figure

From a default ribbon diagram to a 300 dpi PNG

16 min

A ribbon diagram of HIV-1 protease (1HSG) with chain A in lime and chain B in outline, inside a dashed print frame with crop marks and a dimension line, and a dot on the catalytic Asp25 of each chain.

HIV-1 protease (PDB entry 1HSG) opens in the PDB viewer as a two-colour ribbon with 127 crystal waters floating around it and an inhibitor too small to read. It is a fine working view and a poor figure.

To turn it into one, hide the waters, show one style, colour by one property, light it with the Ray traced option and save the image from Export at the width the journal prints: 1,051 pixels for an 89 mm column at 300 dpi.

PyMOL gets there with ray and png figure.png, 10cm, dpi=300, ray=1.[3] This guide builds the figure in the PDB viewer by ProteinIQ, which draws with the Mol* engine and runs in the browser with no install,[9] and gives the PyMOL command beside each step.

PDB ViewerOpen and inspect protein structure files in a 3D viewer.Open tool

Start from one structure and a clear view

A figure makes one point, so remove what does not serve it. For 1HSG that means the waters, and for most structures it means any chain that is not in the story.

  1. Open the PDB viewer, type 1HSG into the search box and press Enter.
  2. In the panel beside the canvas, click the eye icon on the HOH row to hide the waters.
  3. Drag to rotate, scroll to zoom, and stop when the feature you want to show faces you. Reset the view, at the bottom right of the canvas, undoes a bad turn.

Rotate before you style. A view that hides the active site behind a loop cannot be fixed by colour. In PyMOL, fetch 1hsg downloads the entry as mmCIF by default, remove solvent deletes the waters and orient lines the structure up with the screen axes.[3]

Choose cartoon, surface or sticks

The three styles answer different questions, and a figure usually needs one of them for the whole protein and a second only for the part under discussion. A ribbon diagram or protein cartoon, the same thing under two names, shows how the chain folds. A surface shows what a ligand or partner can touch. Sticks show atoms and bonds, which only matter for a few residues.

StyleShowsUse it forAvoid it when
CartoonBackbone path, helices as coils and strands as arrowsFold, topology, domain layout, overall comparisonsThe point is a specific atom contact
SurfaceThe outline a solvent probe can reachPockets, interfaces, electrostatic or hydrophobic patchesSecondary structure matters, because the surface hides it
SticksEvery heavy atom and bond of the chosen residuesA ligand, a mutated residue, a catalytic triadMore than a few dozen residues, where they become clutter
Table 1. What each style shows and when to use it. The names are those in the PDB viewer's Representation menu; the PyMOL commands are show cartoon, show surface and show sticks.[3]

In the viewer, point at Representation, the top button of the toolbar on the left of the canvas, and check Cartoon, Surface or Sticks. With nothing selected the menu acts on the whole structure; with something selected, its title changes to the selection and a style is added to it only. That is how you get a cartoon protein with one ligand in sticks.

Colour by chain, secondary structure, B-factor, pLDDT or hydrophobicity

Colour should carry one message that the caption can state in a sentence. Open Color in the toolbar and pick a scheme: Chain, Secondary structure, Element, B-factor, pLDDT or Hydrophobicity. As with styles, a selection limits the colour to itself.

ColouringAnswersWatch for
ChainWhich subunit is whichTwo similar hues merge in greyscale print
Secondary structureWhere the helices and strands areSays little about an all-strand protein such as 1HSG
B-factorHow mobile or disordered atoms were in the crystalThe scale is relative to one entry, so give the range and compare only within a structure
pLDDTHow confident a prediction is, residue by residueMeaningful only for predicted models; crystal structures keep B-factors in the same column
HydrophobicityWhere greasy and polar patches sitWhich scale is used, and the red to green default
Table 2. Which colouring answers which question. In PyMOL, util.cbc colours by chain, spectrum b by B-factor and color red, ss h a secondary structure type.[3][6]

B-factor

B-factor colours each atom by its temperature factor, so flexible loops stand apart from the rigid core. The number depends on the refinement program and the entry, so a loop that is red in one structure is not comparable with a red loop in another. State the range in the caption. In PyMOL, spectrum b, blue_white_red does the same, and minimum= and maximum= fix the range.[3]

pLDDT

A predicted model stores its confidence where a crystal structure stores B-factors, and pLDDT reads that column and colours by the usual pLDDT bands: above 90 very high, 70 to 90 confident, 50 to 70 low and below 50 very low.

To get a model to colour, search for a UniProt accession in the viewer, or predict one with AlphaFold 2 or ESMFold.

Hydrophobicity

The viewer has two hydrophobicity colourings, and they use different scales. Color, then Hydrophobicity, uses the Wimley and White scale for residues at membrane interfaces.[8] Under By attribute in the same menu, the Kyte-Doolittle entry colours by Kyte and Doolittle's hydropathy index. Name the scale in the caption either way.

The Hydrophobicity colouring runs from red to green by default. Cell Press asks authors not to put red and green together in a figure, so for a figure that goes to a journal choose a palette in By attribute that runs blue, white, red instead.[2] PyMOL has no built-in command for hydrophobicity; the PyMOL Wiki hosts a color_h script that uses the Eisenberg scale.[7]

Highlight a ligand and its contacts

The usual figure is a protein in pale cartoon with the ligand in sticks and its contacts marked. 1HSG holds the inhibitor indinavir, listed as MK1.

  1. Click MK1 in the Ligands list. The viewer selects it and zooms in.
  2. Open Color and choose Element. The menu title names the selection, so only the ligand changes.
  3. Click Clear above the selection so later steps act on everything again.
  4. Click Ligand interactions, the first button of the second toolbar group. With Show contacts in 3D on, dashed lines join the ligand to the residues it touches and the residues are labelled.

The panel lists each contact with its type and distance in ångströms, so the figure and the table agree. If the labels overlap, hide the kinds of contact you are not discussing with the coloured switches above the table. For the chemistry of what the dashes mean, see protein-ligand interactions.

In PyMOL, show sticks, resn MK1 draws the ligand and distance hbonds, resn MK1, polymer, 3.5, mode=2 draws polar contacts, where mode=2 shows only polar contact distances.[3]

Light the scene and set the background

Lighting, in the toolbar, has four settings: Flat, Outline, Soft shadows and Ray traced. Flat is standard lighting. Outline draws flat colour with black outlines, like an illustration. Soft shadows darkens crevices. Ray traced bounces light between surfaces and casts soft shadows.

The canvas looks grainy while you turn the structure and sharpens within a second or two once you stop. The exported image traces for longer than the canvas does, so it is cleaner than what you see. The option appears only when your graphics card supports it in the browser; on older or integrated graphics, Soft shadows is the closest look.

In PyMOL, ray renders the current view with its own ray tracer, which can take several minutes for a complex scene.[3] set ray_trace_mode, 1 adds black outlines.[5]

Background is a choice in the export dialog, covered next. Pick White for a journal. Pick Transparent for slides and posters, so the slide colour shows through behind the protein.

Export the image at the journal's size

Open Export, the download button at the bottom of the left toolbar, and stay on the Image tab. Size offers 1×, 2× and 4× the canvas, or Custom for a width and height in pixels. The line under it shows the result, for example 2408 × 2044 px at 2× in a 1,600 px wide browser window.

Background is Transparent, White or Black. Download PNG renders the image in the lighting you chose, and Copy puts it on the clipboard.

Journals ask for a width in millimetres and a resolution in dots per inch, so convert before you pick a size. The number of pixels is the width in millimetres divided by 25.4, times 300:

pixels=width in mm25.4×300\text{pixels} = \frac{\text{width in mm}}{25.4} \times 300

JournalColumnWidthPixels at 300 dpi
NatureSingle89 mm1,051
NatureOne and a half120 to 136 mm1,417 to 1,606
NatureDouble183 mm2,161
Cell PressSingle8.5 cm1,004
Cell PressOne and a half11.4 cm1,346
Cell PressFull width17.4 cm2,055
Table 3. Figure widths at 300 dpi. Widths are the journals' own; we calculated the pixels. Nature lists 89 mm and 183 mm as its standard sizes, with 120 to 136 mm as a column and a half; Cell Press lists maximum widths for research articles.[1][2]

Nature wants photographic images at a minimum of 300 dpi at the largest size they will be used, and says that raising the resolution in an art program does not improve quality.[1] Cell Press asks for at least 300 dpi for colour figures at the desired print size.[2] A rendered protein is not a photograph, but the safe reading is the same: export at the pixel width in the table or larger, and never enlarge a small export afterwards.

To export at an exact size, choose Custom and type the width in pixels. The height follows from what you type, so check it against the journal's depth limit. A size beyond what your graphics card can render is reduced, and the dialog marks it.

The command line takes the same request in PyMOL's syntax. png figure.png, 10cm, dpi=300 saves an image 10 cm wide at 300 dpi, which is 1,181 pixels, and a missing height keeps the canvas's proportions.[3]

The file format depends on the journal. Cell Press lists TIFF, PDF, EPS, JPG, PSD and PNG for production files.[2] Nature prefers TIFF or layered PSD for raster images and accepts high-resolution JPEG, but does not list PNG.[1] Export a white background first, then convert with Python and Pillow:

Python
from PIL import Image

Image.open("figure.png").convert("RGB").save(
    "figure.tif", dpi=(300, 300), compression="tiff_lzw"
)

Nature recommends RGB and Cell Press asks for it when colour is used, and the conversion keeps RGB.[1][2] It also drops the transparency channel, which is why the white background matters.

The same figure in PyMOL

PyMOL separates drawing from saving: ray renders the view with the ray tracer and png writes it. Giving png the option ray=1 runs the ray trace first, at the size you ask for.[3] The commands below build the same figure as the steps above.

The viewer's Command line, at the bottom of the canvas, accepts PyMOL syntax, so you can try them there. It reads png the same way, but its ray turns on Ray traced lighting, and the ray=1 option of png is accepted without changing anything, because every export is rendered off screen.

StepIn the viewerIn PyMOL
Open the entrySearch for 1HSGfetch 1hsg
Remove the watersHide the HOH rowremove solvent
Cartoon, surface, sticksRepresentationshow cartoon, show surface, show sticks, resn MK1
Colour by chainColor, Chainutil.cbc
Colour by B-factorColor, B-factorspectrum b, blue_white_red
Secondary structureColor, Secondary structurecolor red, ss h and color yellow, ss s
White backgroundExport, Background, Whitebg_color white
Transparent backgroundExport, Background, Transparentset ray_opaque_background, off
Ray-traced lightingLighting, Ray tracedray
Save at 10 cm and 300 dpiExport, Image, Custompng figure.png, 10cm, dpi=300, ray=1
Table 4. Viewer steps and their PyMOL commands. PyMOL syntax is from the PyMOL command reference and the PyMOL Wiki.[3][4][6]

A complete PyMOL session for the opening figure reads:

Text
fetch 1hsg
remove solvent
orient
show cartoon, polymer
util.cbc
show sticks, resn MK1
bg_color white
png figure.png, 10cm, dpi=300, ray=1

PyMOL's reference gives unset opaque_background followed by ray as the route to a transparent background, and the PyMOL Wiki describes the same switch as ray_opaque_background, which when off treats the background as an alpha channel.[3][4] The reference adds that PNG is the only image format PyMOL writes, so the TIFF step above applies there too.[3]

Common mistakes

ProblemWhat you seeFix
Screenshot of the window instead of an exportToolbar and panel in the figure, pixelated at print sizeUse Export, Image; it renders the canvas alone at the size you choose
Pixel width too small for the columnA blurred figure once the layout program scales it to 89 mmUse the pixel widths in Table 3 or larger
Transparent PNG sent to a journalAn unexpected background after the file is flattenedExport with a white background
pLDDT colours on a crystal structureMeaningless blues and oranges taken from B-factorsUse B-factor for crystal structures and pLDDT for predictions only
Red and green used togetherA figure that readers with red-green colour blindness cannot parseChoose a blue, white, red palette
No scale or range in the captionA B-factor or hydrophobicity figure no one can read quantitativelyGive the attribute, scale and range in the caption
Table 5. Mistakes that survive until a reviewer sees the figure.

After the figure

A still figure is one view. To show a structure from several sides in a talk, make a protein animation from the same scene. To hold it in your hand, 3D print the protein from the viewer's STL export. The PyMOL commands cheat sheet lists the rest of the syntax the viewer's command line understands, and the pLDDT guide helps you decide which parts of a prediction deserve a bright colour.

If the entry is the starting point rather than a file, how to open a PDB file covers every route in. For a flat contact diagram that a journal can print in black and white, PLIP draws protein-ligand interactions from the same structure.

PDB ViewerOpen and inspect protein structure files in a 3D viewer.Open tool

Frequently asked questions

What resolution do journals want for protein figures?

Nature wants at least 300 dpi at the largest size a photographic image will be used, and Cell Press wants at least 300 dpi for colour figures at the desired print size.[1][2] At 300 dpi an 89 mm column is 1,051 pixels wide.

How do I make a transparent PNG of a protein?

In the PDB viewer, set Background to Transparent on the Image tab of Export and click Download PNG. In PyMOL, turn off ray_opaque_background and ray trace.[4]

What is the difference between ray and png in PyMOL?

ray renders the current view with PyMOL's ray tracer. png writes the image to disk, and its ray=1 option runs the ray trace first at the size given.[3]

How do I colour a protein by B-factor?

In the PDB viewer, open Color and choose B-factor. In PyMOL, run spectrum b, blue_white_red.[3]

Should I use cartoon, surface or sticks?

Cartoon for the fold, surface for what a partner can touch and sticks for the few residues under discussion. Most figures combine a cartoon for the protein with sticks for one ligand.