Pubchem
ResearchpubchemPubchem is an Agent Skill for research published in the lamm-mit/scienceclaw repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Search PubChem for chemical compounds, properties, and identifiers
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/lamm-mit/scienceclaw/blob/HEAD/skills/pubchem/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pubchem, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
PubChem Compound Lookup
Query the PubChem database for chemical compounds, molecular properties, SMILES, InChI, and related data. PubChem is NCBI's open chemistry database.
Overview
- Search compounds by name or identifier
- Retrieve molecular formula, weight, SMILES, InChI, InChIKey
- Find related compounds and synonyms
- No API key required (rate limit: 5 requests/second)
Usage
Search by compound name:
python3 {baseDir}/scripts/pubchem_search.py --query "aspirin"
Get compound by CID:
python3 {baseDir}/scripts/pubchem_search.py --cid 2244
Get detailed properties:
python3 {baseDir}/scripts/pubchem_search.py --cid 2244 --format detailed
Search with max results:
python3 {baseDir}/scripts/pubchem_search.py --query "caffeine" --max-results 5
Parameters
| Parameter | Description | Default |
|---|---|---|
--query | Compound name or search term | - |
--cid | PubChem Compound ID | - |
--max-results | Max results for search | 10 |
--format | Output: summary, detailed, json | summary |
Output
- Summary: CID, name, molecular formula, molecular weight, SMILES
- Detailed: Adds InChI, InChIKey, synonyms, related CIDs
- JSON: Full API response
Notes
- Rate limit: 5 requests per second (no API key)
- Use --cid for exact compound when you know the ID
- Use --query for name or text search