
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.
- Installs
- 2.2K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/google-deepmind/science-skills --skill pdb-database- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads pdb-database automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
RCSB Protein Data Bank skill
Prerequisites
-
uv: Read theuvskill and follow its Setup instructions to ensureuvis installed and on PATH. -
User Notification: If .licenses/pdb_database_LICENSE.txt does not already exist in the workspace root 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
-
Fetch the relevant schema to discover searchable attribute names. For structure attributes:
uv run scripts/fetch_schema.py --api search_structure --output schema_structure.txtFor chemical attributes:uv run scripts/fetch_schema.py --api search_chemical --output schema_chemical.txt -
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.
-
Compose and run a JSON search query using the discovered attributes:
uv run scripts/search_pdb.py --query '<JSON>' --return_type <RETURN_TYPE> --output results.jsonPass the--count_onlyflag 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_citationattributes overcitationattributes. - 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
# Non-human proteins published in Nature, newest first
uv run 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
# Structures containing the chemical component CA (Ca2+ ion)
uv run 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
# Number of entries with disulfide bonds
uv run 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:
# Sequence similarity
uv run 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
# Structure similarity
uv run 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
# Sequence motif match
uv run 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
# Chemical descriptor match
uv run 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:
uv run scripts/search_pdb.py --query '{ "type": "terminal", "service": "full_text", "parameters": { "value": "isopeptide + ( collagen | fibrinogen )" } }' --return_type entry --output results.json
Important: use
full_textsearch as a last resort when there's no more precise attribute search available. Consider using thestruct.titleorrcsb_pubmed_abstract_textattributes 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:
uv run 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.
-
Fetch the schema for the relevant object type. E.g.
uv run scripts/fetch_schema.py --api data_entry --output schema_entry.txt -
Grep the schema for relevant fields (one keyword at a time, many lines).
-
Compose and run a GraphQL metadata query:
uv run scripts/fetch_pdb_metadata.py --query '<GraphQL>' --output results.json
For step 3: Example queries
# Fetch structure titles and experimental methods
uv run scripts/fetch_pdb_metadata.py --query '{ entries(entry_ids: ["1STP", "2JEF", "1CDG"]) { rcsb_id struct { title } exptl { method } } }' --output results.json
# Fetch polymer entity taxonomy and cluster membership
uv run 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
# Fetch polymer entity external sequence database accessions
uv run 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
FAQ
What does the pdb-database skill do?
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 do I install pdb-database?
Run npx skills add https://github.com/google-deepmind/science-skills --skill pdb-database in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pdb-database/ (personal) or .claude/skills/pdb-database/ (project).
Which AI agents can use pdb-database?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is pdb-database safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains pdb-database?
It is published by google-deepmind in google-deepmind/science-skills. It has 2,245 recorded installs.
More from google-deepmind/science-skills
literature-search-arxiv
google-deepmind/science-skills
Search for scientific papers, preprints, and publications on arXiv. Extract metadata, abstracts, and download full-text PDFs or HTML versions of papers. Use when the user asks to find research papers, literature, or specific arXiv IDs.
literature-search-openalex
google-deepmind/science-skills
Query the OpenAlex scholarly database for research papers, authors, institutions, topics, sources, publishers, funders, geo-locations, and keywords. Use when searching academic papers, resolving DOIs, downloading open-access PDFs, finding an author's publications, aggregating bibliometric data (citation counts, h-index, impact factor), exploring the research taxonomies, or performing DOI lookups.
pubmed-database
google-deepmind/science-skills
Search PubMed for scientific literature, including published clinical trials. Fetch abstracts and full text. Link published research to biological databases (gene, protein, nucleotide, PubChem) to discover associations between papers and specific compounds or genes. Verify medical spelling, match raw citations, and cache result sets for bulk processing. Interfaces NCBI E-utilities and PMC BioC APIs.
literature-search-europepmc
google-deepmind/science-skills
Search Europe PMC for scientific literature and download open-access full texts and PDFs. Retrieve full-text XML/plain text by PMCID, get citation lists and bibliography.
literature-search-biorxiv
google-deepmind/science-skills
Browse and filter life sciences, biology, and medical preprints from bioRxiv and medRxiv. Supports fetching paper metadata by DOI, and browsing by date range with category and keyword filters. Keyword filtering is local, so date ranges MUST be narrow (1-4 weeks) with a category to prevent timeouts.
uv
google-deepmind/science-skills
Checks whether the uv Python package manager is installed and installs it if missing. Ensures uv is on PATH. Use when another skill requires uv as a prerequisite.
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.