{"id":"6fc22f1b-3d45-4ed0-856c-62aed8ececb7","shortId":"yVDkgk","kind":"skill","title":"pdb","tagline":"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, ","description":"# PDB Database Access\n\n**Note**: This skill uses the RCSB PDB web API directly. No Modal deployment needed - all operations run locally via HTTP requests.\n\n## Fetching Structures\n\n### By PDB ID\n```bash\n# Download PDB file\ncurl -o 1alu.pdb \"https://files.rcsb.org/download/1ALU.pdb\"\n\n# Download mmCIF\ncurl -o 1alu.cif \"https://files.rcsb.org/download/1ALU.cif\"\n```\n\n### Using Python\n```python\nfrom Bio.PDB import PDBList\n\npdbl = PDBList()\npdbl.retrieve_pdb_file(\"1ABC\", pdir=\"structures/\", file_format=\"pdb\")\n```\n\n### Using RCSB API\n```python\nimport requests\n\ndef fetch_pdb(pdb_id: str, format: str = \"pdb\") -> str:\n    \"\"\"Fetch structure from RCSB PDB.\"\"\"\n    url = f\"https://files.rcsb.org/download/{pdb_id}.{format}\"\n    response = requests.get(url)\n    response.raise_for_status()\n    return response.text\n\ndef fetch_fasta(pdb_id: str) -> str:\n    \"\"\"Fetch sequence in FASTA format.\"\"\"\n    url = f\"https://www.rcsb.org/fasta/entry/{pdb_id}\"\n    return requests.get(url).text\n\n# Example usage\npdb_content = fetch_pdb(\"1ALU\")\nwith open(\"1ALU.pdb\", \"w\") as f:\n    f.write(pdb_content)\n```\n\n## Structure Preparation\n\n### Selecting Chains\n```python\nfrom Bio.PDB import PDBParser, PDBIO, Select\n\nclass ChainSelect(Select):\n    def __init__(self, chain_id):\n        self.chain_id = chain_id\n\n    def accept_chain(self, chain):\n        return chain.id == self.chain_id\n\n# Extract chain A\nparser = PDBParser()\nstructure = parser.get_structure(\"protein\", \"1abc.pdb\")\nio = PDBIO()\nio.set_structure(structure)\nio.save(\"chain_A.pdb\", ChainSelect(\"A\"))\n```\n\n### Trimming to Binding Region\n```python\ndef trim_around_residues(pdb_file, center_residues, buffer=10.0):\n    \"\"\"Trim structure to region around specified residues.\"\"\"\n    parser = PDBParser()\n    structure = parser.get_structure(\"protein\", pdb_file)\n\n    # Get center coordinates\n    center_coords = []\n    for res in structure.get_residues():\n        if res.id[1] in center_residues:\n            center_coords.extend([a.coord for a in res.get_atoms()])\n\n    center = np.mean(center_coords, axis=0)\n\n    # Keep residues within buffer\n    class RegionSelect(Select):\n        def accept_residue(self, res):\n            for atom in res.get_atoms():\n                if np.linalg.norm(atom.coord - center) < buffer:\n                    return True\n            return False\n\n    io = PDBIO()\n    io.set_structure(structure)\n    io.save(\"trimmed.pdb\", RegionSelect())\n```\n\n## Searching PDB\n\n### RCSB Search API\n```python\nimport requests\n\nquery = {\n    \"query\": {\n        \"type\": \"terminal\",\n        \"service\": \"full_text\",\n        \"parameters\": {\n            \"value\": \"EGFR kinase domain\"\n        }\n    },\n    \"return_type\": \"entry\"\n}\n\nresponse = requests.post(\n    \"https://search.rcsb.org/rcsbsearch/v2/query\",\n    json=query\n)\nresults = response.json()\n```\n\n### By Sequence Similarity\n```python\nquery = {\n    \"query\": {\n        \"type\": \"terminal\",\n        \"service\": \"sequence\",\n        \"parameters\": {\n            \"value\": \"MKTAYIAKQRQISFVK...\",\n            \"evalue_cutoff\": 1e-10,\n            \"identity_cutoff\": 0.9\n        }\n    }\n}\n```\n\n## Structure Analysis\n\n### Get Chain Info\n```python\ndef get_structure_info(pdb_file):\n    parser = PDBParser(QUIET=True)\n    structure = parser.get_structure(\"protein\", pdb_file)\n\n    info = {\n        \"chains\": [],\n        \"total_residues\": 0\n    }\n\n    for model in structure:\n        for chain in model:\n            residues = list(chain.get_residues())\n            info[\"chains\"].append({\n                \"id\": chain.id,\n                \"length\": len(residues),\n                \"first_res\": residues[0].id[1],\n                \"last_res\": residues[-1].id[1]\n            })\n            info[\"total_residues\"] += len(residues)\n\n    return info\n```\n\n### Find Interface Residues\n```python\ndef find_interface_residues(pdb_file, chain_a, chain_b, distance=4.0):\n    \"\"\"Find residues at interface between two chains.\"\"\"\n    parser = PDBParser(QUIET=True)\n    structure = parser.get_structure(\"complex\", pdb_file)\n\n    interface_a = set()\n    interface_b = set()\n\n    for res_a in structure[0][chain_a].get_residues():\n        for res_b in structure[0][chain_b].get_residues():\n            for atom_a in res_a.get_atoms():\n                for atom_b in res_b.get_atoms():\n                    if atom_a - atom_b < distance:\n                        interface_a.add(res_a.id[1])\n                        interface_b.add(res_b.id[1])\n\n    return interface_a, interface_b\n```\n\n## Common Tasks for Binder Design\n\n### Target Preparation Checklist\n1. Download structure: `curl -o target.pdb \"https://files.rcsb.org/download/XXXX.pdb\"`\n2. Identify target chain\n3. Remove waters and ligands (if needed)\n4. Trim to binding region + buffer\n5. Identify potential hotspots\n6. Renumber if needed\n\n## Troubleshooting\n\n**Structure not found**: Check PDB ID format (4 characters)\n**Multiple models**: Select first model for design\n**Missing residues**: Check for gaps in structure\n\n---\n\n**Next**: Use structure with `boltzgen` (recommended) or `rfdiffusion` for design.","tags":["pdb","protein","design","skills","adaptyvbio","agent-skills","claude-code","protein-design","protein-engineering"],"capabilities":["skill","source-adaptyvbio","skill-pdb","topic-agent-skills","topic-claude-code","topic-protein-design","topic-protein-engineering"],"categories":["protein-design-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/adaptyvbio/protein-design-skills/pdb","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add adaptyvbio/protein-design-skills","source_repo":"https://github.com/adaptyvbio/protein-design-skills","install_from":"skills.sh"}},"qualityScore":"0.513","qualityRationale":"deterministic score 0.51 from registry signals: · indexed on github topic:agent-skills · 126 github stars · SKILL.md body (5,030 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T12:54:48.840Z","embedding":null,"createdAt":"2026-04-18T22:10:10.724Z","updatedAt":"2026-05-02T12:54:48.840Z","lastSeenAt":"2026-05-02T12:54:48.840Z","tsv":"'-1':439 '/download/':137 '/download/1alu.cif':93 '/download/1alu.pdb':85 '/download/xxxx.pdb':553 '/fasta/entry/':165 '/rcsbsearch/v2/query':359 '0':297,409,433,493,503 '0.9':382 '1':14,281,435,441,528,531,545 '10.0':253 '1abc':106 '1abc.pdb':229 '1alu':178 '1alu.cif':90 '1alu.pdb':82,181 '1e-10':379 '2':23,554 '3':28,558 '4':34,565,587 '4.0':464 '5':40,571 '6':575 'a.coord':286 'accept':212,306 'access':49 'analysi':384 'analyz':4 'api':58,114,336 'append':424 'around':246,258 'atom':291,311,314,509,513,515,519,521,523 'atom.coord':317 'axi':296 'b':462,486,500,505,516,524,536 'bash':76 'bind':241,568 'binder':32,540 'bio.pdb':98,194 'boltzgen':607 'buffer':252,301,319,570 'center':250,270,272,283,292,294,318 'center_coords.extend':285 'chain':37,191,205,209,213,215,221,386,406,415,423,459,461,471,494,504,557 'chain.get':420 'chain.id':217,426 'chain_a.pdb':236 'chainselect':200,237 'charact':588 'check':583,598 'checklist':544 'class':199,302 'common':537 'complex':479 'content':175,187 'coord':273,295 'coordin':271 'curl':80,88,548 'cutoff':378,381 'databas':48 'def':118,149,202,211,244,305,389,453 'deploy':62 'design':33,541,595,612 'direct':59 'distanc':463,525 'domain':39,351 'download':17,77,86,546 'egfr':349 'entri':354 'evalu':377 'exampl':172 'extract':35,220 'f':134,162,184 'f.write':185 'fals':323 'fasta':151,159 'fetch':2,71,119,128,150,156,176 'file':79,105,109,249,268,394,404,458,481 'files.rcsb.org':84,92,136,552 'files.rcsb.org/download/':135 'files.rcsb.org/download/1alu.cif':91 'files.rcsb.org/download/1alu.pdb':83 'files.rcsb.org/download/xxxx.pdb':551 'find':449,454,465 'first':430,592 'format':110,124,140,160,586 'found':582 'full':345 'gap':600 'get':41,269,385,390,496,506 'hotspot':574 'http':69 'id':22,75,122,139,153,167,206,208,210,219,425,434,440,585 'ident':380 'identifi':555,572 'import':99,116,195,338 'info':387,392,405,422,442,448 'init':203 'interfac':450,455,468,482,485,533,535 'interface_a.add':526 'interface_b.add':529 'io':230,324 'io.save':235,329 'io.set':232,326 'json':360 'keep':298 'kinas':350 'last':436 'len':428,445 'length':427 'ligand':562 'list':419 'local':67 'lookup':46 'metadata':43 'miss':596 'mktayiakqrqisfvk':376 'mmcif':87 'modal':61 'model':411,417,590,593 'multipl':589 'need':15,63,564,578 'next':603 'note':50 'np.linalg.norm':316 'np.mean':293 'o':81,89,549 'open':180 'oper':65 'paramet':347,374 'parser':223,261,395,472 'parser.get':226,264,400,477 'pdb':1,9,21,47,56,74,78,104,111,120,121,126,132,138,152,166,174,177,186,248,267,333,393,403,457,480,584 'pdbio':197,231,325 'pdbl':101 'pdbl.retrieve':103 'pdblist':100,102 'pdbparser':196,224,262,396,473 'pdir':107 'potenti':573 'prepar':29,189,543 'protein':5,228,266,402 'python':95,96,115,192,243,337,367,388,452 'queri':340,341,361,368,369 'quiet':397,474 'rcsb':8,55,113,131,334 'recommend':608 'region':242,257,569 'regionselect':303,331 'remov':559 'renumb':576 'request':70,117,339 'requests.get':142,169 'requests.post':356 'res':275,309,431,437,489,499 'res.get':290,313 'res.id':280 'res_a.get':512 'res_a.id':527 'res_b.get':518 'res_b.id':530 'residu':247,251,260,278,284,299,307,408,418,421,429,432,438,444,446,451,456,466,497,507,597 'respons':141,355 'response.json':363 'response.raise':144 'response.text':148 'result':362 'return':147,168,216,320,322,352,447,532 'rfdiffus':610 'run':66 'search':24,332,335 'search.rcsb.org':358 'search.rcsb.org/rcsbsearch/v2/query':357 'select':190,198,201,304,591 'self':204,214,308 'self.chain':207,218 'sequenc':45,157,365,373 'servic':344,372 'set':484,487 'similar':26,366 'skill':12,52 'skill-pdb' 'source-adaptyvbio' 'specif':36 'specifi':259 'status':146 'str':123,125,127,154,155 'structur':6,19,27,42,72,108,129,188,225,227,233,234,255,263,265,327,328,383,391,399,401,413,476,478,492,502,547,580,602,605 'structure.get':277 'target':30,542,556 'target.pdb':550 'task':538 'termin':343,371 'text':171,346 'topic-agent-skills' 'topic-claude-code' 'topic-protein-design' 'topic-protein-engineering' 'total':407,443 'trim':239,245,254,566 'trimmed.pdb':330 'troubleshoot':579 'true':321,398,475 'two':470 'type':342,353,370 'url':133,143,161,170 'usag':173 'use':10,53,94,112,604 'valu':348,375 'via':68 'w':182 'water':560 'web':57 'within':300 'www.rcsb.org':164 'www.rcsb.org/fasta/entry/':163","prices":[{"id":"944d3122-9bfa-4cdf-91cb-a3e9b31968e7","listingId":"6fc22f1b-3d45-4ed0-856c-62aed8ececb7","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"adaptyvbio","category":"protein-design-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:10:10.724Z"}],"sources":[{"listingId":"6fc22f1b-3d45-4ed0-856c-62aed8ececb7","source":"github","sourceId":"adaptyvbio/protein-design-skills/pdb","sourceUrl":"https://github.com/adaptyvbio/protein-design-skills/tree/main/skills/pdb","isPrimary":false,"firstSeenAt":"2026-04-18T22:10:10.724Z","lastSeenAt":"2026-05-02T12:54:48.840Z"}],"details":{"listingId":"6fc22f1b-3d45-4ed0-856c-62aed8ececb7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"adaptyvbio","slug":"pdb","github":{"repo":"adaptyvbio/protein-design-skills","stars":126,"topics":["agent-skills","claude-code","protein-design","protein-engineering"],"license":"mit","html_url":"https://github.com/adaptyvbio/protein-design-skills","pushed_at":"2026-01-19T13:06:29Z","description":"Claude Code skills for protein design","skill_md_sha":"67f6a15d468ca29bd0f1e5465afd508dd3828c1b","skill_md_path":"skills/pdb/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/adaptyvbio/protein-design-skills/tree/main/skills/pdb"},"layout":"multi","source":"github","category":"protein-design-skills","frontmatter":{"name":"pdb","license":"MIT","description":"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, use uniprot. For binder design workflow, use binder-design."},"skills_sh_url":"https://skills.sh/adaptyvbio/protein-design-skills/pdb"},"updatedAt":"2026-05-02T12:54:48.840Z"}}