unimol

A standardized command-line wrapper tool for Uni-Mol molecular ML workflows, supporting feature extraction (embedding vectors), model training (regression/classification), and property prediction using built-in RDKit SMILES validation. Use for generating molecular embeddings, training chemical property models, or predicting on SMILES datasets (.csv/.smi) within the Uni-Mol framework.

Last repository push
GitHub Stars
166
Forks
30
Issues / PRs
13

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "unimol" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b5404f600be214d5ba169b778d56fdb63456345c3eb92d4ccf6caf8e26b2ca8d. Verify the upstream source and version against https://github.com/jinzhezenggroup/computational-chemistry-agent-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A standardized command-line wrapper tool for Uni-Mol molecular ML workflows, supporting feature extraction (embedding vectors), model training (regression/classification), and property prediction using built-in RDKit SMILES validation. Use for generating molecular embeddings, training chemical property models, or predicting on SMILES datasets (.csv/.smi) within the Uni-Mol framework.

0 Downloads

Introduction source: third_party · jinzhezenggroup · 1.0 Reference

SkillPi interpretation

Tasks
This skill provides practical command patterns for **Uni-Mol molecular representation / training / prediction** using the standardized CLI wrapper: `<skill_path>/scripts/unimol_helper.py`.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: unimol
description: >
  A standardized CLI wrapper for Uni-Mol molecular ML workflows that handles representation extraction (embeddings), model training (regression/classification), and property prediction with built-in RDKit SMILES validation.
  USE WHEN you need to generate molecular embeddings, train machine learning models for chemical properties, or run predictions on SMILES datasets (.csv/.smi) using the Uni-Mol framework.
compatibility: Requires uv. Dependencies (unimol-tools, rdkit, etc.) are handled automatically via inline script metadata in unimol_helper.py.
license: LGPL-3.0-or-later
metadata:
  author: luzitian
  version: '1.0'
  repository: https://github.com/deepmodeling/Uni-Mol

Uni-Mol

This skill provides practical command patterns for Uni-Mol molecular representation / training / prediction using the standardized CLI wrapper: <skill_path>/scripts/unimol_helper.py.

Key behaviors (important for Agents):

  • The script prints environment detection (Python/Torch/CUDA) by default.
  • Bad/illegal SMILES are skipped and logged to *.skipped.csv (no crash).
  • Each run ends by printing absolute output paths like:
    • [RESULT] repr_npy=/abs/path.npy
    • [RESULT] model_dir=/abs/model_dir
    • [RESULT] pred_csv=/abs/pred.csv

Quick Start

Check CLI help:

uv run python <skill_path>/scripts/unimol_helper.py --help

Check subcommand help:

uv run python <skill_path>/scripts/unimol_helper.py repr --help
uv run python <skill_path>/scripts/unimol_helper.py train --help
uv run python <skill_path>/scripts/unimol_helper.py predict --help

Disable environment printing (optional):

uv run python <skill_path>/scripts/unimol_helper.py --no-env repr --smiles "CCO" --output out.npy

Core Tasks

1) Extract molecular representations (embedding) to .npy

Single SMILES:

uv run python <skill_path>/scripts/unimol_helper.py repr \
    --smiles "CCO" \
    --output /tmp/ccO.repr.npy

From CSV (default SMILES column is smiles):

uv run python <skill_path>/scripts/unimol_helper.py repr \
    --file data.csv \
    --smiles-col smiles \
    --output data.repr.npy

From SMI:

uv run python <skill_path>/scripts/unimol_helper.py repr \
    --file molecules.smi \
    --output molecules.repr.npy

Force CPU / GPU:

# Force CPU
uv run python <skill_path>/scripts/unimol_helper.py repr --smiles "CCO" --no-gpu --output out.npy

# Force GPU (will warn & fall back if CUDA is unavailable)
uv run python <skill_path>/scripts/unimol_helper.py repr --smiles "CCO" --use-gpu --output out.npy

