tooluniverse-chemical-compound-retrieval

Retrieves chemical compound information from PubChem and ChEMBL with disambiguation, cross-referencing, and quality assessment. Creates comprehensive compound profiles with identifiers, properties, bioactivity, and drug information. Use when users need chemical data, drug information, or mention PubChem CID, ChEMBL ID, SMILES, InChI, or compound names.

1,802 stars

Best use case

tooluniverse-chemical-compound-retrieval is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Retrieves chemical compound information from PubChem and ChEMBL with disambiguation, cross-referencing, and quality assessment. Creates comprehensive compound profiles with identifiers, properties, bioactivity, and drug information. Use when users need chemical data, drug information, or mention PubChem CID, ChEMBL ID, SMILES, InChI, or compound names.

Teams using tooluniverse-chemical-compound-retrieval should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tooluniverse-chemical-compound-retrieval/SKILL.md --create-dirs "https://raw.githubusercontent.com/FreedomIntelligence/OpenClaw-Medical-Skills/main/skills/tooluniverse-chemical-compound-retrieval/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tooluniverse-chemical-compound-retrieval/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How tooluniverse-chemical-compound-retrieval Compares

Feature / Agenttooluniverse-chemical-compound-retrievalStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Retrieves chemical compound information from PubChem and ChEMBL with disambiguation, cross-referencing, and quality assessment. Creates comprehensive compound profiles with identifiers, properties, bioactivity, and drug information. Use when users need chemical data, drug information, or mention PubChem CID, ChEMBL ID, SMILES, InChI, or compound names.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Chemical Compound Information Retrieval

Retrieve comprehensive chemical compound data with proper disambiguation and cross-database validation.

**IMPORTANT**: Always use English compound names and search terms in tool calls, even if the user writes in another language (e.g., translate "阿司匹林" to "aspirin"). Only try original-language terms as a fallback if English returns no results. Respond in the user's language.

## Workflow Overview

```
Phase 0: Clarify (if needed)
    ↓
Phase 1: Disambiguate Compound Identity
    ↓
Phase 2: Retrieve Data (Internal)
    ↓
Phase 3: Report Compound Profile
```

---

## Phase 0: Clarification (When Needed)

Ask the user ONLY if:
- Compound name is highly ambiguous (e.g., "vitamin E" → α, β, γ, δ-tocopherol?)
- Multiple distinct compounds share the name (e.g., "aspirin" is clear; "sterol" is not)

Skip clarification for:
- Unambiguous drug names (aspirin, ibuprofen, metformin)
- Specific identifiers provided (CID, ChEMBL ID, SMILES)
- Clear structural queries (SMILES, InChI)

---

## Phase 1: Compound Disambiguation

### 1.1 Resolve Primary Identifier

```python
from tooluniverse import ToolUniverse
tu = ToolUniverse()
tu.load_tools()

# Strategy depends on input type
if user_provided_cid:
    cid = user_provided_cid
elif user_provided_smiles:
    result = tu.tools.PubChem_get_CID_by_SMILES(smiles=smiles)
    cid = result["data"]["cid"]
elif user_provided_name:
    result = tu.tools.PubChem_get_CID_by_compound_name(compound_name=name)
    cid = result["data"]["cid"]
```

### 1.2 Cross-Reference Identifiers

Always establish compound identity across both databases:

```python
# PubChem → ChEMBL cross-reference
chembl_result = tu.tools.ChEMBL_search_compounds(query=compound_name, limit=5)
if chembl_result["data"]:
    chembl_id = chembl_result["data"][0]["molecule_chembl_id"]
```

### 1.3 Handle Naming Collisions

For generic names (e.g., "vitamin", "steroid", "acid"):
- Search returns multiple CIDs → present top matches with structures
- Verify SMILES/InChI matches user intent
- Note stereoisomers or salt forms if relevant

**Identity Resolution Checklist:**
- [ ] PubChem CID established
- [ ] ChEMBL ID cross-referenced (if exists)
- [ ] Canonical SMILES captured
- [ ] Stereochemistry noted (if relevant)
- [ ] Salt forms identified (if applicable)

---

## Phase 2: Data Retrieval (Internal)

Retrieve all data silently. Do NOT narrate the search process.

### 2.1 Core Properties (PubChem)

```python
# Basic properties
props = tu.tools.PubChem_get_compound_properties_by_CID(cid=cid)

# Bioactivity summary
bio = tu.tools.PubChem_get_bioactivity_summary_by_CID(cid=cid)

# Drug label (if approved drug)
drug = tu.tools.PubChem_get_drug_label_info_by_CID(cid=cid)

# Structure image
image = tu.tools.PubChem_get_compound_2D_image_by_CID(cid=cid)
```

