返回顶部
p

pharmaclaw-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 2.0.1
安全检测
已通过
771
下载量
免费
免费
3
收藏
概述
安装方式
版本历史

pharmaclaw-chemistry-query

化学查询代理 v1.4.1

概述

全栈化学工具包,结合PubChem数据检索与RDKit分子处理、可视化、分析、逆合成及合成规划。所有输出均为结构化JSON格式,便于下游链式调用。可按需生成PNG/SVG图像。

关键能力:

  • - PubChem化合物查询(信息、结构、合成参考文献、相似性搜索)
  • RDKit分子属性(分子量、logP、TPSA、氢键供体/受体、可旋转键、芳香环)
  • 2D分子可视化(PNG/SVG)
  • 支持递归深度控制的BRICS逆合成
  • 多步合成路线规划
  • 基于SMARTS模板的正向反应模拟
  • Morgan指纹及相似性/子结构搜索
  • 21种命名反应模板(Suzuki、Heck、Grignard、Wittig、Diels-Alder等)

快速开始

bash

PubChem化合物信息


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

从SMILES计算分子属性

exec python scripts/rdkit_mol.py --smiles CC(=O)Oc1ccccc1C(=O)O --action props

逆合成

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

完整链式调用(名称 → 属性 + 绘图 + 逆合成)

exec python scripts/chain_entry.py --input-json {name: caffeine, context: user}

脚本

scripts/query_pubchem.py

PubChem REST API查询,支持自动名称→CID解析和超时处理。

--compound <名称|CID> --type [--format smiles|inchi|image|json] [--threshold 80]

  • - info: 分子式、分子量、IUPAC名称、InChIKey(JSON格式)
  • structure: SMILES、InChI、图像URL或完整JSON
  • synthesis: 化合物的同义词/参考文献
  • similar: 基于2D指纹的相似化合物(前20个)

scripts/rdkit_mol.py

RDKit化学信息学引擎。通过PubChem自动解析名称。

--smiles --action

操作描述关键参数
props分子量、logP、TPSA、氢键供体、氢键受体、可旋转键、芳香环--smiles
draw
2D PNG/SVG图像(300×300) | --smiles --output file.png --format png\|svg | | retro | BRICS递归逆合成 | --target --depth N | | plan | 多步逆合成路线 | --target --steps N | | react | 基于SMARTS的正向反应 | --reactants smi1 smi2 --smarts | | fingerprint | Morgan指纹位向量 | --smiles --radius 2 | | similarity | Tanimoto相似性评分 | --querysmiles --targetsmiles smi1,smi2 | | substruct | 子结构匹配 | --querysmiles --targetsmiles smi1,smi2 | | xyz | 3D坐标(MMFF优化) | --smiles |

scripts/chain_entry.py

标准代理链式接口。接受{smiles: ..., context: ...}或{name: ..., context: ...}。返回包含属性、可视化和逆合成的统一JSON。

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

输出模式:
json
{
agent: chemistry-query,
version: 1.4.0,
smiles: <规范SMILES>,
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种命名反应模板,包含SMARTS、预期产率、反应条件和参考文献。包括:Suzuki、Heck、Buchwald-Hartwig、Grignard、Wittig、Diels-Alder、Click、Sonogashira、Negishi等。

链式调用

  1. 1. 名称 → 完整档案: chainentry.py 使用 {name: ibuprofen} → 属性 + 绘图 + 逆合成
  2. 化学 → 药理学: 输出直接输入到 pharma-pharmacology-agent
  3. 逆合成 + 可视化: 获取前体,然后绘制每个前体
  4. Suzuki测试: --action react --reactants c1ccccc1Br c1ccccc1B(O)O --smarts [c:1][Br:2].[c:3]B(O)O>>[c:1][c:3]

测试验证

所有功能已使用RDKit 2024.03+进行端到端验证:

分子SMILES通过的测试
咖啡因CN1C=NC2=C1C(=O)N(C(=O)N2C)Cinfo, structure, props, draw, retro, plan, chain
阿司匹林
CC(=O)Oc1ccccc1C(=O)O | info, structure, props, draw, retro, plan, chain |
| 索托拉西布 | PubChem名称查询 | info, structure, props, draw, retro, chain |
| 布洛芬 | PubChem名称查询 | info, structure, props, chain |
| 无效SMILES | XXXINVALID | 优雅的JSON错误 |
| 空输入 | {} | 优雅的JSON错误 |

资源

  • - references/apiendpoints.md — PubChem API端点参考和速率限制
  • scripts/rdkitreaction.py — 遗留反应模块
  • scripts/chemblquery.py、scripts/pubmedsearch.py、scripts/admet_predict.py — 其他查询模块

scripts/advanced_chem.py

高级化学信息学引擎,具备6项一级能力。

--action --smiles [选项]

操作描述关键参数
standardize盐去除、电荷归一化、互变异构体枚举--smiles
descriptors
217+分子描述符(RDKit全集)、QED、SA评分、Lipinski/Veber规则 | --smiles --descriptor_set all\|druglike\|physical\|topological | | scaffold | Murcko骨架提取、通用骨架、多样性分析、R基团分解 | --smiles 或 --targetsmiles smi1,smi2,... --rgroupcore | | mcs | 2+分子间的最大公共子结构 | --target_smiles smi1,smi2,... | | mmpa | 匹配分子对分析 — 寻找单点变换 | --target_smiles smi1,smi2,... | | chemspace | 化学空间可视化(PCA/t-SNE/UMAP散点图PNG) | --target_smiles smi1,smi2,... --method pca\|tsne\|umap --output plot.png |

示例:
bash

标准化盐形式


python scripts/advanced_chem.py --action standardize --smiles [Na+].CC(=O)[O-]

完整描述符(217+)

python scripts/advancedchem.py --action descriptors --smiles CC(=O)Oc1ccccc1C(=O)O --descriptorset all

集合的骨架多样性

python scripts/advancedchem.py --action scaffold --targetsmiles CC(=O)Oc1ccccc1C(=O)O,CN1C=NC2=C1C(=O)N(C(=O)N2C)C,CC(C)Cc1ccc(cc1)C(C)C(=O)O

阿司匹林和水杨酸的MCS

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pharmaclaw-chemistry-query-1775877317 技能

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

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

通过命令行安装

skillhub install pharmaclaw-chemistry-query-1775877317

下载

⬇ 下载 pharmaclaw-chemistry-query v2.0.1(免费)

文件大小: 26.41 KB | 发布时间: 2026-4-12 10:58

v2.0.1 最新 2026-4-12 10:58
PharmaClaw drug discovery suite - full agent team launch

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

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

p2p_official_large
返回顶部