Skip to content
Skills Library
Science & research · Research

pdb-database

/pdb-database

Use when you want to search for or download experimentally-determined 3D structures for biomolecules (proteins, nucleic acids, bound ligands). Supports searching by sequence similarity, structure similarity, chemical and other attributes. Also use to get metadata about biomolecular structure experiments.

Licence
Apache-2.0
Last repository change
08.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
4
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 08.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 4 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/download_coordinate_files.py, scripts/fetch_pdb_metadata.py, scripts/fetch_schema.py, scripts/search_pdb.py

What it does and when to use it

Use when you want to search for or download experimentally-determined 3D structures for biomolecules (proteins, nucleic acids, bound ligands). Supports searching by sequence similarity, structure similarity, chemical and other attributes. Also use to get metadata about biomolecular structure experiments.

Original author description

Use when you want to search for or download experimentally-determined 3D structures for biomolecules (proteins, nucleic acids, bound ligands). Supports searching by sequence similarity, structure similarity, chemical and other attributes. Also use to get metadata about biomolecular structure experiments.

How it works

  1. Prerequisites
  2. Core Rules
  3. Attribute-based search workflow
  4. Similarity-based search workflow
  5. Full text search workflow
  6. File download workflow
  7. Metadata query workflow
Original SKILL.md headings · 160 lines, 1,034 words
SKILL.md preview
---
name: pdb-database
description: 'Use when you want to search for or download experimentally-determined
  3D structures for biomolecules (proteins, nucleic acids, bound ligands). Supports
  searching by sequence similarity, structure similarity, chemical and other attributes.
  Also use to get metadata about biomolecular structure experiments.

  '
metadata:
  category: data
  legacy_category: databases
  taxonomy_version: enzyme-agent/taxonomy/v1
  capability_ids:
  - data.scientific_database.retrieval
---

# RCSB Protein Data Bank skill

## Prerequisites

1.  **Python**: Run scripts directly with `python`; do not require `uv` unless the script explicitly fails without it.
2.  **User Notification**: If LICENSE_NOTIFICATION.txt does not already exist in
    this skill directory then (1) prominently notify the user to check the terms
    at https://www.rcsb.org/pages/usage-policy, then (2) create the file
    recording the notification text and timestamp.

## Core Rules

-   **Always prefer to use the provided scripts**. Only as a last resort use
    `curl`, `urllib`, raw HTTP requests, or any other method to access PDB APIs.
    The scripts automatically enforce required rate limits.
-   **Always redirect output to a file**. Parse output with e.g. `jq`, `grep`,
    or a short Python snippet. Do NOT print large API responses to stdout to
    avoid truncation.
-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.
-   **Explain your queries** On completing a task that used PDB JSON/GraphQL
    queries, explain in clear language what your query did so the user can
    correct any bad assumptions.

## Attribute-based search workflow

1.  **Fetch the relevant schema** to discover searchable attribute names. For
    structure attributes: `python scripts/fetch_schema.py --api search_structure
    --output schema_structure.txt` For chemical attributes: `python
    scripts/fetch_schema.py --api search_chemical --output schema_chemical.txt`

2.  **Grep the schema** to find relevant attributes. Grep one keyword at a time
    and examine many lines — there are lots of similar attributes and you must
    choose the **best match** for the user's intent.

3.  **Compose and run a JSON search query** using the discovered attributes: `python
    run scripts/search_pdb.py --query '<JSON>' --return_type <RETURN_TYPE>
    --output results.json` Pass the `--count_only` flag to get just the number
    of matching entries.

### For step 2: some basic PDB concepts (helpful for attribute choice)

-   **Entity**: A unique molecule found in a structure.
-   **Instance / Chain**: A particular copy of an entity. E.g. if a structure
    contains two protein chains with the same sequence, they are the same entity
    but different instances / chains.
-   **Assembly**: A biologically relevant collection of instances / chains. This
    may be the same as the deposited structure, a subset, or multiple copies.
-   **Label vs Auth**: Polymer instances get letter labels ("A", "B", "AA") and
    their monomers are numbered. There are author-assigned ("auth") and
    PDB-internal ("label") schemes. The label scheme is more consistent and is
    always used in scripts and APIs. However, users and papers may refer to the
    author scheme (clarify which scheme is being used if necessary).
