一键导入
smiles-to-iupac
将 SMILES 字符串转换为 IUPAC 化学名称。使用 PubChem、NCI/CADD、STOUT、RDKit-InChI 多种方法智能转换。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
将 SMILES 字符串转换为 IUPAC 化学名称。使用 PubChem、NCI/CADD、STOUT、RDKit-InChI 多种方法智能转换。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | smiles-to-iupac |
| description | 将 SMILES 字符串转换为 IUPAC 化学名称。使用 PubChem、NCI/CADD、STOUT、RDKit-InChI 多种方法智能转换。 |
| trigger | ["SMILES","IUPAC","SMILES 转名称","smiles to iupac","化学名称","分子命名","STOUT"] |
将 SMILES 字符串转换为 IUPAC 化学名称,使用多种方法智能转换:PubChem API、NCI/CADD、STOUT (Docker)、RDKit-InChI。
| 方法 | 来源 | 返回 | 置信度 | 速度 |
|---|---|---|---|---|
| PubChem | NCBI | IUPAC | ⭐⭐⭐⭐⭐ | 快 |
| NCI/CADD | NCI | IUPAC | ⭐⭐⭐⭐⭐ | 快 |
| STOUT | Docker | InChI | ⭐⭐⭐⭐ | 中 |
| RDKit-InChI | RDKit | InChI | ⭐⭐⭐⭐ | 快 |
1. PubChem API → 成功?→ 返回 IUPAC 名称
↓ 失败
2. NCI/CADD API → 成功?→ 返回 IUPAC 名称
↓ 失败
3. STOUT (Docker) → 成功?→ 返回 InChI
↓ 失败
4. RDKit-InChI → 生成 InChI → 返回
stout 包把 CCO 转成 IUPAC 名称
SMILES: CC(=O)Oc1ccccc1C(=O)O,转 IUPAC
smiles to iupac: C1=CC=C(C=C1)O
自动转换这个 SMILES
# 基本转换(自动选择最佳方法)
python3 scripts/smiles_to_iupac.py -s "CCO"
# 指定使用 PubChem
python3 scripts/smiles_to_iupac.py -s "CCO" -m pubchem
# 指定使用 NCI/CADD
python3 scripts/smiles_to_iupac.py -s "CCO" -m nci
# 指定使用 STOUT (Docker)
python3 scripts/smiles_to_iupac.py -s "CCO" -m stout
# 指定生成 InChI
python3 scripts/smiles_to_iupac.py -s "CCO" -m inchi
# 指定输出目录
python3 scripts/smiles_to_iupac.py -s "CCO" -o ./results
# 不计算分子性质(加快速度)
python3 scripts/smiles_to_iupac.py -s "CCO" --no-properties
# 安静模式(输出 JSON)
python3 scripts/smiles_to_iupac.py -s "CCO" -q
| 参数 | 简写 | 说明 | 默认值 |
|---|---|---|---|
--smiles | -s | 输入 SMILES 字符串 | - |
--output | -o | 输出目录 | ~/.openclaw/media/smiles-to-iupac |
--method | -m | 方法:auto/pubchem/nci/stout/inchi | auto |
--no-properties | 不计算分子性质 | false | |
--quiet | -q | 安静模式(输出 JSON) | false |
{
"input_smiles": "CCO",
"cleaned_smiles": "CCO",
"timestamp": "2026-03-16T20:00:00",
"molecular_properties": {
"molecular_formula": "C2H6O",
"molecular_weight": 46.07,
"num_atoms": 9,
"num_heavy_atoms": 3
},
"results": [
{
"status": "success",
"iupac_name": "ethanol",
"smiles": "CCO",
"model": "PubChem",
"source": "api",
"confidence": "high"
}
],
"best_result": {
"status": "success",
"iupac_name": "ethanol",
"model": "PubChem",
"confidence": "high"
}
}
{
"input_smiles": "CC(=O)Oc1ccccc1C(=O)O",
"best_result": {
"status": "success",
"iupac_name": "2-acetyloxybenzoic acid",
"model": "NCI/CADD",
"confidence": "high"
}
}
{
"input_smiles": "*CC(C(=O)OCCCCOc1ccc(cc1)C(=O)Oc1ccc(cc1)OC)(C)*",
"cleaned_smiles": "CC(C)(C(=O)OCCCCOc1ccc(cc1)C(=O)Oc1ccc(cc1)OC)",
"best_result": {
"status": "success",
"iupac_name": "InChI: 1S/C22H26O6/...",
"model": "RDKit-InChI",
"confidence": "medium",
"note": "InChI is a standardized identifier"
}
}
# 基本安装(推荐)
pip install rdkit requests
# 完整安装(包含 STOUT)
pip install rdkit requests stout
# 确保 Docker 已安装(STOUT 需要)
docker --version
| 场景 | 推荐方法 | 原因 |
|---|---|---|
| 常见有机分子 | auto (PubChem) | 准确率最高 |
| 药物分子 | auto (PubChem) | 数据库覆盖广 |
| 无网络连接 | stout/inchi | 本地运行 |
| 隐私敏感 | stout/inchi | 不上传数据 |
| 聚合物 | inchi | 生成标准化 InChI |
| PubChem 失败 | auto (自动降级) | 尝试其他方法 |
自动清理以下内容:
*...* → 移除示例:
*CCO* → CCO
C C O → CCO
包括以下性质(如果 RDKit 可用):
重要:为了能在飞书等平台上发送生成的文件,输出目录必须在白名单内:
~/.openclaw/media/~/.openclaw/workspace/~/.openclaw/agents/本 skill 默认输出到 ~/.openclaw/media/smiles-to-iupac/,可以直接分享!
1. smiles-to-iupac: SMILES → IUPAC 名称
2. iupac-to-smiles: IUPAC 名称 → SMILES (反向验证)
1. mol-image-to-smiles: 分子图片 → SMILES
2. smiles-to-iupac: SMILES → IUPAC 名称
分子图片 → mol-image-to-smiles → SMILES → smiles-to-iupac → IUPAC 名称
↓ ↓
2D 结构图 iupac-to-smiles
↓ ↓
可视化 IUPAC 名称(验证)
# 转换乙醇
python3 scripts/smiles_to_iupac.py -s "CCO"
# 输出:ethanol
# 转换阿司匹林
python3 scripts/smiles_to_iupac.py -s "CC(=O)Oc1ccccc1C(=O)O"
# 输出:2-acetyloxybenzoic acid
# 转换乳酸(R 型)
python3 scripts/smiles_to_iupac.py -s "C[C@H](O)C(=O)O"
# 输出:(2R)-2-hydroxypropanoic acid
# 转换聚合物重复单元
python3 scripts/smiles_to_iupac.py \
-s "*CC(C(=O)OCCCCOc1ccc(cc1)C(=O)Oc1ccc(cc1)OC)(C)*"
# 输出:InChI (聚合物不在数据库中)
methods_order = ["pubchem", "nci", "stout", "inchi"]
for method in methods_order:
result = try_method(method, smiles)
if result["status"] == "success":
return result # 成功即返回
# 所有方法都失败
return error
使用 RDKit 验证:
from rdkit import Chem
mol = Chem.MolFromSmiles(smiles)
is_valid = mol is not None
from rdkit.Chem import rdMolDescriptors, Descriptors
formula = rdMolDescriptors.CalcMolFormula(mol)
mw = Descriptors.MolWt(mol)
logp = Descriptors.MolLogP(mol)
tpsa = rdMolDescriptors.CalcTPSA(mol)
| 错误 | 说明 | 解决方案 |
|---|---|---|
Invalid SMILES | SMILES 格式错误 | 检查 SMILES 语法 |
PubChem API error | API 调用失败 | 检查网络连接 |
NCI API error | NCI 服务不可用 | 尝试其他方法 |
STOUT not installed | STOUT 未安装 | pip install stout |
Docker not available | Docker 未运行 | 启动 Docker 服务 |
All methods failed | 所有方法失败 | 分子可能太大或不在数据库 |
| 特性 | iupac-to-smiles | smiles-to-iupac |
|---|---|---|
| 输入 | IUPAC 名称 | SMILES |
| 输出 | SMILES | IUPAC 名称/InChI |
| 核心模型 | OPSIN API | PubChem/NCI/STOUT |
| 需要网络 | 是 | 可选 |
| 转换方向 | 名称→结构 | 结构→名称 |
CCO → ethanol
CCCO → propan-1-ol
CC(C)O → propan-2-ol
CC(=O)O → acetic acid
CCC(=O)O → propanoic acid
c1ccccc1C(=O)O → benzoic acid
CC(=O)OCC → ethyl acetate
CC(=O)Oc1ccccc1C(=O)O → 2-acetyloxybenzoic acid
c1ccccc1 → benzene
c1ccccc1O → phenol
c1ccccc1N → aniline
| 方法 | 平均响应时间 | 成功率 | 准确率 |
|---|---|---|---|
| PubChem | ~1s | 90%+ | 95%+ |
| NCI/CADD | ~2s | 88%+ | 93%+ |
| STOUT | ~10s | 85%+ | 90%+ |
| RDKit-InChI | ~0.1s | 99%+ | 100% (InChI) |
Extract structured chemical compound characterization data from chemistry supplementary material documents (PDF/Markdown). 从化学论文补充材料(PDF/Markdown)中提取结构化化合物表征数据。 Use when Kimi needs to extract compound properties including NMR spectra, HRMS, HPLC data, melting points, optical rotation, and yield information from chemistry research papers or supplementary materials. 支持提取NMR谱图、HRMS、HPLC数据、熔点、旋光度、产率等信息。 Supports both single compound extraction and batch extraction of all compounds. 支持单个化合物提取和批量提取所有化合物。
Convert Gaussian gjf input files to XYZ format. 将Gaussian gjf输入文件转换为XYZ格式。 Use when agent needs to convert molecular structure files from Gaussian input format (.gjf) to XYZ format for visualization or use with other computational chemistry software. 当智能体需要将Gaussian输入格式(.gjf)的分子结构文件转换为XYZ格式用于可视化或其他计算化学软件时使用。
Convert PDF files to Markdown using MinerU API. 使用MinerU API将PDF文件转换为Markdown格式。 Use when Kimi needs to extract structured text, images, tables, and formulas from PDF documents while preserving document layout and formatting. 适用于需要提取结构化文本、图片、表格和公式并保留文档布局的场景。 Supports batch conversion and outputs full.md with images/, JSON metadata, and other extracted assets. 支持批量转换,输出full.md、images/目录、JSON元数据等。 Now supports large PDFs (600+ pages) by automatic splitting and merging. 现已支持大文件(600+页)自动拆分和合并处理。
Extract DFT calculation coordinates from PDF files and generate Gaussian gjf files. 从PDF文件中提取DFT计算坐标并生成Gaussian gjf输入文件。 Supports batch processing with separate output folders for each PDF. 支持批量处理,每个PDF单独生成输出文件夹。
Predict and visualize MS/MS spectra from a single SMILES using the fioRa online app. Use when the user wants a mass spectrum, MGF/MSP output, or a plotted stick spectrum from SMILES, with optional custom Name, precursor type, collision energy, and instrument settings.
Predict liquid-phase ¹H and ¹³C NMR chemical shifts from a SMILES string using NMRNet (deep learning, SE(3)-Transformer). Outputs per-atom shift values (ppm) and Lorentzian-broadened spectrum PNG files.