Nmr Prediction logo

Nmr Prediction

Organization
InternScience
nmr-prediction

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.

Overview

PublisherInternScience
RepositoryChemClaw
Skill namenmr-prediction
Stars
53
Forks
13
Bundled files
154
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 154 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by InternScience on GitHub. Read the source before you install it.

Installation

Install the Nmr Prediction AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/InternScience/ChemClaw/tree/main/skills/nmr-prediction
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/InternScience/ChemClaw.git /tmp/ChemClaw
mkdir -p .claude/skills
cp -r /tmp/ChemClaw/skills/nmr-prediction .claude/skills/nmr-prediction
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Nmr Prediction in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Nmr Prediction on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Nmr Prediction is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

NMR Chemical Shift Prediction Skill

When to use this

Use this skill when the user provides a SMILES string and wants:

  • Per-atom ¹H or ¹³C liquid-phase NMR chemical shifts (ppm)
  • Simulated NMR spectrum image (Lorentzian line-shape)
  • Quick deep-learning based prediction without DFT

Inputs

  • SMILES string (required, e.g. CCO for ethanol)
  • --nucleus H | C | both (optional, default both)

Outputs

  • /tmp/chemclaw/nmr_1H_<smiles>.png — ¹H NMR spectrum
  • /tmp/chemclaw/nmr_13C_<smiles>.png — ¹³C NMR spectrum
  • Console: per-atom chemical shifts (ppm)

目录结构

nmr-prediction/
├── SKILL.md
├── nmr_prediction.py
├── requirements.txt
└── assets/
    ├── NMRNet/        ← NMRNet 精简推理代码 + `oc_limit_dict.txt`
    └── Uni-Core/      ← Uni-Core 基础库(需要先 install)

模型权重(大文件,不放进 repo)存放于 /tmp/weights/,通过 --setup 自动下载。

环境安装 (首次)

1. 准备 assets/

bash
# 将 NMRNet 放入 assets/(从 GitHub 下载 zip 后解压)
cp -r ~/Downloads/NMRNet-main nmr-prediction/assets/NMRNet

# 将 Uni-Core 放入 assets/ 并安装
cp -r ~/Downloads/Uni-Core-main nmr-prediction/assets/Uni-Core
cd nmr-prediction/assets/Uni-Core
python setup.py install    # macOS 默认禁用 CUDA,直接执行

2. 安装 Python 依赖

bash
cd nmr-prediction
pip install -r requirements.txt
# 如果还没装 torch:pip install torch  (CPU 版即可)

3. 下载模型权重 + scaler → /tmp/weights/

bash
cd nmr-prediction
python nmr_prediction.py --setup

此命令通过 remotezip 从 Zenodo 仅提取所需文件:

  • H/C 模型 checkpoint(各 ~560 MB)→ /tmp/weights/finetune/liquid/.../
  • H/C 液相 scaler(各 623 B)→ 同上目录

注意:NMRNet 仓库自带的 demo/notebook/scaler/ 是固态 NMR scaler,不适用于液相预测。 当前 skill 只保留 NMRNet 的精简推理代码与 oc_limit_dict.txt,不依赖 demo/ 数据目录。

How to run(环境已准备好时)

bash
cd nmr-prediction

# 预测乙醇的 ¹H + ¹³C 谱
python nmr_prediction.py "CCO"

# 只预测苯的 ¹³C 谱
python nmr_prediction.py "c1ccccc1" --nucleus C

# 预测咖啡因的 ¹H 谱
python nmr_prediction.py "Cn1cnc2c1c(=O)n(c(=O)n2C)C" --nucleus H

运行原理(Pipeline)

SMILES
  ↓ RDKit: AddHs + EmbedMolecule + MMFFOptimize
3D 分子坐标 (atoms + coordinates)
  ↓ atoms_target_mask: 标记目标元素 (H 或 C) 为 1
NMRNet 数据记录 (dict)
  ↓ UniMatModel (SE(3)-Transformer, unimol_large 架构)
每原子预测化学位移 (scaled)
  ↓ TargetScaler.inverse_transform
化学位移 (ppm)
  ↓ Lorentzian 叠加
NMR 谱图 PNG

注意事项

  • 模型仅训练于液态 NMR 数据(nmrshiftdb2),固态化合物不适用
  • macOS CPU 推理速度较慢:¹H 约 10-30 秒,¹³C 约 10-30 秒(取决于分子大小)
  • 权重固定存放在 /tmp/weights/(重启后消失,需重新 --setup)
  • NMRNet / Uni-Core 代码在 assets/ 里,随 repo 一起走
  • assets/NMRNet/oc_limit_dict.txt 为运行时所需字典文件,不能删除

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 94 more files.

Frequently asked questions

What does the Nmr Prediction AI skill do?

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.

Why use Nmr Prediction on TypingMind?

Because you install it once and use it with any model. Nmr Prediction is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Nmr Prediction in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/InternScience/ChemClaw/tree/main/skills/nmr-prediction. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Nmr Prediction?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Nmr Prediction?

As many as you like. As long as a model supports skills, you can use Nmr Prediction with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Nmr Prediction AI skill free?

Yes. It is published on GitHub by InternScience under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