How to Show Protein Surfaces in PyMOL: Electrostatics, Hydrophobicity and Binding Pockets

How to Show Protein Surfaces in PyMOL: Electrostatics, Hydrophobicity and Binding Pockets

Surface representations communicate things that cartoon ribbons can’t — the shape of a binding pocket, the electrostatic character of an interface, which patches are hydrophobic. This guide covers every surface type in PyMOL, how to color them meaningfully, and how to prepare them for publication.

Surface types — molecular, dot, mesh

PyMOL offers three distinct surface representations, each suited to different communication goals:

Molecular surface
show surface
Solid, continuous. Standard for publications. Shows shape, pockets, and overall architecture.
Dot surface
show dots
Accessible surface area. Each dot represents a surface point. Less common in publications but useful for area calculations.
Mesh
show mesh
Wireframe surface. Can be combined with solid surface or cartoon to show interior features. Good for electron density maps.

For the vast majority of publication figures, you’ll use show surface — the solid molecular surface. The other two are useful in specialized contexts but rarely appear in structural biology papers as primary representations.

Basic surface commands and transparency

PyMOL command line
# Show surface for all objects
show surface

# Show surface for specific selection only
show surface, chain A

# Show surface + cartoon together (classic publication style)
show cartoon
show surface
set transparency, 0.5

# Hide surface
hide surface

The most powerful surface figure style is the semi-transparent surface layered over the cartoon ribbon. The transparency lets the secondary structure show through, communicating both overall shape and internal architecture in a single image.

Transparency values — set transparency, VALUE
0.0
Fully opaque — no cartoon visible through it
0.3
Slight transparency — hint of cartoon underneath
0.5
Recommended — cartoon clearly visible through surface
0.7
Very transparent — surface mostly decorative
1.0
Invisible — effectively hides the surface
Surface + cartoon — the right layer order
Color the cartoon first, then the surface separately. A common approach: color slate, polymer (neutral cartoon), then set surface_color, white (white surface) with set transparency, 0.5. The white semi-transparent surface gives the shape without competing with the cartoon colors underneath.

Electrostatic surface with APBS

An electrostatic surface maps the protein’s electrostatic potential onto the molecular surface — negative regions (red) show where positively charged ligands or residues are attracted, and positive regions (blue) show where negatively charged species bind. It’s one of the most commonly requested figures in structural biology papers dealing with charged interfaces, DNA-binding proteins, and ion channels.

Negative (−) · redNeutral · whitePositive (+) · blue

Generating an electrostatic surface requires the APBS plugin — available in the full Schrödinger PyMOL (educational and commercial licenses) but not in the open-source build by default. If you have the educational license:

PyMOL command line — APBS method (educational/commercial)
# 1. Load and prepare the protein (no ligands, no waters)
fetch 4XYZ
remove resn HOH
remove hetatm
as surface

# 2. Run APBS from the Plugin menu:
# Plugin → APBS Tools → Run APBS → Map and color surface
# The plugin handles everything: PQR generation, APBS calculation,
# and surface coloring automatically

Manual electrostatic coloring without APBS

If you don’t have the APBS plugin, a quick approximation colors the surface by the charge character of nearby residues. This is not a true electrostatic calculation but is visually informative:

PyMOL command line — charge approximation
# Color surface by "charge" using built-in coloring
show surface
set surface_color, white        # start from neutral white

# Select charged residues and color the nearby surface
select pos_charged, resn LYS+ARG+HIS
select neg_charged, resn ASP+GLU

color blue, pos_charged
color red,  neg_charged

# For a smoother look, color only the surface atoms
# based on residue charge character
color blue, pos_charged and elem C
color red,  neg_charged and elem C
True electrostatics vs residue charge coloring
Coloring by residue type is not the same as an APBS electrostatic potential calculation. APBS solves the Poisson-Boltzmann equation and accounts for partial charges, solvent, and ionic strength. For publications where the electrostatic potential is a key scientific point, use APBS. For figures where you just want to indicate charge character qualitatively, residue-based coloring is acceptable if clearly described as such in the figure legend.

Color by hydrophobicity

Hydrophobicity coloring maps each residue’s hydrophobicity score onto the surface, revealing hydrophobic patches that drive protein folding, membrane insertion, and protein-protein interactions. White typically represents neutral or hydrophilic character; orange-to-brown indicates hydrophobic patches.

Hydrophilic · blue-whiteNeutral · whiteHydrophobic · orange
PyMOL command line
# Built-in hydrophobicity spectrum coloring
show surface
spectrum hydrophobicity, white_orange, selection=polymer