-   **Chemical component**: A small molecule / monomer, with an ID matching
    `[A-Z]{1,3}`
-   **Primary citation**: The main publication about a structure. Prefer
    `primary_citation` attributes over `citation` attributes.
-   **Resolution**: Frequently used measure of structure quality (lower is
    better). Usually prefer `rcsb_entry_info.resolution_combined`, which
    accounts for different experimental methods.

### For step 3: Example queries

```bash
# Non-human proteins published in Nature, newest first
python scripts/search_pdb.py --query '{ "type": "group", "logical_operator": "and", "nodes": [ { "type": "terminal", "service": "text", "parameters": { "operator": "exact_match", "negation": true, "value": "Homo sapiens", "attribute": "rcsb_entity_source_organism.taxonomy_lineage.name" } }, { "type": "terminal", "service": "text", "parameters": { "operator": "exact_match", "value": "Nature", "attribute": "rcsb_primary_citation.rcsb_journal_abbrev" } } ] }' --return_type entry --sort_by rcsb_accession_info.initial_release_date --sort_direction desc --page_start 0 --rows 100 --output results.json
```

```bash
# Structures containing the chemical component CA (Ca2+ ion)
python scripts/search_pdb.py --query '{ "type": "terminal", "service": "text_chem", "parameters": { "operator": "exact_match", "value": "CA", "attribute": "rcsb_chem_comp_container_identifiers.comp_id" } }' --return_type entry --output results.json
```

```bash
# Number of entries with disulfide bonds
python scripts/search_pdb.py --query '{ "type": "terminal", "service": "text", "parameters": { "operator": "exact_match", "value": "disulfide bridge", "attribute": "rcsb_polymer_struct_conn.connect_type" } }' --return_type entry --count-only --output count.json
```

Common operators: `exact_match`, `equals`, `exists`, `contains_phrase`,
`contains_words`, `in`, `greater`, `less`

## Similarity-based search workflow

Similarity searches do not require a schema fetch. Basic examples:

```bash
# Sequence similarity
python scripts/search_pdb.py --query '{ "query": { "type": "terminal", "service": "sequence", "parameters": { "evalue_cutoff": 1, "identity_cutoff": 0.9, "sequence_type": "protein", "value": "MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQ" } }, "request_options": { "scoring_strategy": "sequence" } }' --return_type polymer_entity --output results.json
```

```bash
# Structure similarity
python scripts/search_pdb.py --query '{ "type": "terminal", "service": "structure", "parameters": { "value": {"entry_id": "6LU7", "asym_id": "A"}, "number_of_candidates": 2000 } }' --return_type polymer_entity --output results.json
```

```bash
# Sequence motif match
python scripts/search_pdb.py --query '{ "type": "terminal", "service": "seqmotif", "parameters": { "value": "C-x(2,4)-C-x(3)-[LIVMFYWC]-x(8)-H-x(3,5)-H.", "pattern_type": "prosite", "sequence_type": "protein" } }' --return_type polymer_entity --output results.json
```

```bash
# Chemical descriptor match
python scripts/search_pdb.py --query '{ "type": "terminal", "service": "chemical", "parameters": { "value": "InChI=1S/C8H9NO2/c1-6(10)9-7-2-4-8(11)5-3-7/h2-5,11H,1H3,(H,9,10)", "type": "descriptor", "descriptor_type": "InChI", "match_type": "graph-strict" } }' --return_type mol_definition --output results.json
```

See https://search.rcsb.org/#search-services for more details.

## Full text search workflow

Searches **all** text associated with an entry. Example:

```bash
python scripts/search_pdb.py --query '{ "type": "terminal", "service": "full_text", "parameters": { "value": "isopeptide + ( collagen | fibrinogen )" } }' --return_type entry --output results.json
```

> **Important**: use `full_text` search as a **last resort** when there's no
> more precise attribute search available. Consider using the `struct.title` or
> `rcsb_pubmed_abstract_text` attributes instead.

## File download workflow

To download full PDB entries, use the `download_coordinate_files.py` script. Use
this when you need access to atomic coordinates, when asked for a pdb / mmcif
file, or when non-specifically asked to fetch a PDB code. Example:

