drug-db-pubchem
Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures.
Skill by learningmatter-mit
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/learningmatter-mit-drug-db-pubchem
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 2
codeload.github.com· found in install commandpubchem.ncbi.nlm.nih.gov· found in code
Files it touches
~/.claude/skills/drug-db-pubchem
What's inside
- Skill name
drug-db-pubchem- Description
- Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures.
- License
- MIT
- Instructions
- 140 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions call the network
Files (4)
- SKILL.md
- README.md · examples/
- aspirin.json · examples/
- query_pubchem.py · scripts/
SKILL.md (first lines)
# PubChem Database Query
## Goal
To programmatically query the PubChem Compound database using the PUG-REST API and retrieve:
- PubChem Compound IDs (CIDs) from names, SMILES, InChI, InChIKey, or molecular formulas,
- computed molecular properties (e.g., molecular weight, XLogP, TPSA, HBD/HBA),
- optional synonyms (names/identifiers),
- optional structure files (SDF), preferring 3D records when available.
This skill is designed for reproducible, rate-limited queries suitable for automation workflows.
## Instructions
### 1. Search by Compound Name
Look up a compound by its common name. Use `--name_type complete` (default) for exact match or `--name_type word` for partial matching.
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--name "aspirin" \
--name_type complete \
--max_results 5 \
--outdir research/pubchem/aspirin \
--output aspirin.json
```
For partial name matching (can be noisier):
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--name "atorvastatin" \
--name_type word \
--max_results 10 \
--outdir research/pubchem/atorvastatin \
--output atorvastatin_word.json
```
### 2. Search by SMILES
SMILES may contain characters reserved by URL syntax; this script uses HTTP POST to avoid common failures.
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--smiles "CC(=O)Oc1ccccc1C(=O)O" \
--max_results 5 \
--outdir research/pubchem/aspirin_smiles \
--output aspirin_smiles.json
```
### 3. Search by CID
Most unambiguous lookup method.
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--cid 2244 \
--outdir research/pubchem/CID_2244 \
--output cid_2244.json
```
### 4. Search by InChI or InChIKey
InChI uses HTTP POST (like SMILES) to avoid URL syntax issues.
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--inchikey "BSYNRYMUTXBXSQ-UHFFFAOYSA-N" \
--outdir research/pubchem/aspirin_inchikey \
--output aspirin_inchikey.json
```
### 5. Search by Molecular Formula
Uses `fastformula` for synchronous molecular formula search. Optionally allow additional elements for broader results.
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--formula "C9H8O4" \
--max_results 10 \
--outdir research/pubchem/C9H8O4 \
--output formula_results.json
```
Allow other elements (broader search):
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--formula "C6H12O6" \
--allow_other_elements \
--max_results 10 \
--outdir research/pubchem/C6H12O6_allow_other \
--output formula_allow_other.json
```
### 6. Download SDF Structures (2D/3D)
PubChem 3D records are computationally generated and may be unavailable for some CIDs; the script falls back to 2D by default.
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--name "ibuprofen" \
--download_sdf \
--sdf_record_type 3d \
--outdir research/pubchem/ibuprofen \
--output ibuprofen.json
```
### 7. Disable Synonyms
Synonyms require extra API calls; disable them for high-throughput workflows.
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--cid 2244 \
--no_synonyms \
--outdir research/pubchem/CID_2244_minimal \
--output cid_2244_minimal.json
```
## Examples
Caffeine (download 3D SDF if available):
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
--name "caffeine" \From learningmatter-mit/AtomisticSkills, MIT.
More from learningmatter-mit/AtomisticSkills
- 0.681score
drug-complex-system-builder
learningmatter-mit
Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-binding-site-definition
learningmatter-mit
Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-mmpbsa-gbsa
learningmatter-mit
Compute single-trajectory MM-GBSA and / or MM-PBSA binding free energy estimates from a protein-ligand MD trajectory.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-pocket-detection
learningmatter-mit
Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-sorption-relax
learningmatter-mit
Prepares supercells for porous frameworks based on minimum interplanar distance and relaxes them using standard MLIP relaxation tools.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-protein-ligand-md
learningmatter-mit
Run a protein-ligand MD simulation in OpenMM with energy minimization, restrained equilibration, and production NPT, producing trajectory and checkpoint files…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-db-qmof
learningmatter-mit
Query the Quantum MOF (QMOF) database via Materials Project's MPContribs platform for DFT-computed properties (bandgap) and optimized crystal structures of…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-bond-dissociation
learningmatter-mit
Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-hazard-toxicity
learningmatter-mit
Extract explicit safety warnings, GHS classifications, LD50 toxicity profiles, and acute oral toxicity triage from PubChem PUG VIEW.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-redocking-rmsd
learningmatter-mit
Compute symmetry-corrected heavy-atom RMSD between docked poses and a reference crystal ligand to validate docking protocols.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-pose-validation
learningmatter-mit
Validate docked or generated ligand poses for physical plausibility using PoseBusters, filtering out chemically invalid or clashing poses before downstream…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-dft-orca-optimization
learningmatter-mit
Run DFT geometry optimization (minimization or TS search) on a molecular structure using ORCA via SCINE/ReaDuct wrapper.
SkillAFreshness: A★ 183Claude Code +9
Signals
- Stars
- 183
- Forks
- 31
- Open issues
- 0
- Last commit (this folder)
- Oct 5, 2026 (24 days ago)
- Last release
- Oct 6, 2026 (23 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- arxiv.org/abs/2605.24002
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from learningmatter-mit
- 0.681score
drug-binding-site-definition
learningmatter-mit
Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-complex-system-builder
learningmatter-mit
Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-mmpbsa-gbsa
learningmatter-mit
Compute single-trajectory MM-GBSA and / or MM-PBSA binding free energy estimates from a protein-ligand MD trajectory.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-pocket-detection
learningmatter-mit
Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-pose-validation
learningmatter-mit
Validate docked or generated ligand poses for physical plausibility using PoseBusters, filtering out chemically invalid or clashing poses before downstream…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-sorption-relax
learningmatter-mit
Prepares supercells for porous frameworks based on minimum interplanar distance and relaxes them using standard MLIP relaxation tools.
SkillAFreshness: A★ 183Claude Code +9
Cite this page
drug-db-pubchem skill. Agent Mart. https://agentmart.dev/skills/learningmatter-mit-drug-db-pubchem (last updated 2026-10-24)