Skill: by-database
Use the BY MCP database tools to query PDB, UniProt, and SAbDab for target
characterization, antibody scaffold selection, and competition analysis.
When to Use This Skill
Use this skill when you need:
- ✅ Structural metadata for a target (resolution, method, organism, chains)
- ✅ Interface residue lists for hotspot selection in PXDesign / BoltzGen
- ✅ Canonical UniProt sequence, domain boundaries, or known variants
- ✅ Existing antibody-antigen complexes for scaffold selection or competition analysis
- ✅ Cross-referencing PDB residue numbering with UniProt positions
- ✅ Verifying chain composition before generating a design spec
Don't use this skill for:
- ❌ Full target research narrative or literature review → use
by-research
- ❌ Epitope hotspot scoring or surface analysis → use
by-epitope-analysis
- ❌ Scoring designs (ipSAE, ipTM, liabilities) → use
by-scoring / by-screening
- ❌ Web search or PubMed lookups → fall back to PubMed/bioRxiv tools then WebSearch
- ❌ Submitting compute jobs → use
boltzgen, pxdesign, protenix skills
Quick Start
Look up a target end-to-end in three calls:
mcp__by-pdb__pdb_search(query="PD-L1", max_results=10)
mcp__by-uniprot__uniprot_search(query="CD274 human", max_results=5)
mcp__by-sabdab__sabdab_search_by_antigen(antigen_name="PD-L1", max_results=20)
For batch enrichment of a known list of PDB IDs without an MCP loop:
python scripts/batch_pdb_lookup.py --ids 7S4S 6XWG 5JDS --out enriched.csv
✅ VERIFICATION: Expect ✓ batch_pdb_lookup completed: 3 rows -> enriched.csv.
Inputs
Required (at least one of):
- PDB ID — 4-character RCSB identifier (e.g.
7S4S). Source: mcp__by-pdb__pdb_search.
- UniProt accession — e.g.
Q9NZQ7. Source: mcp__by-uniprot__uniprot_search.
- Target name / gene symbol — e.g.
"PD-L1", "CD274". Used as free-text query.
- Antigen name — for SAbDab antibody lookups (e.g.
"HER2").
Optional:
- Chain IDs — author chain IDs from
mcp__by-pdb__pdb_get_chains (e.g. A, H, L).
- Distance cutoff — Angstroms for interface analysis (default 5.0; 4.0 strict, 6.0 extended).
- Species filter — for SAbDab queries (e.g.
"HOMO SAPIENS").
- Output directory — for
mcp__by-pdb__pdb_download.
See references/pdb-quality-metrics.md for
resolution and completeness thresholds.
Outputs
All MCP tools return JSON strings. Parse before display — never show raw JSON to the user.
PDB tool outputs:
pdb_search → list of {pdb_id, title, method, resolution, release_date}.
pdb_fetch_structure → object with polymer_entity_count, organism, plus the search fields.
pdb_get_chains → list of {chain_id, entity_id, molecule_name, sequence, length}.
pdb_interface_residues → {chain1_residues:[{resname,resseq}], chain2_residues:[...], contact_count}.
pdb_download → {path, size_bytes}. Files are CIF (preferred) or PDB.
UniProt tool outputs:
uniprot_search → list of {accession, name, organism, gene_name, length, reviewed}.
uniprot_fetch_protein → full record incl. sequence, function_description, subcellular_location.
uniprot_get_domains → list of {type, description, start, end}.
uniprot_get_variants → list of {type, position, original, variation, description}.
SAbDab tool outputs:
sabdab_search_antibodies / sabdab_search_by_antigen → list of antibody PDB records.
sabdab_get_structure → detailed record incl. r_free, cdr_lengths, chain_pairings.
sabdab_cdr_sequences → {H1, H2, H3, L1, L2, L3} with {sequence, length} each.
Script outputs (this skill's scripts/):
batch_pdb_lookup.py → CSV with one row per PDB ID (resolution, organism, chain count, ligands).
find_similar_targets.py → CSV with related UniProt/PDB entries ranked by % sequence identity.
Clarification Questions
⚠️ CRITICAL: ASK THIS FIRST. Confirm the user actually has identifiers in hand.
Identifiers (ASK THIS FIRST):
- Do you have a PDB ID, UniProt accession, gene symbol, or just a target name?
- If only a target name, we will start with
mcp__by-pdb__pdb_search and
mcp__by-uniprot__uniprot_search to resolve canonical IDs.
Organism:
- Human, mouse, viral, other?
- Determines which UniProt entry is canonical and which PDB structures are relevant.
Modality intent (drives SAbDab usage):
- Antibody (Fab/IgG), nanobody (VHH), or non-antibody binder?
- Nanobody designs need templates with
light_chain = "". Fabs need both H and L.
Resolution threshold:
- Default ≤2.5 Å for X-ray. Cryo-EM may go to 3.0–3.5 Å.
- Lower the bar for novel targets where nothing better exists.
Bound vs apo state:
- For interface analysis you need holo (bound) structures.
- Apo structures are fine for general topology but miss the binding interface.
Downstream tool:
- PXDesign (de novo binder), BoltzGen (antibody/nanobody), or Protenix (refold only)?
- This affects which fields you must extract (e.g. hotspot range notation vs. CDR lengths).
Cross-reference need:
- Do you need PDB→UniProt numbering reconciliation?
- Required when reporting hotspot positions across data sources.
Standard Workflow
🚨 MANDATORY: USE MCP TOOLS AS THE PRIMARY DATA PATH 🚨
Do not WebSearch for data that exists in PDB, UniProt, or SAbDab. Batch your MCP
calls and present one consolidated summary — never expose raw JSON.
Target Characterization (PDB-first)
mcp__by-pdb__pdb_search(query="<target>") — find available structures.
mcp__by-pdb__pdb_fetch_structure(pdb_id="<top>") — compare resolution + method.
mcp__by-pdb__pdb_get_chains(pdb_id="<top>") — identify target chain vs. binder vs. ligands.
mcp__by-uniprot__uniprot_search(query="<gene> <organism>") then
mcp__by-uniprot__uniprot_fetch_protein — sequence, function, location.
mcp__by-uniprot__uniprot_get_domains(accession=...) — domain boundaries.
mcp__by-pdb__pdb_interface_residues(pdb_id=..., chain1=..., chain2=...) — epitope residues.
mcp__by-uniprot__uniprot_get_variants(accession=...) — flag polymorphic hotspots.
mcp__by-pdb__pdb_download(pdb_id=..., format="cif") — local file for BY design tools.
Antibody Scaffold Selection (SAbDab-first)
mcp__by-sabdab__sabdab_search_by_antigen(antigen_name="<target>") — known antibodies.
mcp__by-sabdab__sabdab_get_structure(pdb_id="<top>") — resolution, species, subclass, CDR lengths.
mcp__by-sabdab__sabdab_cdr_sequences(pdb_id="<top>") — CDR architectures.
- Match CDRH3 length to target depth (10–15 standard, 15–20+ deep pockets, 8–10 flat).
- Pick a high-resolution human (or humanized) scaffold.
mcp__by-pdb__pdb_fetch_structure(pdb_id="<scaffold>") — final quality check.
Competition Analysis
mcp__by-sabdab__sabdab_search_by_antigen — all known antibodies.
mcp__by-pdb__pdb_search — non-antibody binders too.
mcp__by-pdb__pdb_interface_residues on each competitor — map epitopes.
- Compare interface residues across binders → conserved hotspots vs. novel epitope opportunities.
mcp__by-uniprot__uniprot_get_variants — does any escape mutation hit competitor sites?
Batch Lookups (use scripts)
For >5 PDB IDs or >5 UniProt accessions, prefer the scripts in this skill — they
deduplicate, retry on transient errors, and emit a single CSV instead of N JSON blobs:
python scripts/batch_pdb_lookup.py --ids 7S4S 6XWG 5JDS 4HHB --out targets.csv
python scripts/find_similar_targets.py --uniprot P01375 --max-hits 25 --out homologs.csv
✅ VERIFICATION: Each script prints ✓ <name> completed: N rows -> <path>.
When Scripts Fail
Hierarchy (apply in order):
- Fix and retry (90%) — Install missing dep (
pip install httpx biopython),
then re-run with the same args.
- Modify script (5%) — Edit the local script file (e.g. tighten resolution
filter, change e-value threshold for BLAST).
- Use as reference (4%) — Read the script and call the MCP tools manually
for one-off cases.
- Write from scratch (1%) — Only if the underlying RCSB / UniProt / SAbDab
API has changed in a way that breaks the script. Document why.
Decision tree:
- HTTP 429 / rate limit → step 1 (the script retries with backoff; re-run).
- Missing
httpx / biopython → step 1 (pip install).
- Wrong output columns → step 2 (modify script).
- Tool unavailable in environment → step 3 (MCP fallback).
- API schema changed upstream → step 4 (rewrite + report).
Decision Points
When to prefer X-ray vs. cryo-EM
See references/pdb-quality-metrics.md. Short
form: X-ray ≤2.5 Å for interface work; cryo-EM acceptable to ~3.0 Å for large
complexes where X-ray is impossible.
Holo vs. apo selection
For interface residues you MUST use a holo (bound) structure. Apo can confirm
domain architecture but contact residues will be missing or rearranged.
Reviewed vs. unreviewed UniProt
Always prefer reviewed (Swiss-Prot). Unreviewed (TrEMBL) entries may lack
domain, variant, and function annotations. See
references/uniprot-fields.md.
Antigen-deposited vs. validated SAbDab entries
SAbDab indexes the PDB; presence in SAbDab does NOT mean affinity has been
independently validated. See references/sabdab-best-practices.md.
Common Issues
| Issue |
Possible Cause |
Solution |
Details |
pdb_search returns empty list |
Target name doesn't match any title or keyword |
Try gene symbol, organism, or UniProt accession via uniprot_search first |
references/pdb-quality-metrics.md |
pdb_interface_residues errors Chain not found |
Wrong chain ID (case, label vs. auth) |
Run pdb_get_chains first; use the exact chain_id field returned |
references/pdb-quality-metrics.md |
| Interface residue count is zero |
distance_cutoff too strict, or apo structure |
Increase cutoff to 6.0 Å; switch to a holo PDB ID |
references/pdb-quality-metrics.md |
Resolution shows null |
Cryo-EM entry without combined resolution, or NMR |
Check method; for NMR resolution is not defined; report ensemble size instead |
references/pdb-quality-metrics.md |
uniprot_fetch_protein returns sparse fields |
Unreviewed (TrEMBL) entry |
Search with reviewed:true or pick the canonical Swiss-Prot accession |
references/uniprot-fields.md |
| Wrong isoform sequence |
Default canonical does not match construct |
Inspect isoforms; choose the one matching your PDB chain length |
references/uniprot-fields.md |
| PDB resseq does not match UniProt position |
Construct tags, truncations, or signal peptide cleavage |
Align PDB chain sequence to UniProt; offset = first matched residue |
references/uniprot-fields.md |
| SAbDab keyword search is slow |
Tool downloads full DB (~8 MB) then filters |
Use PDB-code lookups when possible; cache results between calls |
references/sabdab-best-practices.md |
sabdab_search_by_antigen returns zero hits |
No deposited antibody co-crystals |
Fall back to pdb_search for non-antibody binders; consider homolog targets |
references/sabdab-best-practices.md |
| CDRH3 length mismatch with target depth |
Picked the wrong scaffold |
Match CDRH3 within ±2 residues (10–15 standard, 15–20 deep pockets, 8–10 flat) |
references/sabdab-best-practices.md |
batch_pdb_lookup.py reports httpx missing |
Dependency not installed |
pip install httpx and re-run |
See script header |
find_similar_targets.py BLAST returns 503 |
UniProt REST BLAST is rate-limited |
Re-run after 30 s; script applies exponential backoff automatically |
See script header |
| Antibody scaffold has light_chain but you want VHH |
Picked a Fab template by mistake |
Filter SAbDab results where light_chain == "" |
references/sabdab-best-practices.md |
| Engineered / chimeric SAbDab record |
Scaffold is not natively the listed species |
Check engineered field; prefer fully natural human / camelid scaffolds for therapeutics |
references/sabdab-best-practices.md |
Best Practices
- 🚨 CRITICAL: Always resolve identifiers via search before assuming an accession or PDB ID exists.
- ✅ Prefer reviewed (Swiss-Prot) UniProt entries.
- ✅ Prefer X-ray ≤2.5 Å, holo (bound) structures for interface analysis.
- ✅ Always run
pdb_get_chains before pdb_interface_residues so chain IDs are exact.
- ✅ Cross-reference PDB residue numbers (
resseq) with UniProt positions by sequence alignment.
- ✅ Match CDRH3 length to target topology; do not blindly default to a popular scaffold.
- ✅ Use mmCIF (
format="cif") — handles large structures and multi-character chain IDs.
- ❌ DON'T expose raw MCP JSON to the user; summarize into tables.
- ❌ DON'T WebSearch when an MCP database tool can answer the question.
- ✨ Batch >5 identifier lookups through
scripts/batch_pdb_lookup.py instead of looped MCP calls.
Suggested Next Steps
After running this skill, hand off to one of:
by-research — when you need a synthesized target dossier with literature
triangulation, critique, and design recommendation. This skill is the data
layer underneath by-research Phase 3.
by-epitope-analysis — once you have interface residues, score epitope
drugability and select hotspots for design.
by-scoring / by-screening — when you already have designs and
need to evaluate ipSAE, ipTM, and liabilities.
boltzgen — once a target chain, hotspot range, and scaffold candidates
are confirmed, hand off CDR templates and the holo PDB to BoltzGen.
pxdesign — for non-antibody binders, hand off the holo CIF and hotspot
range notation to PXDesign.
Why this chaining works: database lookups are the deterministic, citation-grade
input layer. Downstream skills assume the data is already canonical (correct
accession, correct chain IDs, correct residue numbering). Skipping this skill is
the single biggest cause of failed campaigns.
Related Skills
Upstream:
by-session — environment + config check before any database work.
Downstream:
by-research — full research dossier with literature.
by-epitope-analysis — hotspot scoring from interface residues.
boltzgen, pxdesign, protenix — design and refold using the PDB/CIF you fetched.
Alternative / Complementary:
by-knowledge — query the project knowledge graph for prior campaigns on the same target.
References
Detailed documentation:
- references/pdb-quality-metrics.md —
Resolution thresholds, holo vs. apo, organism filtering, missing residues,
structural completeness; X-ray vs. cryo-EM selection.
- references/uniprot-fields.md — Important
UniProt fields for design (sequence, domains, PTMs, isoforms, species) and
efficient query patterns.
- references/sabdab-best-practices.md —
Antibody database queries (by target, germline, affinity) and the
deposited-vs-validated caveat.
Scripts:
- scripts/batch_pdb_lookup.py — CLI that reads
a list of PDB IDs and writes an enriched CSV (resolution, method, organism,
chain count, ligands).
- scripts/find_similar_targets.py — CLI that
takes a UniProt accession or PDB ID and returns a ranked list of related
entries by sequence identity.
Official documentation:
Identifier quick reference:
| Database |
Identifier |
Example |
Source |
| PDB |
4-char ID |
7S4S |
mcp__by-pdb__pdb_search |
| UniProt |
Accession |
Q9NZQ7 |
mcp__by-uniprot__uniprot_search |
| SAbDab |
PDB ID |
1ahw |
mcp__by-sabdab__sabdab_search_antibodies |
| Chain |
Auth chain ID |
A, B, H, L |
mcp__by-pdb__pdb_get_chains |
| Residue |
resseq (int) |
115 |
mcp__by-pdb__pdb_interface_residues |
1---2name: by-database3description: Skill: by-database4---56# Skill: by-database78Use the BY MCP database tools to query PDB, UniProt, and SAbDab for target9characterization, antibody scaffold selection, and competition analysis.1011---1213## When to Use This Skill1415Use this skill when you need:1617- ✅ Structural metadata for a target (resolution, method, organism, chains)18- ✅ Interface residue lists for hotspot selection in PXDesign / BoltzGen19- ✅ Canonical UniProt sequence, domain boundaries, or known variants20- ✅ Existing antibody-antigen complexes for scaffold selection or competition analysis21- ✅ Cross-referencing PDB residue numbering with UniProt positions22- ✅ Verifying chain composition before generating a design spec2324**Don't use this skill for:**2526- ❌ Full target research narrative or literature review → use `by-research`27- ❌ Epitope hotspot scoring or surface analysis → use `by-epitope-analysis`28- ❌ Scoring designs (ipSAE, ipTM, liabilities) → use `by-scoring` / `by-screening`29- ❌ Web search or PubMed lookups → fall back to PubMed/bioRxiv tools then WebSearch30- ❌ Submitting compute jobs → use `boltzgen`, `pxdesign`, `protenix` skills3132---3334## Quick Start3536Look up a target end-to-end in three calls:3738```text39mcp__by-pdb__pdb_search(query="PD-L1", max_results=10)40mcp__by-uniprot__uniprot_search(query="CD274 human", max_results=5)41mcp__by-sabdab__sabdab_search_by_antigen(antigen_name="PD-L1", max_results=20)42```4344For batch enrichment of a known list of PDB IDs without an MCP loop:4546```bash47python scripts/batch_pdb_lookup.py --ids 7S4S 6XWG 5JDS --out enriched.csv48```4950✅ **VERIFICATION:** Expect `✓ batch_pdb_lookup completed: 3 rows -> enriched.csv`.5152---5354## Inputs5556**Required (at least one of):**5758- **PDB ID** — 4-character RCSB identifier (e.g. `7S4S`). Source: `mcp__by-pdb__pdb_search`.59- **UniProt accession** — e.g. `Q9NZQ7`. Source: `mcp__by-uniprot__uniprot_search`.60- **Target name / gene symbol** — e.g. `"PD-L1"`, `"CD274"`. Used as free-text query.61- **Antigen name** — for SAbDab antibody lookups (e.g. `"HER2"`).6263**Optional:**6465- **Chain IDs** — author chain IDs from `mcp__by-pdb__pdb_get_chains` (e.g. `A`, `H`, `L`).66- **Distance cutoff** — Angstroms for interface analysis (default 5.0; 4.0 strict, 6.0 extended).67- **Species filter** — for SAbDab queries (e.g. `"HOMO SAPIENS"`).68- **Output directory** — for `mcp__by-pdb__pdb_download`.6970See [references/pdb-quality-metrics.md](references/pdb-quality-metrics.md) for71resolution and completeness thresholds.7273---7475## Outputs7677All MCP tools return JSON strings. Parse before display — never show raw JSON to the user.7879**PDB tool outputs:**8081- `pdb_search` → list of `{pdb_id, title, method, resolution, release_date}`.82- `pdb_fetch_structure` → object with `polymer_entity_count`, `organism`, plus the search fields.83- `pdb_get_chains` → list of `{chain_id, entity_id, molecule_name, sequence, length}`.84- `pdb_interface_residues` → `{chain1_residues:[{resname,resseq}], chain2_residues:[...], contact_count}`.85- `pdb_download` → `{path, size_bytes}`. Files are CIF (preferred) or PDB.8687**UniProt tool outputs:**8889- `uniprot_search` → list of `{accession, name, organism, gene_name, length, reviewed}`.90- `uniprot_fetch_protein` → full record incl. `sequence`, `function_description`, `subcellular_location`.91- `uniprot_get_domains` → list of `{type, description, start, end}`.92- `uniprot_get_variants` → list of `{type, position, original, variation, description}`.9394**SAbDab tool outputs:**9596- `sabdab_search_antibodies` / `sabdab_search_by_antigen` → list of antibody PDB records.97- `sabdab_get_structure` → detailed record incl. `r_free`, `cdr_lengths`, `chain_pairings`.98- `sabdab_cdr_sequences` → `{H1, H2, H3, L1, L2, L3}` with `{sequence, length}` each.99100**Script outputs (this skill's `scripts/`):**101102- `batch_pdb_lookup.py` → CSV with one row per PDB ID (resolution, organism, chain count, ligands).103- `find_similar_targets.py` → CSV with related UniProt/PDB entries ranked by % sequence identity.104105---106107## Clarification Questions108109**⚠️ CRITICAL: ASK THIS FIRST.** Confirm the user actually has identifiers in hand.1101111. **Identifiers** (ASK THIS FIRST):112 - Do you have a PDB ID, UniProt accession, gene symbol, or just a target name?113 - If only a target name, we will start with `mcp__by-pdb__pdb_search` and114 `mcp__by-uniprot__uniprot_search` to resolve canonical IDs.1151162. **Organism:**117 - Human, mouse, viral, other?118 - Determines which UniProt entry is canonical and which PDB structures are relevant.1191203. **Modality intent (drives SAbDab usage):**121 - Antibody (Fab/IgG), nanobody (VHH), or non-antibody binder?122 - Nanobody designs need templates with `light_chain = ""`. Fabs need both H and L.1231244. **Resolution threshold:**125 - Default ≤2.5 Å for X-ray. Cryo-EM may go to 3.0–3.5 Å.126 - Lower the bar for novel targets where nothing better exists.1271285. **Bound vs apo state:**129 - For interface analysis you need holo (bound) structures.130 - Apo structures are fine for general topology but miss the binding interface.1311326. **Downstream tool:**133 - PXDesign (de novo binder), BoltzGen (antibody/nanobody), or Protenix (refold only)?134 - This affects which fields you must extract (e.g. hotspot range notation vs. CDR lengths).1351367. **Cross-reference need:**137 - Do you need PDB→UniProt numbering reconciliation?138 - Required when reporting hotspot positions across data sources.139140---141142## Standard Workflow143144🚨 **MANDATORY: USE MCP TOOLS AS THE PRIMARY DATA PATH** 🚨145146Do not WebSearch for data that exists in PDB, UniProt, or SAbDab. Batch your MCP147calls and present one consolidated summary — never expose raw JSON.148149### Target Characterization (PDB-first)1501511. `mcp__by-pdb__pdb_search(query="<target>")` — find available structures.1522. `mcp__by-pdb__pdb_fetch_structure(pdb_id="<top>")` — compare resolution + method.1533. `mcp__by-pdb__pdb_get_chains(pdb_id="<top>")` — identify target chain vs. binder vs. ligands.1544. `mcp__by-uniprot__uniprot_search(query="<gene> <organism>")` then155 `mcp__by-uniprot__uniprot_fetch_protein` — sequence, function, location.1565. `mcp__by-uniprot__uniprot_get_domains(accession=...)` — domain boundaries.1576. `mcp__by-pdb__pdb_interface_residues(pdb_id=..., chain1=..., chain2=...)` — epitope residues.1587. `mcp__by-uniprot__uniprot_get_variants(accession=...)` — flag polymorphic hotspots.1598. `mcp__by-pdb__pdb_download(pdb_id=..., format="cif")` — local file for BY design tools.160161### Antibody Scaffold Selection (SAbDab-first)1621631. `mcp__by-sabdab__sabdab_search_by_antigen(antigen_name="<target>")` — known antibodies.1642. `mcp__by-sabdab__sabdab_get_structure(pdb_id="<top>")` — resolution, species, subclass, CDR lengths.1653. `mcp__by-sabdab__sabdab_cdr_sequences(pdb_id="<top>")` — CDR architectures.1664. Match CDRH3 length to target depth (10–15 standard, 15–20+ deep pockets, 8–10 flat).1675. Pick a high-resolution human (or humanized) scaffold.1686. `mcp__by-pdb__pdb_fetch_structure(pdb_id="<scaffold>")` — final quality check.169170### Competition Analysis1711721. `mcp__by-sabdab__sabdab_search_by_antigen` — all known antibodies.1732. `mcp__by-pdb__pdb_search` — non-antibody binders too.1743. `mcp__by-pdb__pdb_interface_residues` on each competitor — map epitopes.1754. Compare interface residues across binders → conserved hotspots vs. novel epitope opportunities.1765. `mcp__by-uniprot__uniprot_get_variants` — does any escape mutation hit competitor sites?177178### Batch Lookups (use scripts)179180For >5 PDB IDs or >5 UniProt accessions, prefer the scripts in this skill — they181deduplicate, retry on transient errors, and emit a single CSV instead of N JSON blobs:182183```bash184python scripts/batch_pdb_lookup.py --ids 7S4S 6XWG 5JDS 4HHB --out targets.csv185python scripts/find_similar_targets.py --uniprot P01375 --max-hits 25 --out homologs.csv186```187188✅ **VERIFICATION:** Each script prints `✓ <name> completed: N rows -> <path>`.189190---191192## When Scripts Fail193194Hierarchy (apply in order):1951961. **Fix and retry (90%)** — Install missing dep (`pip install httpx biopython`),197 then re-run with the same args.1982. **Modify script (5%)** — Edit the local script file (e.g. tighten resolution199 filter, change e-value threshold for BLAST).2003. **Use as reference (4%)** — Read the script and call the MCP tools manually201 for one-off cases.2024. **Write from scratch (1%)** — Only if the underlying RCSB / UniProt / SAbDab203 API has changed in a way that breaks the script. Document why.204205Decision tree:206- HTTP 429 / rate limit → step 1 (the script retries with backoff; re-run).207- Missing `httpx` / `biopython` → step 1 (`pip install`).208- Wrong output columns → step 2 (modify script).209- Tool unavailable in environment → step 3 (MCP fallback).210- API schema changed upstream → step 4 (rewrite + report).211212---213214## Decision Points215216### When to prefer X-ray vs. cryo-EM217218See [references/pdb-quality-metrics.md](references/pdb-quality-metrics.md). Short219form: X-ray ≤2.5 Å for interface work; cryo-EM acceptable to ~3.0 Å for large220complexes where X-ray is impossible.221222### Holo vs. apo selection223224For interface residues you MUST use a holo (bound) structure. Apo can confirm225domain architecture but contact residues will be missing or rearranged.226227### Reviewed vs. unreviewed UniProt228229Always prefer reviewed (Swiss-Prot). Unreviewed (TrEMBL) entries may lack230domain, variant, and function annotations. See231[references/uniprot-fields.md](references/uniprot-fields.md).232233### Antigen-deposited vs. validated SAbDab entries234235SAbDab indexes the PDB; presence in SAbDab does NOT mean affinity has been236independently validated. See [references/sabdab-best-practices.md](references/sabdab-best-practices.md).237238---239240## Common Issues241242| Issue | Possible Cause | Solution | Details |243|-------|----------------|----------|---------|244| `pdb_search` returns empty list | Target name doesn't match any title or keyword | Try gene symbol, organism, or UniProt accession via `uniprot_search` first | [references/pdb-quality-metrics.md](references/pdb-quality-metrics.md) |245| `pdb_interface_residues` errors `Chain not found` | Wrong chain ID (case, label vs. auth) | Run `pdb_get_chains` first; use the exact `chain_id` field returned | [references/pdb-quality-metrics.md](references/pdb-quality-metrics.md) |246| Interface residue count is zero | `distance_cutoff` too strict, or apo structure | Increase cutoff to 6.0 Å; switch to a holo PDB ID | [references/pdb-quality-metrics.md](references/pdb-quality-metrics.md) |247| Resolution shows `null` | Cryo-EM entry without combined resolution, or NMR | Check `method`; for NMR resolution is not defined; report ensemble size instead | [references/pdb-quality-metrics.md](references/pdb-quality-metrics.md) |248| `uniprot_fetch_protein` returns sparse fields | Unreviewed (TrEMBL) entry | Search with `reviewed:true` or pick the canonical Swiss-Prot accession | [references/uniprot-fields.md](references/uniprot-fields.md) |249| Wrong isoform sequence | Default canonical does not match construct | Inspect isoforms; choose the one matching your PDB chain length | [references/uniprot-fields.md](references/uniprot-fields.md) |250| PDB resseq does not match UniProt position | Construct tags, truncations, or signal peptide cleavage | Align PDB chain sequence to UniProt; offset = first matched residue | [references/uniprot-fields.md](references/uniprot-fields.md) |251| SAbDab keyword search is slow | Tool downloads full DB (~8 MB) then filters | Use PDB-code lookups when possible; cache results between calls | [references/sabdab-best-practices.md](references/sabdab-best-practices.md) |252| `sabdab_search_by_antigen` returns zero hits | No deposited antibody co-crystals | Fall back to `pdb_search` for non-antibody binders; consider homolog targets | [references/sabdab-best-practices.md](references/sabdab-best-practices.md) |253| CDRH3 length mismatch with target depth | Picked the wrong scaffold | Match CDRH3 within ±2 residues (10–15 standard, 15–20 deep pockets, 8–10 flat) | [references/sabdab-best-practices.md](references/sabdab-best-practices.md) |254| `batch_pdb_lookup.py` reports `httpx` missing | Dependency not installed | `pip install httpx` and re-run | See script header |255| `find_similar_targets.py` BLAST returns 503 | UniProt REST BLAST is rate-limited | Re-run after 30 s; script applies exponential backoff automatically | See script header |256| Antibody scaffold has light_chain but you want VHH | Picked a Fab template by mistake | Filter SAbDab results where `light_chain == ""` | [references/sabdab-best-practices.md](references/sabdab-best-practices.md) |257| Engineered / chimeric SAbDab record | Scaffold is not natively the listed species | Check `engineered` field; prefer fully natural human / camelid scaffolds for therapeutics | [references/sabdab-best-practices.md](references/sabdab-best-practices.md) |258259---260261## Best Practices2622631. 🚨 **CRITICAL:** Always resolve identifiers via search before assuming an accession or PDB ID exists.2642. ✅ Prefer reviewed (Swiss-Prot) UniProt entries.2653. ✅ Prefer X-ray ≤2.5 Å, holo (bound) structures for interface analysis.2664. ✅ Always run `pdb_get_chains` before `pdb_interface_residues` so chain IDs are exact.2675. ✅ Cross-reference PDB residue numbers (`resseq`) with UniProt positions by sequence alignment.2686. ✅ Match CDRH3 length to target topology; do not blindly default to a popular scaffold.2697. ✅ Use mmCIF (`format="cif"`) — handles large structures and multi-character chain IDs.2708. ❌ DON'T expose raw MCP JSON to the user; summarize into tables.2719. ❌ DON'T WebSearch when an MCP database tool can answer the question.27210. ✨ Batch >5 identifier lookups through `scripts/batch_pdb_lookup.py` instead of looped MCP calls.273274---275276## Suggested Next Steps277278After running this skill, hand off to one of:279280- **`by-research`** — when you need a synthesized target dossier with literature281 triangulation, critique, and design recommendation. This skill is the data282 layer underneath `by-research` Phase 3.283- **`by-epitope-analysis`** — once you have interface residues, score epitope284 drugability and select hotspots for design.285- **`by-scoring`** / **`by-screening`** — when you already have designs and286 need to evaluate ipSAE, ipTM, and liabilities.287- **`boltzgen`** — once a target chain, hotspot range, and scaffold candidates288 are confirmed, hand off CDR templates and the holo PDB to BoltzGen.289- **`pxdesign`** — for non-antibody binders, hand off the holo CIF and hotspot290 range notation to PXDesign.291292Why this chaining works: database lookups are the deterministic, citation-grade293input layer. Downstream skills assume the data is already canonical (correct294accession, correct chain IDs, correct residue numbering). Skipping this skill is295the single biggest cause of failed campaigns.296297---298299## Related Skills300301**Upstream:**302- `by-session` — environment + config check before any database work.303304**Downstream:**305- `by-research` — full research dossier with literature.306- `by-epitope-analysis` — hotspot scoring from interface residues.307- `boltzgen`, `pxdesign`, `protenix` — design and refold using the PDB/CIF you fetched.308309**Alternative / Complementary:**310- `by-knowledge` — query the project knowledge graph for prior campaigns on the same target.311312---313314## References315316**Detailed documentation:**317318- [references/pdb-quality-metrics.md](references/pdb-quality-metrics.md) —319 Resolution thresholds, holo vs. apo, organism filtering, missing residues,320 structural completeness; X-ray vs. cryo-EM selection.321- [references/uniprot-fields.md](references/uniprot-fields.md) — Important322 UniProt fields for design (sequence, domains, PTMs, isoforms, species) and323 efficient query patterns.324- [references/sabdab-best-practices.md](references/sabdab-best-practices.md) —325 Antibody database queries (by target, germline, affinity) and the326 deposited-vs-validated caveat.327328**Scripts:**329330- [scripts/batch_pdb_lookup.py](scripts/batch_pdb_lookup.py) — CLI that reads331 a list of PDB IDs and writes an enriched CSV (resolution, method, organism,332 chain count, ligands).333- [scripts/find_similar_targets.py](scripts/find_similar_targets.py) — CLI that334 takes a UniProt accession or PDB ID and returns a ranked list of related335 entries by sequence identity.336337**Official documentation:**338339- RCSB Data API — https://data.rcsb.org/340- RCSB Search API — https://search.rcsb.org/341- UniProt REST — https://www.uniprot.org/help/api342- SAbDab — https://opig.stats.ox.ac.uk/webapps/sabdab-sabpred/sabdab343344**Identifier quick reference:**345346| Database | Identifier | Example | Source |347|----------|-----------|---------|--------|348| PDB | 4-char ID | 7S4S | `mcp__by-pdb__pdb_search` |349| UniProt | Accession | Q9NZQ7 | `mcp__by-uniprot__uniprot_search` |350| SAbDab | PDB ID | 1ahw | `mcp__by-sabdab__sabdab_search_antibodies` |351| Chain | Auth chain ID | A, B, H, L | `mcp__by-pdb__pdb_get_chains` |352| Residue | resseq (int) | 115 | `mcp__by-pdb__pdb_interface_residues` |