How to Color AlphaFold Structures by pLDDT in PyMOL: Confidence Visualization Guide

How to Color AlphaFold Structures by pLDDT in PyMOL: Confidence Visualization Guide

Every AlphaFold structure comes with per-residue confidence scores encoded directly in the PDB file — but only if you know where to look and how to visualize them. This tutorial covers the complete workflow from loading an AlphaFold PDB to producing a publication-quality confidence-colored figure.

Where pLDDT is stored — the B-factor column

AlphaFold PDB files store per-residue pLDDT confidence scores in the B-factor column — the same column that experimental crystal structures use for thermal displacement parameters. This is the key technical fact that makes PyMOL coloring trivial: any PyMOL command that colors by B-factor automatically colors by pLDDT when the input is an AlphaFold structure.

AlphaFold PDB file — B-factor column contains pLDDT
ATOM 1 N MET A 1 -3.672 14.123 8.211 1.00 36.25 N
ATOM 2 CA MET A 1 -2.511 13.201 8.041 1.00 36.25 C
ATOM 20 N ASP A 3 1.234 10.456 5.321 1.00 72.41 N
ATOM 45 CA GLU A 8 8.901 4.321 -1.234 1.00 94.87 C
ATOM 67 N LYS A 14 15.123 -2.456 -8.901 1.00 98.23 N
Yellow column = B-factor = pLDDT score for this residue
Atom record identifier

The B-factor values in AlphaFold files range from 0 to 100 — the pLDDT score scale. In a crystal structure B-factors are in ų and can be any positive number. The shared column format means the same PyMOL commands work for both, but the color scales and interpretations differ completely: high B-factor in a crystal structure means flexible, while high B-factor in AlphaFold means confident.

Don’t use crystal structure B-factor interpretation for AlphaFold files
If you open an AlphaFold PDB and color it with a crystal structure B-factor scale — where high B-factor is red (flexible) and low is blue (rigid) — the meaning is inverted. High pLDDT (blue in AlphaFold’s convention) means high confidence. Always confirm which type of structure you have before coloring by B-factor.

The standard AlphaFold color scheme

The AlphaFold Database uses a specific four-color confidence scheme. While you can use any color gradient in PyMOL, using the official AFDB colors makes figures immediately recognizable to reviewers and readers familiar with AlphaFold:

90–100
Very high confidence (dark blue) — backbone and side chains reliable. Use directly for structural analysis.
70–90
Confident (cyan/teal) — backbone reliable, some side chain uncertainty. Suitable for most analysis.
50–70
Low confidence (yellow) — may represent flexible or disordered region. Treat with caution.
Below 50
Very low / disordered (orange-red) — likely intrinsically disordered. Do not use for structural analysis.

The one-command coloring workflow

PyMOL command line — complete pLDDT coloring in 4 lines
# Load AlphaFold structure (from database download or ColabFold)
load AF-P04637-F1-model_v4.pdb

# Set up display
as cartoon
set cartoon_fancy_helices, 1

# Color by pLDDT — this is the core command
spectrum b, blue_cyan_yellow_orange_red, minimum=50, maximum=100

The three arguments to spectrum are what make this work correctly:

  • b — tells PyMOL to use the B-factor column as the data source
  • blue_cyan_yellow_orange_red — a five-stop gradient from high-confidence blue through low-confidence red, matching the AFDB visual convention
  • minimum=50, maximum=100 — clamps the scale so that everything below 50 gets the same lowest color and the full gradient covers the meaningful 50–100 range. Without this, PyMOL scales to the actual min/max in the file, compressing the useful range.
Why minimum=50 not 0?
AlphaFold doesn’t meaningfully distinguish between pLDDT 5 and pLDDT 40 — both signal genuine disorder. Setting minimum=50 means everything below 50 gets the same “very low confidence” color rather than showing a misleading gradient within the disordered region. This produces a cleaner, more informative figure.

Color scale variants for different contexts

Available color scales for pLDDT visualization
Standard AFDB — five stop gradient
50627587100
spectrum b, blue_cyan_yellow_orange_red, minimum=50, maximum=100
Simple two-color — intuitive for non-specialists
5075100
spectrum b, blue_white_red, minimum=50, maximum=100
Green-red — alternative for colorblind accessibility
50627587100
spectrum b, green_white_red, minimum=50, maximum=100
Binary — high vs low confidence only
5070100
# Binary: above/below 70 threshold
color slate, b > 70
color salmon, b <= 70
Presentation / dark background
spectrum b, cyan_yellow_red, min=50, max=100
Brighter colors visible against black slide backgrounds. Avoid for journal figures on white.
Confident regions only
spectrum b, blue_white, min=70, max=100
Focus the gradient exclusively on the high-confidence range — useful when disordered regions are not the story.

