Ahmed Doghri Logo Image
Ahmed Doghri

structuregrade

A single confidence color hides weak loops. structuregrade grades every residue, and on real AlphaFold models it now gives hemoglobin an A and p53 a C, after I found its clash screen had been failing every real protein's backbone.

structuregrade protein confidence inspection gate
structuregrade working browser demo

Confidence Is Local

A protein model can look finished while a loop is effectively unresolved, and one global score says little about interfaces, domain placement, or atomic clashes.

structuregrade parses PDB coordinates and AlphaFold-style pLDDT values from the B-factor column, groups atoms into residues, reports confidence bands, and runs an inter-residue clash screen.

Turn Color Into a Gate

The report exposes residue count, chain count, mean confidence, low-confidence residues, clash count, and an explainable grade, all from one engine shared by the CLI, the API, the workbench, and the tests.

The Demo

The eight-residue fixture gets a C: mean pLDDT 71.88, two residues at or above 90, two below 50, and no inter-residue clashes. It's a triage gate, not structural validation. You still need PAE for domain placement and interfaces, and experimental evidence still decides.

The Clash Screen Failed Every Real Protein

The clash check skipped atom pairs within one residue but not the one bond that legitimately crosses a residue boundary: the peptide bond from each residue's carbon to the next residue's nitrogen, about 1.33 Å, comfortably inside the 1.5 Å clash threshold. The demo fixture has one C-alpha atom per residue, so it never contained that bond and never showed the bug. The fix excludes exactly the C(i) to N(i+1) pair between adjacent residues in a chain. Every other close contact is still caught.

Auditing this page, I ran it on the inputs it's actually for: real, full-atom models from the AlphaFold Protein Structure Database. Hemoglobin alpha, a confident fold with a mean pLDDT of 98.06, grades A with zero clashes. The pre-fix code failed it with a C and 141 clashes, one for every peptide bond in its backbone. p53 grades C, for the right reason this time. Its transactivation and C-terminal regions are intrinsically disordered, and pLDDT puts 117 of its 393 residues below 50.

Both models now ship as CC-BY-4.0 regression fixtures, so the tool can't quietly go back to grading only the toy it was built on. CI also builds the Docker image and fetches the workbench. 7 tests pass across Python 3.10 through 3.13.

Research Basis

AlphaFold's own confidence guidance treats pLDDT as a per-residue local confidence measure and recommends PAE for the relative placement of domains. Read the AlphaFold confidence guidance.

Try It

No dependencies:

git clone https://github.com/ahmeddoghri/structuregrade && cd structuregrade
pip install -e .
structuregrade demo
python -m unittest tests.test_real_alphafold -v   # hemoglobin A, p53 C
structuregrade serve                              # paste any AlphaFold PDB on :8090

Tools Used

Python
AlphaFold
PDB
pLDDT
Protein Geometry
Bond Geometry Validation
Docker