| name | openBabel_skill |
| description | 分子格式转换工具。支持在 .smi、.mol、.xyz、.gjf、.sdf 等格式之间转换,并可从 SMILES 或 2D 结构生成带坐标的 3D 结构。
当用户提到分子格式转换、3D构象生成、openbabel等需求时使用此skill。
|
| name_zh | 分子格式转换算子 |
| version | 1.0.0 |
| input_params | [{"name":"inputPath","type":"string","required":true,"description":"输入文件完整路径,例如 /work/jobs/acetic/acetic.smi"},{"name":"outType","type":"string","required":true,"description":"输出格式,例如 xyz、mol、gjf、sdf"},{"name":"isGen3d","type":"bool","required":true,"description":"是否生成3D构象"},{"name":"outputDir","type":"string","required":true,"description":"本次任务输出的工作目录(输出文件都生成在此路径下)"},{"name":"primaryOutputPath","type":"string","required":true,"description":"主输出文件完整路径"},{"name":"compressedOutputPath","type":"string","required":true,"description":"其他输出文件压缩包完整路径"}] |
| output_params | [{"name":"outputDir","type":"string","description":"本次任务输出的工作目录(输出文件都生成在此路径下)"},{"name":"primaryOutputPath","type":"string","description":"主输出文件"},{"name":"compressedOutputPath","type":"string","description":"其他输出文件压缩包路径"}] |
| tag | 数据转换 |
| disciplinary_field | 化工 |
功能概述
该算子基于 OpenBabel 实现分子格式转换和3D构象生成功能。支持多种化学分子文件格式之间的相互转换,并可从 SMILES 或 2D 结构生成带三维坐标的3D结构。
核心功能
- 格式转换: 在 .smi、.mol、.xyz、.gjf、.sdf 等格式之间转换
- 3D构象生成: 从 SMILES 或 2D 结构生成带坐标的 3D 结构
支持的文件格式
输入格式:.smi, .mol, .xyz, .gjf, .sdf 等 OpenBabel 支持的所有格式
输出格式:.xyz, .mol, .gjf, .sdf 等 OpenBabel 支持的所有格式
使用示例
命令行调用
python scripts/run_openBabel_skill.py \
--inputPath /path/to/acetic.smi \
--outType xyz \
--isGen3d false \
--outputDir /path/to/output \
--primaryOutputPath /path/to/output/acetic.xyz \
--compressedOutputPath /path/to/output/output.zip
python scripts/run_openBabel_skill.py \
--inputPath /path/to/acetic.smi \
--outType xyz \
--isGen3d true \
--outputDir /path/to/output \
--primaryOutputPath /path/to/output/acetic.xyz \
--compressedOutputPath /path/to/output/output.zip
python scripts/run_openBabel_skill.py \
--inputPath /path/to/molecule.mol \
--outType gjf \
--isGen3d false \
--outputDir /path/to/output \
--primaryOutputPath /path/to/output/molecule.gjf \
--compressedOutputPath /path/to/output/output.zip
python scripts/run_openBabel_skill.py \
--inputPath /path/to/molecule.xyz \
--outType sdf \
--isGen3d true \
--outputDir /path/to/output \
--primaryOutputPath /path/to/output/molecule.sdf \
--compressedOutputPath /path/to/output/output.zip
参数说明
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|
| inputPath | string | 是 | - | 输入文件完整路径,例如 /work/jobs/acetic/acetic.smi |
| outType | string | 是 | - | 输出格式,例如 xyz、mol、gjf、sdf |
| isGen3d | bool | 是 | - | 是否生成3D构象 |
| outputDir | string | 是 |