返回顶部
c

chemistry-query化学查询

Chemistry agent skill for PubChem API queries (compound info/properties, structures/SMILES/images, synthesis routes/references) + RDKit cheminformatics (SMILES to molecule props/logP/TPSA, 2D PNG/SVG viz, Morgan fingerprints, retrosynthesis/BRICS disconnects, multi-step synth planning). Use for chemistry tasks involving compounds, molecules, structures, PubChem data, RDKit analysis, SMILES processing, synthesis routes, retrosynthesis, reaction simulation. Triggers on chemistry, compounds, molecu

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
809
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

chemistry-query

Chemistry Query Agent v1.4.0

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

CODEBLOCK0

Scripts

scripts/query_pubchem.py

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

CODEBLOCK1

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

CODEBLOCK2

ActionDescriptionKey Args
propsMW, logP, TPSA, HBD, HBA, rotB, aromRingsINLINECODE2
draw
2D PNG/SVG (300×300) | --smiles --output file.png --format png\|svg |
| retro | BRICS recursive retrosynthesis | --target <SMILES\|name> --depth N |
| plan | Multi-step retro route | --target <SMILES\|name> --steps N |
| react | Forward reaction via SMARTS | --reactants "smi1 smi2" --smarts "<SMARTS>" |
| fingerprint | Morgan fingerprint bitvector | --smiles --radius 2 |
| similarity | Tanimoto similarity scoring | --query_smiles --target_smiles "smi1,smi2" |
| substruct | Substructure matching | --query_smiles --target_smiles "smi1,smi2" |
| xyz | 3D 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.

CODEBLOCK3

Output schema:
CODEBLOCK4

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

  1. 1. Name → Full Profile: chain_entry.py with {"name": "ibuprofen"} → props + draw + retro
  2. Chemistry → Pharmacology: Output feeds directly into INLINECODE17
  3. Retro + Viz: Get precursors, then draw each one
  4. Suzuki Test: INLINECODE18

Tested With

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

MoleculeSMILESTests Passed
CaffeineINLINECODE19info, structure, props, draw, retro, plan, chain
Aspirin
CC(=O)Oc1ccccc1C(=O)O | info, structure, props, draw, retro, plan, chain |
| Sotorasib | PubChem name lookup | info, structure, props, draw, retro, chain |
| Ibuprofen | PubChem name lookup | info, structure, props, chain |
| Invalid SMILES | XXXINVALID | Graceful JSON error |
| Empty input | {} | Graceful JSON error |

Resources

  • - references/api_endpoints.md — PubChem API endpoint reference and rate limits
  • INLINECODE24 — Legacy reaction module
  • INLINECODE25, 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 chainentry.py HTML entity corruption
  • Fixed bricsretro 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

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 chemistry-query-1776419965 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 chemistry-query-1776419965 技能

通过命令行安装

skillhub install chemistry-query-1776419965

下载

⬇ 下载 chemistry-query v1.0.0(免费)

文件大小: 16.73 KB | 发布时间: 2026-4-17 20:04

v1.0.0 最新 2026-4-17 20:04
chemistry-query v1.0.0

- Initial release of full-stack chemistry toolkit integrating PubChem API queries and RDKit cheminformatics.
- Supports compound lookup, molecular properties, 2D visualization, retrosynthesis, multi-step synthesis planning, and reaction simulation.
- Provides structured JSON outputs, PNG/SVG molecule images, and automatic chemical name resolution.
- Includes 21 named reaction templates and chaining capabilities for seamless chemistry workflows.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部