从月到分钟
建 3×3 缺陷 MoS₂、Pt(111) + CO 吸附、MoS₂/hBN 异质结、moiré 双层——以前写半天 pymatgen 脚本,现在 2-4 条命令。
看 builder
pip install nku-vasp-cli && mat skill install vasp-materials-thinking && mat init -q && mat build mos2 -q装好后,下一步去你装了 skill 的 agent 里(OpenCode / Claude Code)说一句"帮我用 mat 做 MoS₂ 上 S 空位",agent 会按 5 步 + 4 checkpoint 跟你确认每一步。
mat 命令) pip install nku-vasp-cli
# 验证
mat materials # 应列出 9 个材料别名
mat skill list # 应看到 vasp-materials-thinking v0.2.0# 临时跑,不写 PATH。需要本机有 python3。
npx nku-vasp-cli materials
npx nku-vasp-cli skill listconda create -n vasp-cli python=3.11 -y
conda activate vasp-cli
pip install nku-vasp-cli
mat skill listgit clone https://github.com/AidenNovak/cli/nku-vasp-cli.git
cd nku-vasp-cli
python -m venv .venv && source .venv/bin/activate
pip install -e .
mat skill list
# 跑文档自检脚本
python scripts/check_docs.py# 当前项目目录下跑,skill 装到 ./.opencode/skill/
mat skill install vasp-materials-thinking
# 重启 OpenCode,agent 启动时自动加载# skill 装到 ~/.claude/skills/
mat skill install vasp-materials-thinking --agent claude
# 新 Claude session 自动可用# skill 装到 ./.cursor/skills/,需要在 .cursorrules 里 reference
mat skill install vasp-materials-thinking --agent cursor
# 或直接把 README 里的 system prompt 块粘到 .cursorrulesmat skill install vasp-materials-thinking --target ~/my-skills
# 或一次装全部 bundled skills
mat skill install all --target ~/my-skills装好了? → Quickstart 5 分钟跑完完整流程 →
装不上? → 在 GitHub 上 开 issue 或 看 Reference
CLI 0.4.0 起内置了 vasp-materials-thinking skill。装好 CLI 后一行 mat skill install 就推给 agent。
agent 会按这个流程跟你互动:
用户开题 → 🟢 CP-1 意图确认(≤3 问 + 默认)
→ 🟢 CP-2 结构预览(完整命令链,等 ✓ 才跑)
→ 跑 mat 命令链 + 自检
→ 🟢 CP-3 5 段式报告(图里看到啥 + 物理 insight)
→ 🟢 CP-4 下一步菜单(2-5 选项 + 推荐 + 「我自己想想」)做催化 / 2D 材料 DFT 的人都熟悉这个流程:
想做个 MoS₂ 3×3 supercell,挖 1 个 S 空位,画图看一眼对不对
↓
打开 VESTA / ASE / pymatgen,手写 30 行 Python
↓
跑出来 POSCAR,再开 VESTA 看
↓
发现位置不对,回去改脚本
↓
... 折腾半天nku-vasp-cli 把这套流程压成 3 条命令:
mat build mos2 -q # 单层 MoS2 + PNG
mat /structures update supercell=3x3 out=mos2-3x3.vasp -q # 3×3 + PNG
mat perturb vacancy=S:1 mos2-3x3.vasp out=defect.vasp -q # 缺陷 + PNG每条命令产出的 .png 让你立刻肉眼检查;产出的 .summary.md 包含 lattice、空位 site index、bond length,给 AI agent 作为 ground truth。