Interpreting what you see

After coloring, the immediate goal is to check two things before using the structure for any downstream analysis. First, look at your region of interest — the binding site, active site, or domain you’re studying. If it’s blue or teal, proceed. If it’s yellow, orange, or red, the geometry there is unreliable and conclusions drawn from it are not trustworthy.

PyMOL command line — interrogating specific residue confidence
# Print pLDDT of all residues in your binding site
select site, resi 175+248+249+273+282 and chain A
iterate site and name CA, print(resi, resn, b)

# Calculate mean pLDDT of the site (report this in methods)
stored.plddt = []
iterate site and name CA, stored.plddt.append(b)
print("Mean pLDDT:", sum(stored.plddt)/len(stored.plddt))

# Select all confident residues for downstream analysis
select confident_regions, b > 70
select uncertain_regions, b >= 50 and b < 70
select disordered_regions, b < 50

Selective confidence coloring

For figures that combine pLDDT confidence coloring with other information — chain identity, a highlighted binding site, or a comparison with another structure — apply the spectrum to a specific selection rather than the whole protein:

PyMOL command line
# Color whole protein gray, then pLDDT only on the domain of interest
color gray70, polymer
spectrum b, blue_cyan_yellow_orange_red, resi 100-250, minimum=50, maximum=100

# Highlight the binding site by pLDDT, gray the rest
select site, byres (LIG around 5)
color gray70, polymer
spectrum b, blue_red, site, minimum=50, maximum=100
show sticks, site
util.cbag LIG

# Color by pLDDT but highlight one key residue differently
spectrum b, blue_cyan_yellow_orange_red, minimum=50, maximum=100
color red, resi 273 and chain A    # override one key residue

Publication figure workflow

plddt_figure.pml — complete publication script
Replace filename and region selections for your structure
# ── Load ────────────────────────────────────────────
load AF-P04637-F1-model_v4.pdb
as cartoon
hide everything, resn HOH

# ── Color by pLDDT ──────────────────────────────────
spectrum b, blue_cyan_yellow_orange_red, minimum=50, maximum=100

# ── Cartoon quality ─────────────────────────────────
set cartoon_fancy_helices, 1
set cartoon_smooth_loops, 1
set cartoon_tube_radius, 0.4

# ── Figure settings ─────────────────────────────────
bg_color white
set ray_opaque_background, 1
set ambient, 0.40
set specular, 0.25
set light_count, 4
set antialias, 2

# ── Orient (paste get_view output here) ─────────────
orient

# ── Export ──────────────────────────────────────────
png plddt_figure.png, width=1200, height=900, dpi=300, ray=1
What to include in your figure legend
When publishing a pLDDT-colored figure, the legend should state: "Structure colored by AlphaFold2 pLDDT confidence score. Dark blue: very high confidence (pLDDT >90); cyan: confident (70–90); yellow: low confidence (50–70); orange-red: very low confidence (<50)." This four-sentence description is all that's needed — reviewers familiar with AlphaFold will immediately recognize the scheme.
Reporting binding site pLDDT in your methods
Always report the mean pLDDT of your binding site or region of interest when publishing AlphaFold-based docking or structural analysis. Example: "The predicted binding site residues (Arg175, Arg248, Arg273, Pro190, Val197) had a mean pLDDT of 87.4, indicating high structural confidence in the binding site region." This is now expected by reviewers at most major journals.

pLDDT coloring in one paragraph

AlphaFold stores pLDDT confidence scores in the PDB B-factor column — making PyMOL coloring a single command: spectrum b, blue_cyan_yellow_orange_red, minimum=50, maximum=100. The minimum=50 clamp is essential — without it the gradient compresses into the disordered range and loses meaning. Blue is high confidence, red is low. Always check your binding site or region of interest before drawing structural conclusions: if key residues are yellow or red, the predicted geometry is unreliable. Report the mean pLDDT of your site in the methods section. Save the coloring command in a .pml script alongside get_view output so the exact figure can be regenerated when reviewers ask for revisions.

Last updated on

Similar Posts

Leave a Reply

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