Przejdź do treści
Biblioteka skilli
Nauka i badania · Research

alterlab-pubchem

/alterlab-pubchem

Odpytuje PubChem przez PUG-REST i PubChemPy (ponad 119 mln związków) według nazwy, CID lub SMILES, pobierając właściwości, bioaktywność i wyniki podobieństwa.

Licencja
MIT
Ostatnia zmiana repozytorium
23.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
9
Skrypty
2
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 23.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/bioactivity_query.py, scripts/compound_search.py

Co robi i kiedy

Odpytuje PubChem przez PUG-REST i PubChemPy (ponad 119 mln związków) według nazwy, CID lub SMILES, pobierając właściwości, bioaktywność i wyniki podobieństwa.

Oryginalny opis (EN)

Query PubChem via the PUG-REST API and PubChemPy across 119M+ compounds, searching by name, CID, or SMILES and retrieving molecular properties, bioactivity, and similarity/substructure matches. Use when looking up a chemical compound, converting names/SMILES to CIDs, fetching physicochemical properties, or running cheminformatics structure searches. Part of the AlterLab Academic Skills suite.

Jak działa

  1. Overview
  2. When to Use This Skill
  3. Core Capabilities
  4. Core Workflow
  5. Installation Requirements
  6. Helper Scripts
  7. Reference Index
Sekcje z nagłówków SKILL.md, w oryginale · 102 linii, 623 słów
Podgląd SKILL.md
---
name: alterlab-pubchem
description: Query PubChem via the PUG-REST API and PubChemPy across 119M+ compounds, searching by name, CID, or SMILES and retrieving molecular properties, bioactivity, and similarity/substructure matches. Use when looking up a chemical compound, converting names/SMILES to CIDs, fetching physicochemical properties, or running cheminformatics structure searches. Part of the AlterLab Academic Skills suite.
license: MIT
allowed-tools: Read WebFetch Bash(curl:*) Bash(python:*)
compatibility: Keyless PubChem PUG-REST API (≤5 requests/s, ≤400/min); PubChemPy >= 1.0.5 optional for Python (no authentication required)
metadata:
    skill-author: AlterLab
    version: "1.0.1"
    last_updated: "2026-09-23"
---

# PubChem Database

## Overview

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.

## When to Use This Skill

This skill should be used when:
- Searching for chemical compounds by name, structure (SMILES/InChI), or molecular formula
- Retrieving molecular properties (MW, LogP, TPSA, hydrogen bonding descriptors)
- Performing similarity searches to find structurally related compounds
- Conducting substructure searches for specific chemical motifs
- Accessing bioactivity data from screening assays
- Converting between chemical identifier formats (CID, SMILES, InChI)
- Batch processing multiple compounds for drug-likeness screening or property analysis

### Does NOT Trigger

| Scenario | Use Instead |
|----------|-------------|
| Curated potency data (IC50/Ki) for targets and medicinal-chemistry series | `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` |

## Core Capabilities

PubChem access is organized into nine capability areas. Copy-ready snippets for each live in
`references/capabilities.md`.

1. **Chemical structure search** — by name, CID, SMILES, InChI, or molecular formula.
2. **Property retrieval** — single, specific-list, or batch molecular properties.
3. **Similarity search** — Tanimoto similarity with threshold/MaxRecords.
4. **Substructure search** — find compounds containing a structural motif.
5. **Format conversion** — CID/SMILES/InChI/InChIKey and structure-file download.
6. **Structure visualization** — 2D PNG images via PubChemPy or direct URL.
7. **Synonym retrieval** — all known names for a compound.
8. **Bioactivity data access** — assay summaries via PUG-REST and helper script.
9. **Comprehensive annotations** — full PUG-View records (properties, drug info, safety, toxicity).

## Core Workflow

The canonical entry point resolves an identifier to a compound, then reads properties:

```python
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.

## Installation Requirements

```bash
uv pip install 'pubchempy>=1.0.5'  # Python-based access (1.0.5 = current SMILES property names)
uv pip install requests            # direct API / bioactivity queries
uv pip install pandas              # optional, for data analysis
```

**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).

## Helper Scripts

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`.

## Reference Index

- **`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.
Pliki w paczce (9)
  • SKILL.md 6 KB
  • evals/evals.json 4 KB
  • references/api_reference.md 11 KB
  • references/best_practices.md 3 KB
  • references/capabilities.md 6 KB
  • references/helper_scripts.md 2 KB
  • references/workflows.md 3 KB
  • scripts/bioactivity_query.py 10 KB
  • scripts/compound_search.py 8 KB

Wersje

W bazie nie ma innych skilli o nazwie alterlab-pubchem.

Migawka bazy z 13.11.2026 · wersja paczki 6d7d357ca02e (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95pubchem-database
    Odpytuje PubChem po nazwie, CID lub SMILES, pobiera właściwości, wyniki wyszukiwania podobieństwa i podstruktur oraz bioaktywność, dla potrzeb chemoinformatyki.
  • 100pubchem-database
    Przeszukuje PubChem po nazwie, CID lub SMILES, pobiera właściwości oraz wykonuje wyszukiwania podobieństwa i podstruktur.
  • 95pubchem-database
    Przeszukuje PubChem po nazwie, CID lub SMILES i pobiera właściwości, podobieństwo oraz dane o bioaktywności.
  • 100pubchem-compound
    Wyszukuje i pobiera dane o związkach chemicznych z PubChem przez PUG REST API: właściwości, struktury, wyszukiwanie podobieństwa i podstruktur oraz bioaktywność.
  • 95chemical_structure_comparison
    Zestawia dwa związki chemiczne na podstawie nazw, SMILES i podobieństwa, z weryfikacją rekordów w PubChem.
  • 100tooluniverse-chemical-compound-retrieval
    Pobiera dane związków chemicznych z PubChem i ChEMBL z rozstrzyganiem nazw, odsyłaczami i stereochemią, przekładając nazwy na SMILES, InChI, CID i identyfikatory ChEMBL.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.