### 2.2 Bioactivity Data (ChEMBL)

```python
if chembl_id:
    # Detailed bioactivity
    activity = tu.tools.ChEMBL_get_bioactivity_by_chemblid(chembl_id=chembl_id)
    
    # Protein targets
    targets = tu.tools.ChEMBL_get_target_by_chemblid(chembl_id=chembl_id)
    
    # Assay data
    assays = tu.tools.ChEMBL_get_assays_by_chemblid(chembl_id=chembl_id)
```

### 2.3 Optional Extended Data

```python
# Patents (for drugs)
patents = tu.tools.PubChem_get_associated_patents_by_CID(cid=cid)

# Similar compounds (for SAR)
similar = tu.tools.PubChem_search_compounds_by_similarity(cid=cid, threshold=85)
```

### Fallback Chains

| Primary | Fallback | Notes |
|---------|----------|-------|
| PubChem_get_CID_by_compound_name | ChEMBL_search_compounds → get SMILES → PubChem_get_CID_by_SMILES | Name lookup failed |
| ChEMBL_get_bioactivity | PubChem_get_bioactivity_summary | ChEMBL ID unavailable |
| PubChem_get_drug_label_info | Note "Drug label unavailable" | Not an approved drug |

---

## Phase 3: Report Compound Profile

### Output Structure

Present results as a **Compound Profile Report**. Hide all search process details.

```markdown
# Compound Profile: [Compound Name]

## Identity
| Property | Value |
|----------|-------|
| **PubChem CID** | [cid] |
| **ChEMBL ID** | [chembl_id or "N/A"] |
| **IUPAC Name** | [full name] |
| **Common Names** | [synonyms] |

## Chemical Properties

### Molecular Descriptors
| Property | Value | Drug-Likeness |
|----------|-------|---------------|
| **Formula** | C₉H₈O₄ | - |
| **Molecular Weight** | 180.16 g/mol | ✓ (<500) |
| **LogP** | 1.19 | ✓ (-2 to 5) |
| **H-Bond Donors** | 1 | ✓ (<5) |
| **H-Bond Acceptors** | 4 | ✓ (<10) |
| **Polar Surface Area** | 63.6 Ų | ✓ (<140) |
| **Rotatable Bonds** | 3 | ✓ (<10) |

### Structural Representation
- **SMILES**: `CC(=O)Oc1ccccc1C(=O)O`
- **InChI**: `InChI=1S/C9H8O4/...`

[2D structure image if available]

## Bioactivity Profile

### Summary
- **Active in**: [X] assays out of [Y] tested
- **Primary Targets**: [list top targets]
- **Mechanism**: [if known]

### Key Target Interactions (from ChEMBL)
| Target | Activity Type | Value | Units |
|--------|--------------|-------|-------|
| [Target 1] | IC50 | [value] | nM |
| [Target 2] | Ki | [value] | nM |

## Drug Information (if applicable)

### Clinical Status
| Property | Value |
|----------|-------|
| **Approval Status** | [Approved/Investigational/N/A] |
| **Drug Class** | [therapeutic class] |
| **Indication** | [approved uses] |
| **Route** | [oral/IV/topical/etc.] |

### Safety
- **Black Box Warning**: [Yes/No]
- **Major Interactions**: [if any]

## Related Compounds (if retrieved)

Top 5 structurally similar compounds:
| CID | Name | Similarity | Key Difference |
|-----|------|------------|----------------|
| [cid] | [name] | 95% | [note] |

## Data Sources
- PubChem: [CID link]
- ChEMBL: [ChEMBL ID link]
- Retrieved: [date]
```

---

## Data Quality Tiers

Apply to data completeness assessment:

| Tier | Symbol | Criteria |
|------|--------|----------|
| Complete | ●●● | All core properties + bioactivity + drug info |
| Substantial | ●●○ | Core properties + bioactivity OR drug info |
| Basic | ●○○ | Core properties only |
| Minimal | ○○○ | CID/name only, limited data |

Include in report header:
```markdown
**Data Completeness**: ●●● Complete (properties, bioactivity, drug data)
```

---

## Completeness Checklist

Every compound profile MUST include these sections (even if "unavailable"):

### Identity (Required)
- [ ] PubChem CID
- [ ] ChEMBL ID (or "N/A")
- [ ] IUPAC name
- [ ] Canonical SMILES

### Properties (Required)
- [ ] Molecular formula
- [ ] Molecular weight
- [ ] LogP
- [ ] Lipinski rule assessment

### Bioactivity (Required)
- [ ] Activity summary (or "No bioactivity data")
- [ ] Primary targets (or "Unknown")

### Drug Info (If Approved Drug)
- [ ] Approval status
- [ ] Indication
- [ ] Drug class

### Always Include
- [ ] Data sources with links
- [ ] Retrieval date
- [ ] Quality tier assessment

---

## Common Use Cases

### Drug Property Check
User: "Tell me about metformin"
→ Full compound profile with drug information emphasis

### Structure Verification
User: "Verify this SMILES: CC(=O)Oc1ccccc1C(=O)O"
→ Disambiguation-focused profile, confirm identity

### SAR Analysis
User: "Find compounds similar to ibuprofen"
→ Similarity search + comparative property table

### Target Identification
User: "What proteins does gefitinib target?"
→ ChEMBL bioactivity emphasis with target list

---

## Error Handling

| Error | Response |
|-------|----------|
| "Compound not found" | Try synonyms, verify spelling, offer SMILES search |
| "No ChEMBL ID" | Note in Identity section, continue with PubChem data |
| "No bioactivity data" | Include section with "No bioactivity screening data available" |
| "API timeout" | Retry once, note unavailable data with "(retrieval failed)" |

---

## Tool Reference

**PubChem (Chemical Database)**
| Tool | Purpose |
|------|---------|
| `PubChem_get_CID_by_compound_name` | Name → CID |
| `PubChem_get_CID_by_SMILES` | Structure → CID |
| `PubChem_get_compound_properties_by_CID` | Molecular properties |
| `PubChem_get_compound_2D_image_by_CID` | Structure visualization |
| `PubChem_get_bioactivity_summary_by_CID` | Activity overview |
| `PubChem_get_drug_label_info_by_CID` | FDA drug labels |
| `PubChem_get_associated_patents_by_CID` | IP information |
| `PubChem_search_compounds_by_similarity` | Find analogs |
| `PubChem_search_compounds_by_substructure` | Substructure search |

**ChEMBL (Bioactivity Database)**
| Tool | Purpose |
|------|---------|
| `ChEMBL_search_compounds` | Name/structure search |
| `ChEMBL_get_compound_by_chemblid` | Compound details |
| `ChEMBL_get_bioactivity_by_chemblid` | Activity data |
| `ChEMBL_get_target_by_chemblid` | Protein targets |
| `ChEMBL_search_targets` | Target search |
| `ChEMBL_get_assays_by_chemblid` | Assay metadata |

Related Skills

tooluniverse-variant-interpretation

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Systematic clinical variant interpretation from raw variant calls to ACMG-classified recommendations with structural impact analysis. Aggregates evidence from ClinVar, gnomAD, CIViC, UniProt, and PDB across ACMG criteria. Produces pathogenicity scores (0-100), clinical recommendations, and treatment implications. Use when interpreting genetic variants, classifying variants of uncertain significance (VUS), performing ACMG variant classification, or translating variant calls to clinical actionability.

tooluniverse-variant-analysis

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Production-ready VCF processing, variant annotation, mutation analysis, and structural variant (SV/CNV) interpretation for bioinformatics questions. Parses VCF files (streaming, large files), classifies mutation types (missense, nonsense, synonymous, frameshift, splice, intronic, intergenic) and structural variants (deletions, duplications, inversions, translocations), applies VAF/depth/quality/consequence filters, annotates with ClinVar/dbSNP/gnomAD/CADD via ToolUniverse, interprets SV/CNV clinical significance using ClinGen dosage sensitivity scores, computes variant statistics, and generates reports. Solves questions like "What fraction of variants with VAF < 0.3 are missense?", "How many non-reference variants remain after filtering intronic/intergenic?", "What is the pathogenicity of this deletion affecting BRCA1?", or "Which dosage-sensitive genes overlap this CNV?". Use when processing VCF files, annotating variants, filtering by VAF/depth/consequence, classifying mutations, interpreting structural variants, assessing CNV pathogenicity, comparing cohorts, or answering variant analysis questions.

tooluniverse-target-research

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Gather comprehensive biological target intelligence from 9 parallel research paths covering protein info, structure, interactions, pathways, expression, variants, drug interactions, and literature. Features collision-aware searches, evidence grading (T1-T4), explicit Open Targets coverage, and mandatory completeness auditing. Use when users ask about drug targets, proteins, genes, or need target validation, druggability assessment, or comprehensive target profiling.

tooluniverse-systems-biology

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Comprehensive systems biology and pathway analysis using multiple pathway databases (Reactome, KEGG, WikiPathways, Pathway Commons, BioModels). Performs pathway enrichment, protein-pathway mapping, keyword searches, and systems-level analysis. Use when analyzing gene sets, exploring biological pathways, or investigating systems-level biology.

tooluniverse-structural-variant-analysis

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Comprehensive structural variant (SV) analysis skill for clinical genomics. Classifies SVs (deletions, duplications, inversions, translocations), assesses pathogenicity using ACMG-adapted criteria, evaluates gene disruption and dosage sensitivity, and provides clinical interpretation with evidence grading. Use when analyzing CNVs, large deletions/duplications, chromosomal rearrangements, or any structural variants requiring clinical interpretation.

tooluniverse-statistical-modeling

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Perform statistical modeling and regression analysis on biomedical datasets. Supports linear regression, logistic regression (binary/ordinal/multinomial), mixed-effects models, Cox proportional hazards survival analysis, Kaplan-Meier estimation, and comprehensive model diagnostics. Extracts odds ratios, hazard ratios, confidence intervals, p-values, and effect sizes. Designed to solve BixBench statistical reasoning questions involving clinical/experimental data. Use when asked to fit regression models, compute odds ratios, perform survival analysis, run statistical tests, or interpret model coefficients from provided data.

tooluniverse-spatial-transcriptomics

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Analyze spatial transcriptomics data to map gene expression in tissue architecture. Supports 10x Visium, MERFISH, seqFISH, Slide-seq, and imaging-based platforms. Performs spatial clustering, domain identification, cell-cell proximity analysis, spatial gene expression patterns, tissue architecture mapping, and integration with single-cell data. Use when analyzing spatial transcriptomics datasets, studying tissue organization, identifying spatial expression patterns, mapping cell-cell interactions in tissue context, characterizing tumor microenvironment spatial structure, or integrating spatial and single-cell RNA-seq data for comprehensive tissue analysis.

tooluniverse-spatial-omics-analysis

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Computational analysis framework for spatial multi-omics data integration. Given spatially variable genes (SVGs), spatial domain annotations, tissue type, and disease context from spatial transcriptomics/proteomics experiments (10x Visium, MERFISH, DBiTplus, SLIDE-seq, etc.), performs comprehensive biological interpretation including pathway enrichment, cell-cell interaction inference, druggable target identification, immune microenvironment characterization, and multi-modal integration. Produces a detailed markdown report with Spatial Omics Integration Score (0-100), domain-by-domain characterization, and validation recommendations. Uses 70+ ToolUniverse tools across 9 analysis phases. Use when users ask about spatial transcriptomics analysis, spatial omics interpretation, tissue heterogeneity, spatial gene expression patterns, tumor microenvironment mapping, tissue zonation, or cell-cell communication from spatial data.

tooluniverse-single-cell

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Production-ready single-cell and expression matrix analysis using scanpy, anndata, and scipy. Performs scRNA-seq QC, normalization, PCA, UMAP, Leiden/Louvain clustering, differential expression (Wilcoxon, t-test, DESeq2), cell type annotation, per-cell-type statistical analysis, gene-expression correlation, batch correction (Harmony), trajectory inference, and cell-cell communication analysis. NEW: Analyzes ligand-receptor interactions between cell types using OmniPath (CellPhoneDB, CellChatDB), scores communication strength, identifies signaling cascades, and handles multi-subunit receptor complexes. Integrates with ToolUniverse gene annotation tools (HPA, Ensembl, MyGene, UniProt) and enrichment tools (gseapy, PANTHER, STRING). Supports h5ad, 10X, CSV/TSV count matrices, and pre-annotated datasets. Use when analyzing single-cell RNA-seq data, studying cell-cell interactions, performing cell type differential expression, computing gene-expression correlations by cell type, analyzing tumor-immune communication, or answering questions about scRNA-seq datasets.

tooluniverse-sequence-retrieval

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Retrieves biological sequences (DNA, RNA, protein) from NCBI and ENA with gene disambiguation, accession type handling, and comprehensive sequence profiles. Creates detailed reports with sequence metadata, cross-database references, and download options. Use when users need nucleotide sequences, protein sequences, genome data, or mention GenBank, RefSeq, EMBL accessions.

tooluniverse-rnaseq-deseq2

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Production-ready RNA-seq differential expression analysis using PyDESeq2. Performs DESeq2 normalization, dispersion estimation, Wald testing, LFC shrinkage, and result filtering. Handles multi-factor designs, multiple contrasts, batch effects, and integrates with gene enrichment (gseapy) and ToolUniverse annotation tools (UniProt, Ensembl, OpenTargets). Supports CSV/TSV/H5AD input formats and any organism. Use when analyzing RNA-seq count matrices, identifying DEGs, performing differential expression with statistical rigor, or answering questions about gene expression changes.

tooluniverse-rare-disease-diagnosis

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Provide differential diagnosis for patients with suspected rare diseases based on phenotype and genetic data. Matches symptoms to HPO terms, identifies candidate diseases from Orphanet/OMIM, prioritizes genes for testing, interprets variants of uncertain significance. Use when clinician asks about rare disease diagnosis, unexplained phenotypes, or genetic testing interpretation.