```bash
python scripts/download_coordinate_files.py --ids "4HHB,6BEA" --format "mmcif" --output_dir <OUTPUT_DIR>
```

## Metadata query workflow

This flow is significantly more efficient than downloading full coordinate files
when you only need a few pieces of metadata about each entry / entity.

1.  **Fetch the schema** for the relevant object type. E.g. `python
    scripts/fetch_schema.py --api data_entry --output schema_entry.txt`

2.  **Grep the schema** for relevant fields (one keyword at a time, many lines).

3.  **Compose and run a GraphQL metadata query**: `python
    scripts/fetch_pdb_metadata.py --query '<GraphQL>' --output results.json`

### For step 3: Example queries

```bash
# Fetch structure titles and experimental methods
python scripts/fetch_pdb_metadata.py --query '{ entries(entry_ids: ["1STP", "2JEF", "1CDG"]) { rcsb_id struct { title } exptl { method } } }' --output results.json
```

```bash
# Fetch polymer entity taxonomy and cluster membership
python scripts/fetch_pdb_metadata.py --query '{ polymer_entities(entity_ids:["2CPK_1","3WHM_1","2D5Z_1"]) { rcsb_id rcsb_entity_source_organism { ncbi_taxonomy_id ncbi_scientific_name } rcsb_cluster_membership { cluster_id identity } } }' --output results.json
```

```bash
# Fetch polymer entity external sequence database accessions
python scripts/fetch_pdb_metadata.py --query '{ entries(entry_ids:["7NHM", "5L2G"]){ polymer_entities { rcsb_id rcsb_polymer_entity_container_identifiers { reference_sequence_identifiers { database_accession database_name } } } } }' --output results.json
```
Files in this package (12)
  • LICENSE_NOTIFICATION.txt 1 KB
  • SKILL.md 9 KB
  • execution_profile.json 2 KB
  • scientific_contract.yaml 1 KB
  • stability_evidence.json 1 KB
  • agents/openai.yaml 1 KB
  • fixtures/stability/invalid.json 1 KB
  • fixtures/stability/valid.json 1 KB
  • scripts/download_coordinate_files.py 3 KB
  • scripts/fetch_pdb_metadata.py 2 KB
  • scripts/fetch_schema.py 8 KB
  • scripts/search_pdb.py 6 KB

Versions

RepositoryScoreLicence
This page · ekko8600/enzyme_design_harness100Apache-2.0
aipoch/medical-research-skills100MIT
google-deepmind/science-skills95Apache-2.0
mkurman/zorai95MIT

Database snapshot: 13.11.2026 · package version 3974c184ddb8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100alterlab-pdb
    Access the RCSB Protein Data Bank (PDB) for EXPERIMENTALLY determined 3D structures (X-ray, cryo-EM, NMR) of proteins and nucleic acids — searching by text, sequence, or structure similarity and downloading coordinates in PDB/mmCIF format with metadata. Use when retrieving a…
  • 95protein_similarity_search
    Protein Similarity Search - Search for similar proteins: extract sequence from PDB, search structures with FoldSeek, find homologs with STRING, and check UniProt. Use this skill for bioinformatics tasks involving extract pdb sequence foldseek search get best similarity hits…
  • 100pdb
    Fetch and analyze protein structures from RCSB PDB. Use this skill when: (1) Need to download a structure by PDB ID, (2) Search for similar structures, (3) Prepare target for binder design, (4) Extract specific chains or domains, (5) Get structure metadata. For sequence lookup,…
  • 100foldseek
    Structure similarity search with Foldseek. Use this skill when: (1) Finding similar structures in PDB/AFDB databases, (2) Structural homology search, (3) Database queries by 3D structure, (4) Finding remote homologs not detected by sequence, (5) Clustering structures by…
  • 95foldseek
    Structure similarity search with Foldseek. Use this skill when: (1) Finding similar structures in PDB/AFDB databases, (2) Structural homology search, (3) Database queries by 3D structure, (4) Finding remote homologs not detected by sequence, (5) Clustering structures by…
  • 95protein_similarity_search
    Protein Similarity Search - Search for similar proteins: extract sequence from PDB, search structures with FoldSeek, find homologs with STRING, and check UniProt. Use this skill for bioinformatics tasks involving extract pdb sequence foldseek search get best similarity hits…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.