Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Access RCSB PDB for 3D protein/nucleic acid structures. Search by text/sequence/structure, download coordinates (PDB/mmCIF), retrieve metadata, for structural biology and drug discovery.
.claude/skills/pdb-database/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | — | — |
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✗→✓ | ▲ Improved | — | — |
RCSB PDB is the worldwide repository for 3D structural data of biological macromolecules. Search for structures, retrieve coordinates and metadata, perform sequence and structure similarity searches across 200,000+ experimentally determined structures and computed models.
This skill should be used when:
Find PDB entries using various search criteria:
Text Search: Search by protein name, keywords, or descriptions
pythonfrom rcsbapi.search import TextQuery query = TextQuery("hemoglobin") results = list(query()) print(f"Found {len(results)} structures")
Attribute Search: Query specific properties (organism, resolution, method, etc.)
pythonfrom rcsbapi.search import AttributeQuery from rcsbapi.search.attrs import rcsb_entity_source_organism # Find human protein structures query = AttributeQuery( attribute=rcsb_entity_source_organism.scientific_name, operator="exact_match", value="Homo sapiens" ) results = list(query())
Sequence Similarity: Find structures similar to a given sequence
pythonfrom rcsbapi.search import SequenceQuery query = SequenceQuery( value="MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGETCLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHHYREQIKRVKDSEDVPMVLVGNKCDLPSRTVDTKQAQDLARSYGIPFIETSAKTRQGVDDAFYTLVREIRKHKEKMSKDGKKKKKKSKTKCVIM", evalue_cutoff=0.1, identity_cutoff=0.9 ) results = list(query())
Structure Similarity: Find structures with similar 3D geometry
pythonfrom rcsbapi.search import StructSimilarityQuery query = StructSimilarityQuery( structure_search_type="entry", entry_id="4HHB" # Hemoglobin ) results = list(query())
Combining Queries: Use logical operators to build complex searches
pythonfrom rcsbapi.search import TextQuery, AttributeQuery from rcsbapi.search.attrs import rcsb_entry_info # High-resolution human proteins query1 = AttributeQuery( attribute=rcsb_entity_source_organism.scientific_name, operator="exact_match", value="Homo sapiens" ) query2 = AttributeQuery( attribute=rcsb_entry_info.resolution_combined, operator="less", value=2.0 ) combined_query = query1 & query2 # AND operation results = list(combined_query())
Access detailed information about specific PDB entries:
Basic Entry Information:
pythonfrom rcsbapi.data import Schema, fetch # Get entry-level data entry_data = fetch("4HHB", schema=Schema.ENTRY) print(entry_data["struct"]["title"]) print(entry_data["exptl"][0]["method"])
Polymer Entity Information:
python# Get protein/nucleic acid information entity_data = fetch("4HHB_1", schema=Schema.POLYMER_ENTITY) print(entity_data["entity_poly"]["pdbx_seq_one_letter_code"])
Using GraphQL for Flexible Queries:
pythonfrom rcsbapi.data import fetch # Custom GraphQL query query = """ { entry(entry_id: "4HHB") { struct { title } exptl { method } rcsb_entry_info { resolution_combined deposited_atom_count } } } """ data = fetch(query_type="graphql", query=query)
Retrieve coordinate files in various formats:
Download Methods:
https://files.rcsb.org/download/{PDB_ID}.pdbhttps://files.rcsb.org/download/{PDB_ID}.cifhttps://files.rcsb.org/download/{PDB_ID}.pdb1 (for assembly 1)Example Download:
pythonimport requests pdb_id = "4HHB" # Download PDB format pdb_url = f"https://files.rcsb.org/download/{pdb_id}.pdb" response = requests.get(pdb_url) with open(f"{pdb_id}.pdb", "w") as f: f.write(response.text) # Download mmCIF format cif_url = f"https://files.rcsb.org/download/{pdb_id}.cif" response = requests.get(cif_url) with open(f"{pdb_id}.cif", "w") as f: f.write(response.text)
Common operations with retrieved structures:
Parse and Analyze Coordinates: Use BioPython or other structural biology libraries to work with downloaded files:
pythonfrom Bio.PDB import PDBParser parser = PDBParser() structure = parser.get_structure("protein", "4HHB.pdb") # Iterate through atoms for model in structure: for chain in model: for residue in chain: for atom in residue: print(atom.get_coord())
Extract Metadata:
pythonfrom rcsbapi.data import fetch, Schema # Get experimental details data = fetch("4HHB", schema=Schema.ENTRY) resolution = data.get("rcsb_entry_info", {}).get("resolution_combined") method = data.get("exptl", [{}])[0].get("method") deposition_date = data.get("rcsb_accession_info", {}).get("deposit_date") print(f"Resolution: {resolution} Å") print(f"Method: {method}") print(f"Deposited: {deposition_date}")
Process multiple structures efficiently:
pythonfrom rcsbapi.data import fetch, Schema pdb_ids = ["4HHB", "1MBN", "1GZX"] # Hemoglobin, myoglobin, etc. results = {} for pdb_id in pdb_ids: try: data = fetch(pdb_id, schema=Schema.ENTRY) results[pdb_id] = { "title": data["struct"]["title"], "resolution": data.get("rcsb_entry_info", {}).get("resolution_combined"), "organism": data.get("rcsb_entity_source_organism", [{}])[0].get("scientific_name") } except Exception as e: print(f"Error fetching {pdb_id}: {e}") # Display results for pdb_id, info in results.items(): print(f"\n{pdb_id}: {info['title']}") print(f" Resolution: {info['resolution']} Å") print(f" Organism: {info['organism']}")
Install the official RCSB PDB Python API client:
bash# Current recommended package uv pip install rcsb-api # For legacy code (deprecated, use rcsb-api instead) uv pip install rcsbsearchapi
The rcsb-api package provides unified access to both Search and Data APIs through the rcsbapi.search and rcsbapi.data modules.
PDB ID: Unique 4-character identifier (e.g., "4HHB") for each structure entry. AlphaFold and ModelArchive entries start with "AF_" or "MA_" prefixes.
mmCIF/PDBx: Modern file format that uses key-value structure, replacing legacy PDB format for large structures.
Biological Assembly: The functional form of a macromolecule, which may contain multiple copies of chains from the asymmetric unit.
Resolution: Measure of detail in crystallographic structures (lower values = higher detail). Typical range: 1.5-3.5 Å for high-quality structures.
Entity: A unique molecular component in a structure (protein chain, DNA, ligand, etc.).
This skill includes reference documentation in the references/ directory:
Comprehensive API documentation covering:
Use this reference when you need in-depth information about API capabilities, complex query construction, or detailed data schema information.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +41 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.