# Two-tone: hydrophobic orange, hydrophilic blue
spectrum hydrophobicity, blue_white_red, selection=polymer

# Manual hydrophobicity coloring using standard residue groups
color white, polymer                    # start neutral
color tv_orange, resn PHE+LEU+ILE+VAL+MET+TRP+ALA  # hydrophobic
color marine, resn LYS+ARG+ASP+GLU+HIS+SER+THR+ASN+GLN  # hydrophilic
Hydrophobicity coloring requires a surface
The spectrum hydrophobicity command maps colors to the surface based on the hydrophobicity of each surface atom’s parent residue. Run show surface first, then apply the hydrophobicity spectrum. The result colors the surface itself — you don’t need to separately color the cartoon unless you want a combined surface + ribbon figure.

Showing binding pockets and cavities

Binding pocket visualization is one of the most common reasons researchers use surface representations. PyMOL doesn’t have a built-in pocket detection algorithm (use fpocket or SiteMap for that), but it excels at displaying a known pocket once you know which residues define it.

PyMOL command line — binding pocket display
# Select pocket residues (5 Å around the ligand)
fetch 4XYZ
as cartoon
hide everything, resn HOH
select LIG, resn LIG
select pocket, byres (LIG around 5)

# Show pocket surface only (not the whole protein)
show surface, pocket
color white, pocket
set transparency, 0.3

# Show ligand as sticks over the surface
show sticks, LIG
util.cbag LIG

# Optional: show protein cartoon underneath for context
show cartoon, polymer and not pocket
color gray70, polymer and not pocket
zoom pocket

Showing internal cavities

To reveal internal cavities — channels, tunnels, or cryptic binding sites — adjust the surface probe radius. A smaller probe radius (below the default 1.4 Å) allows the surface to penetrate into smaller openings, revealing cavities that a standard probe misses:

PyMOL command line
# Smaller probe = surface dips into more cavities (shows more internal features)
set solvent_radius, 0.6
rebuild

# Use cavity_detection_gap for explicit cavity rendering
set surface_cavity_mode, 1   # show surface facing into cavities
set surface_cavity_radius, 3 # minimum cavity radius to show

Preparing surfaces for publication

  1. Set surface quality to 2 or higher. The default surface quality (0) is fast but visibly faceted at publication scale. Run set surface_quality, 2 before ray tracing. Quality 1 is a good compromise; quality 3+ is extremely slow and rarely necessary.
  2. Turn off specular highlights on the surface. By default, PyMOL adds shiny specular highlights to surfaces. For a cleaner, more matte publication look: set surface_type, 0 and set specular, 0.2.
  3. Use a white background and opaque render. bg_color white and set ray_opaque_background, 1 before every export. Transparent PNG backgrounds look wrong in most journal layouts.
  4. Ray trace at appropriate resolution. ray 1200, 900 for a single-column figure. For a half-page or full-page panel, use 2000 × 2000 or larger. Always export with png filename.png, dpi=300.
  5. Save the session before closing. Surface calculations and coloring are session-specific. Save with save session.pse so you can adjust the figure without recalculating the surface from scratch.

Surface settings reference

SettingDefaultEffect
surface_quality0Surface smoothness — increase to 1 or 2 for publication
transparency0.0Surface transparency (0=opaque, 1=invisible)
solvent_radius1.4Probe radius for surface calculation in ångströms
surface_color(atom colors)Force surface to a single color: set surface_color, white
surface_cavity_mode0Set to 1 to show cavity-facing surfaces
surface_cavity_radius5Minimum radius of cavities to render
surface_type00=solid, 1=dots, 2=mesh. Can switch type after surface is shown
Surfaces are slow — work in stages
PyMOL generates surfaces on-the-fly and recalculates them when you change the view. For large proteins (above ~500 residues), surface generation can take several seconds and ray tracing can take minutes. Work on the cartoon view first to get the orientation right, then add the surface and ray trace only when you’re satisfied with the scene. Use set defer_builds_mode, 5 to delay rebuilding surfaces during rotation.

Surfaces in one paragraph

Run show surface to add a molecular surface, then set transparency, 0.5 with show cartoon for the classic publication style that shows both shape and secondary structure. For electrostatics, use the APBS plugin if you have the educational license — or color by charged residue type as an approximation. For hydrophobicity, spectrum hydrophobicity, white_orange, selection=polymer highlights hydrophobic patches in a single command. For binding pockets, show surface, pocket on a named selection targets the surface to the region that matters. Set surface_quality, 2 before ray tracing for publication. Save your session before closing.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *