# Send Chemistry Query to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "chemistry-query",
    "name": "Chemistry Query",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Cheminem/chemistry-query",
    "canonicalUrl": "https://clawhub.ai/Cheminem/chemistry-query",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/chemistry-query",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=chemistry-query",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "scripts/chembl_query.py",
      "scripts/pubmed_search.py",
      "scripts/templates.json",
      "scripts/admet_predict.py",
      "scripts/rdkit_mol.py",
      "scripts/chain_entry.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "chemistry-query",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T10:05:26.025Z",
      "expiresAt": "2026-05-08T10:05:26.025Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=chemistry-query",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=chemistry-query",
        "contentDisposition": "attachment; filename=\"chemistry-query-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "chemistry-query"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/chemistry-query"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/chemistry-query",
    "downloadUrl": "https://openagent3.xyz/downloads/chemistry-query",
    "agentUrl": "https://openagent3.xyz/skills/chemistry-query/agent",
    "manifestUrl": "https://openagent3.xyz/skills/chemistry-query/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/chemistry-query/agent.md"
  }
}
```
## Documentation

### Overview

Full-stack chemistry toolkit combining PubChem data retrieval with RDKit molecule processing, visualization, analysis, retrosynthesis, and synthesis planning. All outputs are structured JSON for easy downstream chaining. Generates PNG/SVG images on demand.

Key capabilities:

PubChem compound lookup (info, structure, synthesis refs, similarity search)
RDKit molecular properties (MW, logP, TPSA, HBD/HBA, rotatable bonds, aromatic rings)
2D molecule visualization (PNG/SVG)
BRICS retrosynthesis with recursive depth control
Multi-step synthesis route planning
Forward reaction simulation with SMARTS templates
Morgan fingerprints and similarity/substructure search
21 named reaction templates (Suzuki, Heck, Grignard, Wittig, Diels-Alder, etc.)

### Quick Start

# PubChem compound info
exec python scripts/query_pubchem.py --compound "aspirin" --type info

# Molecular properties from SMILES
exec python scripts/rdkit_mol.py --smiles "CC(=O)Oc1ccccc1C(=O)O" --action props

# Retrosynthesis
exec python scripts/rdkit_mol.py --target "CC(=O)Oc1ccccc1C(=O)O" --action retro --depth 2

# Full chain (name → props + draw + retro)
exec python scripts/chain_entry.py --input-json '{"name": "caffeine", "context": "user"}'

### scripts/query_pubchem.py

PubChem REST API queries with automatic name→CID resolution and timeout handling.

--compound <name|CID> --type <info|structure|synthesis|similar> [--format smiles|inchi|image|json] [--threshold 80]

info: Formula, MW, IUPAC name, InChIKey (JSON)
structure: SMILES, InChI, image URL, or full JSON
synthesis: Synonyms/references for a compound
similar: Similar compounds by 2D fingerprint (top 20)

### scripts/rdkit_mol.py

RDKit cheminformatics engine. Resolves names via PubChem automatically.

--smiles <SMILES> --action <props|draw|fingerprint|similarity|substruct|xyz|react|retro|plan>

ActionDescriptionKey ArgspropsMW, logP, TPSA, HBD, HBA, rotB, aromRings--smilesdraw2D PNG/SVG (300×300)--smiles --output file.png --format png|svgretroBRICS recursive retrosynthesis--target <SMILES|name> --depth NplanMulti-step retro route--target <SMILES|name> --steps NreactForward reaction via SMARTS--reactants "smi1 smi2" --smarts "<SMARTS>"fingerprintMorgan fingerprint bitvector--smiles --radius 2similarityTanimoto similarity scoring--query_smiles --target_smiles "smi1,smi2"substructSubstructure matching--query_smiles --target_smiles "smi1,smi2"xyz3D coordinates (MMFF optimized)--smiles

### scripts/chain_entry.py

Standard agent chain interface. Accepts {"smiles": "...", "context": "..."} or {"name": "...", "context": "..."}. Returns unified JSON with props, visualization, and retrosynthesis.

python scripts/chain_entry.py --input-json '{"name": "sotorasib", "context": "user"}'

Output schema:

{
  "agent": "chemistry-query",
  "version": "1.4.0",
  "smiles": "<canonical>",
  "status": "success|error",
  "report": {"props": {...}, "draw": {...}, "retro": {...}},
  "risks": [],
  "viz": ["path/to/image.png"],
  "recommend_next": ["pharmacology", "toxicology"],
  "confidence": 0.95,
  "warnings": [],
  "timestamp": "ISO8601"
}

### scripts/templates.json

21 named reaction templates with SMARTS, expected yields, conditions, and references. Includes: Suzuki, Heck, Buchwald-Hartwig, Grignard, Wittig, Diels-Alder, Click, Sonogashira, Negishi, and more.

### Chaining

Name → Full Profile: chain_entry.py with {"name": "ibuprofen"} → props + draw + retro
Chemistry → Pharmacology: Output feeds directly into pharma-pharmacology-agent
Retro + Viz: Get precursors, then draw each one
Suzuki Test: --action react --reactants "c1ccccc1Br c1ccccc1B(O)O" --smarts "[c:1][Br:2].[c:3][B]([c:4])(O)O>>[c:1][c:3]"

### Tested With

All features verified end-to-end with RDKit 2024.03+:

MoleculeSMILESTests PassedCaffeineCN1C=NC2=C1C(=O)N(C(=O)N2C)Cinfo, structure, props, draw, retro, plan, chainAspirinCC(=O)Oc1ccccc1C(=O)Oinfo, structure, props, draw, retro, plan, chainSotorasibPubChem name lookupinfo, structure, props, draw, retro, chainIbuprofenPubChem name lookupinfo, structure, props, chainInvalid SMILESXXXINVALIDGraceful JSON errorEmpty input{}Graceful JSON error

### Resources

references/api_endpoints.md — PubChem API endpoint reference and rate limits
scripts/rdkit_reaction.py — Legacy reaction module
scripts/chembl_query.py, scripts/pubmed_search.py, scripts/admet_predict.py — Additional query modules

### Changelog

v1.4.0 (2026-02-14)

Fixed PubChem SMILES/InChI endpoint (property/CanonicalSMILES/TXT)
Fixed chain_entry.py HTML entity corruption
Fixed brics_retro to handle BRICSDecompose string output correctly
Added request timeouts (15s) to all PubChem calls
Graceful error handling for invalid SMILES and empty input
Updated chain output version and schema
Comprehensive end-to-end testing

v1.3.0

RDKit props NoneType fixes, invalid SMILES graceful errors
React fix: ReactionFromSmarts import
Name resolution via PubChem for all RDKit actions

v1.2.0

BRICS retrosynthesis + 21 reaction templates library
Multi-step synthesis planning
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Cheminem
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-01T10:05:26.025Z
- Expires at: 2026-05-08T10:05:26.025Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/chemistry-query)
- [Send to Agent page](https://openagent3.xyz/skills/chemistry-query/agent)
- [JSON manifest](https://openagent3.xyz/skills/chemistry-query/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/chemistry-query/agent.md)
- [Download page](https://openagent3.xyz/downloads/chemistry-query)