2) Train a property model (classification / regression / multilabel_*)

Regression training (CSV must contain smiles and target columns):

uv run python <skill_path>/scripts/unimol_helper.py train \
    --task regression \
    --input train.csv \
    --smiles-col smiles \
    --target-col target \
    --epochs 50 \
    --output ./model_reg

Classification training:

uv run python <skill_path>/scripts/unimol_helper.py train \
    --task classification \
    --input train.csv \
    --smiles-col smiles \
    --target-col target \
    --epochs 50 \
    --output ./model_cls

Multilabel regression training (explicit multi-target columns):

uv run python <skill_path>/scripts/unimol_helper.py train \
    --task multilabel_regression \
    --input train.csv \
    --smiles-col smiles \
    --target-cols target_0,target_1,target_2 \
    --epochs 50 \
    --output ./model_mreg

Multilabel classification training:

uv run python <skill_path>/scripts/unimol_helper.py train \
    --task multilabel_classification \
    --input train.csv \
    --smiles-col smiles \
    --target-cols y_cls_0,y_cls_1,y_cls_2 \
    --epochs 50 \
    --output ./model_mcls

Target recognition for training:

  • Single-task (classification / regression): use --target-col (default target).
  • Multilabel tasks: prefer --target-cols (comma-separated).
  • If --target-cols is omitted for multilabel tasks, the helper auto-detects columns named target or prefixed with target_ (case-insensitive).

Force CPU:

uv run python <skill_path>/scripts/unimol_helper.py train \
    --task regression \
    --input train.csv \
    --epochs 50 \
    --output ./model_cpu \
    --no-cuda

3) Predict properties to .csv

Predict from CSV:

uv run python <skill_path>/scripts/unimol_helper.py predict \
    --model ./model_reg \
    --input test.csv \
    --smiles-col smiles \
    --output pred.csv

Predict from SMI:

uv run python <skill_path>/scripts/unimol_helper.py predict \
    --model ./model_reg \
    --input test.smi \
    --output pred.csv

Notes:

  • Output CSV contains the input rows (for valid SMILES) plus pred / pred_* columns.
  • If there are bad SMILES, they are skipped and saved to pred.csv.skipped.csv (or your --error-log path).

Agent Checklist

When using this skill for users:

  1. Confirm input format:
    • .csv requires a SMILES column (default smiles)
    • .smi uses the first token of each line as SMILES
  2. Quote SMILES containing special characters (brackets/parentheses):
    • Example: --smiles "[C]([H])([H])[H]"
  3. For CSV workflows, verify column names:
    • repr: --smiles-col
    • train: --smiles-col and --target-col / --target-cols
    • predict: --smiles-col
  4. Watch for skipped SMILES:
    • Check *.skipped.csv and decide whether to fix or permanently drop them
  5. Always capture absolute output paths:
    • Look for [RESULT] ...=/abs/path in stdout
  6. If debugging is needed, enable full traceback:
    • UNIMOL_HELPER_TRACE=1 uv run python <skill_path>/scripts/unimol_helper.py ...

References

Current listing version

1.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供分子机器学习工作流的标准化 CLI 封装,支持表征提取、模型训练和属性预测
  • 面向化学信息学和药物发现等专业场景,具有明确的技术实用价值
Trigger Precision90/100

Highlights

  • description 清晰定义了使用场景,触发词具体且边界清晰
  • 覆盖分子嵌入生成、模型训练、属性预测等核心用例
Structure and Standards90/100

Highlights

  • 文档结构完整,包含 Quick Start、Core Tasks、Agent Checklist
  • 提供详细的命令行示例,frontmatter 完整
Execution Reliability85/100

Highlights

  • 包含错误处理机制(跳过非法 SMILES 并记录)
  • 提供环境检测和调试选项,输出路径明确打印
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com
  • www.rdkit.org

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.