Queries PubChem via PUG-REST API and PubChemPy for 119M+ compounds by name, CID, or SMILES. Retrieves molecular properties, bioactivity, and similarity/substructure matches for cheminformatics workflows.
PubChem is the world's largest freely available chemical database — 119M+ compounds, 322M+ substances, and 295M+ bioactivities per the PubChem 2025 update (Kim et al., NAR 2025). Query chemical structures by name, CID, or SMILES, retrieve molecular properties, perform similarity and substructure searches, and access bioactivity data using the PUG-REST API and PubChemPy.
This skill should be used when:
| Scenario | Use Instead |
|---|---|
| Measured binding affinities (Ki, Kd, IC50) of ligands against a protein target, e.g. by UniProt accession | alterlab-bindingdb |
| Curated bioactivity across assays, medicinal-chemistry series, drug mechanisms | alterlab-chembl |
| Computing descriptors or fingerprints on your own molecules locally | alterlab-rdkit |
| Human metabolite concentrations, biofluids, biomarker evidence | alterlab-hmdb |
| Drug pharmacology, interactions, and approval details | alterlab-drugbank |
| Purchasable compound libraries for virtual screening | alterlab-zinc-db |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-chembl) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
PubChem access is organized into nine capability areas. Copy-ready snippets for each live in
references/capabilities.md.
The canonical entry point resolves an identifier to a compound, then reads properties:
import pubchempy as pcp
compound = pcp.get_compounds('aspirin', 'name')[0]
print(compound.cid, compound.molecular_formula, compound.molecular_weight)
print(compound.smiles, compound.xlogp, compound.tpsa)
Prefer CIDs for repeated queries (more efficient than names/structures). Similarity and
substructure searches run asynchronously and may take 15-30 seconds; PubChemPy polls
automatically. PUG-REST answers HTTP 503 (PUGREST.ServerBusy) both when you exceed the
limits and when PubChem itself is overloaded — read the X-Throttling-Control response
header and back off rather than retrying immediately. See references/best_practices.md
for rate limits and error handling.
No install step: run Python through uv, which resolves the packages for that run (1.0.5 = current SMILES property names; checked 2026-10-23):
uv run --with 'pubchempy>=1.0.5' python props.py # PubChemPy access
uv run --with 'pubchempy>=1.0.5' python scripts/compound_search.py ... # helper script
uv run --with requests python scripts/bioactivity_query.py ... # direct API / bioassays
uv run --with 'pubchempy>=1.0.5' --with pandas python analysis.py # optional pandas
Plain curl against PUG-REST needs nothing (.../compound/name/aspirin/property/MolecularWeight,XLogP,TPSA,HBondDonorCount,HBondAcceptorCount/JSON).
SMILES property naming (PubChem changed this in 2025): the PUG-REST CanonicalSMILES
and IsomericSMILES properties are deprecated. Use SMILES (full SMILES with
stereo/isotope info, replaces IsomericSMILES) and ConnectivitySMILES (connectivity-only,
replaces CanonicalSMILES). In PubChemPy 1.0.5 the matching Compound attributes are
compound.smiles and compound.connectivity_smiles (the old canonical_smiles /
isomeric_smiles attributes still resolve but are deprecated).
This skill ships two Python helper scripts under scripts/:
scripts/compound_search.py — search, property retrieval, similarity/substructure search,
synonyms, batch search, and structure download.scripts/bioactivity_query.py — bioassay summaries, target identification, target-based
compound search, and PUG-View annotations.Full function inventories and usage are in references/helper_scripts.md.
references/api_reference.md — Complete PUG-REST endpoint docs, full molecular property
list, asynchronous request handling, PubChemPy API, PUG-View API, and official doc links.references/capabilities.md — Copy-ready code for all nine capability areas.references/workflows.md — Five end-to-end workflows (identifier conversion, drug-likeness
screening, similar-candidate search, batch property comparison, substructure virtual screening).references/helper_scripts.md — Function inventory and usage for the two helper scripts.references/best_practices.md — Rate limits, best practices, error handling, troubleshooting,
and additional resources.evals/evals.json (opens in a new tab)references/api_reference.md (opens in a new tab)references/best_practices.md (opens in a new tab)references/capabilities.md (opens in a new tab)references/helper_scripts.md (opens in a new tab)references/workflows.md (opens in a new tab)scripts/bioactivity_query.py (opens in a new tab)scripts/compound_search.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-tools241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job