소스 정보
- 저장소
- InternScience/ChemClaw
- 최근 소스 활동
- 2026년 3월 25일 04:55
- 감지된 SKILL.md 언어
- 중국어
- 스타
- 52
- 포크
- 11
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/InternScience/ChemClaw --skill mol-image-to-smiles명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | mol-image-to-smiles |
| description | 将分子结构图片转换为 SMILES 字符串。使用 DECIMER 和 MolNextR 模型进行图像识别。 |
| trigger | ["分子图片","SMILES","图片转 SMILES","image to smiles","分子结构图","chemical image","OCR","识别分子"] |
将分子结构图片转换为 SMILES 字符串,使用 DECIMER 和 MolNextR 模型进行智能识别。
| 模型 | 来源 | 特点 | 使用方式 |
|---|---|---|---|
| DECIMER | 德国联邦材料研究与测试所 | 高精度、速度快 | 本地安装 |
| MolNextR | MolecularAI (HuggingFace) | 支持复杂结构 | API 调用 |
decimer 包把这个分子图片转成 SMILES
识别这张化学结构图
image to smiles: molecule.png
用 DECIMER 识别这个分子
# 基本转换(自动选择模型)
python3 scripts/mol_image_to_smiles.py -i molecule.png
# 指定使用 DECIMER
python3 scripts/mol_image_to_smiles.py -i molecule.png -m decimer
# 指定使用 MolNextR
python3 scripts/mol_image_to_smiles.py -i molecule.png -m molnextr
# 指定输出目录
python3 scripts/mol_image_to_smiles.py -i molecule.png -o ./results
# 批量处理
python3 scripts/mol_image_to_smiles.py -i "*.png" -o ./batch
# 安静模式(输出 JSON)
python3 scripts/mol_image_to_smiles.py -i molecule.png -q
| 参数 | 简写 | 说明 | 默认值 |
|---|---|---|---|
--input | -i | 输入图片路径 | - |
--output | -o | 输出目录 | ~/.openclaw/media/mol-image-to-smiles |
--model | -m | 模型选择:auto/decimer/molnextr | auto |
--quiet | -q | 安静模式(输出 JSON) | false |
{
"input_image": "/path/to/molecule.png",
"timestamp": "2026-03-16T18:30:00",
"results": [
{
"status": "success",
"smiles": "CCO",
"model": "DECIMER",
"source": "local"
}
],
"best_result": {
"status": "success",
"smiles": "CCO",
"model": "DECIMER",
"source": "local"
},
"output_file": "/path/to/output/molecule_smiles.json"
}
{
"input_image": "/path/to/complex.png",
"results": [
{
"status": "success",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"model": "DECIMER",
"source": "local"
},
{
"status": "success",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"model": "MolNextR",
"source": "huggingface"
}
],
"best_result": {
"status": "success",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"model"
{
"input_image": "/path/to/invalid.png",
"results": [
{
"status": "error",
"error": "无法识别分子结构",
"model": "DECIMER"
}
],
"best_result": {
"status": "error",
"error": "无法识别分子结构"
}
}
# 安装 DECIMER(推荐)
pip install decimer
# 安装 MolNextR 依赖
pip install huggingface_hub
# 完整安装
pip install decimer huggingface_hub rdkit
| 场景 | 推荐模型 | 原因 |
|---|---|---|
| 标准化学结构图 | DECIMER | 速度快、准确率高 |
| 复杂分子结构 | MolNextR | 支持更复杂的结构 |
| 无网络连接 | DECIMER | 本地运行 |
| DECIMER 失败时 | MolNextR | 备用方案 |
| 不确定 | auto | 自动选择最佳 |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 识别失败 | 图片质量差 | 提高图片清晰度 |
| SMILES 错误 | 结构复杂 | 尝试 MolNextR 模型 |
| 立体化学丢失 | 图片无立体信息 | 提供包含楔形键的图片 |
| 原子识别错误 | 字体不清晰 | 使用标准字体 |
重要:为了能在飞书等平台上发送生成的文件,输出目录必须在白名单内:
~/.openclaw/media/~/.openclaw/workspace/~/.openclaw/agents/本 skill 默认输出到 ~/.openclaw/media/mol-image-to-smiles/,可以直接分享!
1. mol-image-to-smiles: 从图片识别 SMILES
2. iupac-to-smiles: 从 SMILES 反推 IUPAC 名称(需要额外工具)
1. mol-image-to-smiles: 从图片提取 SMILES
2. mol-2d-viewer: 用 SMILES 生成新的 2D 结构图
1. mol-image-to-smiles: 从图片提取 SMILES
2. mol-3d-viewer: 生成 3D 分子结构
1. mol-image-to-smiles: 从图片提取 SMILES
2. mol-paper-renderer: 生成出版级分子图片
# 转换单张图片
python3 scripts/mol_image_to_smiles.py -i aspirin.png
# 查看结果
cat ~/.openclaw/media/mol-image-to-smiles/aspirin_smiles.json
# 批量处理目录中所有图片
for img in ./molecules/*.png; do
python3 scripts/mol_image_to_smiles.py -i "$img" -o ./results
done
# 合并结果
cat ./results/*_smiles.json | jq -s '.' > all_results.json
# 使用 DECIMER
python3 scripts/mol_image_to_smiles.py -i molecule.png -m decimer -o ./decimer_result
# 使用 MolNextR
python3 scripts/mol_image_to_smiles.py -i molecule.png -m molnextr -o ./molnextr_result
# 对比结果
diff ./decimer_result/*.json ./molnextr_result/*.json
DECIMER (Deep Learning for Chemical Image Recognition) 使用:
MolNextR 使用:
| 数据集 | DECIMER | MolNextR |
|---|---|---|
| 简单分子 | 95%+ | 93%+ |
| 中等复杂度 | 90%+ | 92%+ |
| 复杂分子 | 85%+ | 88%+ |
| 含立体化学 | 80%+ | 85%+ |
| 错误 | 说明 | 解决方案 |
|---|---|---|
File not found | 图片文件不存在 | 检查文件路径 |
Invalid image | 图片格式不支持 | 使用 png/jpg/jpeg |
No molecule detected | 未检测到分子结构 | 检查图片质量 |
DECIMER not installed | DECIMER 未安装 | pip install decimer |
API error | HuggingFace API 错误 | 检查网络连接 |
| 特性 | iupac-to-smiles | mol-image-to-smiles |
|---|---|---|
| 输入 | IUPAC 名称 | 分子图片 |
| 输出 | SMILES | SMILES |
| 核心模型 | OPSIN API | DECIMER/MolNextR |
| 需要网络 | 是 | 可选 |
| 识别对象 | 文本 | 图像 |