$npx -y skills add QSong-github/DrugClaw --skill bindingdbQuery the BindingDB drug-target binding affinity database. Use whenever the user asks about protein-ligand binding data, affinity measurements (Ki, IC50, Kd, EC50), or wants to look up binding partners for a UniProt ID, PDB ID, or compound SMILES string.
| 1 | # BindingDB Query Skill |
| 2 | |
| 3 | Search BindingDB binding affinity records by any entity. Auto-detects type by pattern: |
| 4 | |
| 5 | | Input Pattern | Detected As | Example | API Endpoint | |
| 6 | |---|---|---|---| |
| 7 | | `P35355`, `Q9Y233` | UniProt ID | `P00533` (EGFR) | `getLigandsByUniprots` | |
| 8 | | `1Q0L`, `3ANM` | PDB ID (4-char, digit-leading) | `1Q0L` | `getLigandsByPDBs` | |
| 9 | | contains `=()#[]@/\` | SMILES string | `CC(=O)Oc1ccccc1C(O)=O` | `getTargetByCompound` | |
| 10 | | fallback | treated as UniProt | — | `getLigandsByUniprots` | |
| 11 | |
| 12 | ## API |
| 13 | |
| 14 | | Function | Input | Returns | |
| 15 | |---|---|---| |
| 16 | | `search(entity, cutoff)` | single entity string | dict with `entity`, `type`, `hits`, `affinities` | |
| 17 | | `search_batch(entities, cutoff)` | list of entity strings | dict[str, search_result] | |
| 18 | | `summarize(result)` | search() output | compact multi-line text | |
| 19 | | `to_json(result)` | search() output | list[dict] of affinity records | |
| 20 | | `query_by_uniprot(ids, cutoff)` | UniProt ID(s), nM cutoff | list[dict] | |
| 21 | | `query_by_pdb(ids, cutoff, identity)` | PDB ID(s), nM cutoff, % identity | list[dict] | |
| 22 | | `query_by_smiles(smiles, cutoff)` | SMILES, similarity 0–1 | list[dict] | |
| 23 | |
| 24 | **Parameters** |
| 25 | |
| 26 | - `cutoff` (int): affinity threshold in nM (default 10 000). Entries with IC50/Ki/Kd ≤ cutoff are returned. |
| 27 | - `identity` (int, PDB only): sequence-identity cutoff in percent (default 92). |
| 28 | - Results are capped at 50 per query for LLM readability. |
| 29 | |
| 30 | ## Usage |
| 31 | |
| 32 | See `if __name__ == "__main__"` block in `26_BindingDB.py` for runnable examples covering: UniProt single query, PDB query, SMILES compound query, batch query, and JSON output. |
| 33 | |
| 34 | ## Key Fields in Each Affinity Record |
| 35 | |
| 36 | | Field | Description | |
| 37 | |---|---| |
| 38 | | `query` | Target protein name | |
| 39 | | `monomerid` | BindingDB compound ID | |
| 40 | | `smile` | SMILES structure of ligand | |
| 41 | | `affinity_type` | Ki, IC50, Kd, or EC50 | |
| 42 | | `affinity` | Value in nM | |
| 43 | | `pmid` | PubMed ID of source | |
| 44 | | `doi` | DOI of source publication | |
| 45 | |
| 46 | ## Data Source |
| 47 | |
| 48 | - **Database**: BindingDB (https://www.bindingdb.org/) |
| 49 | - **Size**: 3.2M data points, 1.4M compounds, 11.4K targets |
| 50 | - **Access**: Public REST API (JSON), no authentication required |
| 51 | - **Citation**: BindingDB in 2024: a FAIR knowledgebase of protein-small molecule binding data. *Nucleic Acids Research*, 53(D1), D1633 (2025). DOI: 10.1093/nar/gkae1199 |