deepmd-train

使用渐进式披露方式训练 DeePMD-kit 模型。适用于希望训练 DeePMD-kit 势函数的用户,包含准备 input.json 文件、选择模型族(例如 se_e2_a/DeepPot-SE 或 DPA3)、运行 `dp train` 命令、监控学习曲线、冻结检查点以及测试已训练模型。从模型选择开始,仅在需要模型特定配置时,读取 models/ 目录下所选模型的参考文档。

仓库最近推送
GitHub Stars
166
Forks
30
Issues / PRs
13

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "deepmd-train":https://skillpi.com/zh/skills/deepskill-0419fe1b6ea2e9b9501dd91143bac41a9f3e7135ab24b0e178c9f05ecc5a1803。安装前核对上游来源和版本:https://github.com/jinzhezenggroup/computational-chemistry-agent-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用渐进式披露方式训练 DeePMD-kit 模型。适用于希望训练 DeePMD-kit 势函数的用户,包含准备 input.json 文件、选择模型族(例如 se_e2_a/DeepPot-SE 或 DPA3)、运行 `dp train` 命令、监控学习曲线、冻结检查点以及测试已训练模型。从模型选择开始,仅在需要模型特定配置时,读取 models/ 目录下所选模型的参考文档。

0 下载

介绍来源: third_party · jinzhezenggroup · 1.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: deepmd-train
description: Train DeePMD-kit models with progressive disclosure. Use when the user wants to train a DeePMD-kit potential, prepare an input.json, choose between model families such as se_e2_a/DeepPot-SE and DPA3, run `dp train`, monitor learning curves, freeze checkpoints, or test trained models. Start with model selection and read only the selected model reference under `models/` when model-specific configuration is needed.
compatibility: Requires deepmd-kit installed. The selected backend and model may require PyTorch, TensorFlow, JAX, Paddle, GPU support, or custom OP libraries.
license: LGPL-3.0-or-later
metadata:
  author: iProzd
  version: '1.1'
  repository: https://github.com/deepmodeling/deepmd-kit

DeePMD-kit Training

Use this skill to guide DeePMD-kit model training without loading every model-specific recipe up front. The workflow is intentionally progressive:

  1. Understand the user's data, target accuracy, compute budget, and deployment backend.
  2. Choose an appropriate model family.
  3. Read only the reference file for the selected model under models/.
  4. Generate or edit input.json, run training, monitor, freeze, and test.

Progressive disclosure protocol

Do not start by reading every model document. First classify the request:

  • If the user already named a model, read only that model reference.
  • If the user asks for a recommendation, collect the decision inputs below, choose a model, then read only the selected reference.
  • If model-specific parameters are not needed yet, stay in this top-level workflow.

Available model references:

Model reference Read when
models/se-e2-a.md The user wants a classical DeepPot-SE baseline, broad compatibility, or a smaller/established production model.
models/dpa3.md The user wants a high-accuracy DPA3/LAM workflow, large/diverse datasets, dynamic neighbor selection, or pretrained DPA3-style training.

Model selection

Ask only for missing information that changes the choice. Prefer reasonable defaults when the answer is obvious from context.

Key inputs:

  • Data format and size: deepmd/npy, deepmd/hdf5, mixed type, number of systems/frames/elements.
  • Target: quick baseline, production accuracy, large atomic model, transfer/fine-tuning, or deployment in MD.
  • Compute: CPU/GPU, available memory, single-node vs. distributed training.
  • Backend/deployment: PyTorch/TensorFlow/JAX/Paddle training; LAMMPS, Python inference, or other downstream use.
  • Labels: energy/force only or also virial/stress.
  • System diversity: single chemistry/phase vs. diverse multi-domain datasets.

Recommended defaults:

  • Choose se_e2_a for a robust baseline, small to medium systems, compatibility-focused workflows, or when compute is limited.
  • Choose DPA3 for high accuracy on diverse datasets, LAM-style training, or when the user explicitly asks for DPA3, DPA-3, LiGS, dynamic neighbor selection, or pretrained DPA3 variants.

Common workflow

1. Confirm environment

dp --version

For PyTorch training, use dp --pt ...; for TensorFlow, use dp ...; for other backends, confirm the installed backend first.

2. Confirm training data

Training data should be in DeePMD format, typically deepmd/npy or deepmd/hdf5. If the user has raw electronic-structure outputs, convert them first with dpdata before writing the training input.

Minimum information needed to build input.json:

  • type_map
  • training system paths
  • validation system paths
  • whether virial labels are present and should be trained
  • target number of steps or accuracy/time budget
  • model choice

3. Read the selected model reference

After selecting a model, read the corresponding file under models/ and apply its model-specific configuration, hyperparameters, and caveats.

4. Train

dp --pt train input.json

Use the backend-specific command if not using PyTorch.

Restart from a checkpoint when needed:

dp --pt train input.json --restart model.ckpt.pt

5. Monitor

Training progress is usually written to lcurve.out. Check for:

  • decreasing validation RMSE
  • NaN or exploding losses
  • train/validation divergence
  • learning-rate schedule behaving as expected

6. Freeze and test

dp --pt freeze -o model.pth
dp --pt test -m model.pth -s /path/to/test_system -n 30

Adjust the backend flags and output extension for non-PyTorch models.

Agent checklist

  • [ ] Model was selected before reading model-specific details.
  • [ ] Only the selected model reference was loaded.
  • [ ] Training/validation data paths exist or are clearly marked as placeholders.
  • [ ] type_map matches the data and model/pretrained checkpoint.
  • [ ] Virial loss is enabled only when virial labels are available and desired.
  • [ ] Backend command matches the selected model and installed DeePMD-kit environment.
  • [ ] The generated input.json is valid JSON.
  • [ ] Training was monitored via lcurve.out or equivalent logs.
  • [ ] Final model was frozen and tested when requested.

References

当前收录版本

1.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值75/100

亮点

  • 提供 DeePMD-kit 模型训练的全流程指导,从数据准备到模型部署形成完整闭环
  • 采用渐进式披露设计,避免一次性加载所有模型文档,提升交互效率
  • 面向科学计算专业领域,解决势函数训练这一明确的高价值需求
触发精准92/100

亮点

  • 触发场景描述完整,涵盖训练、配置、监控、冻结、测试等关键环节
  • 触发词具体明确,边界清晰,不易与其他 Skill 产生歧义
结构规范95/100

待提升项

  • 缺少显式 When to Use 章节 原报告严重程度:轻微

    文档结构良好,但缺少显式命名的 When to Use 章节,尽管 description 已涵盖相关内容

    改进建议:可考虑添加显式的 When to Use 章节以提升规范性

亮点

  • 结构层次清晰,包含渐进式披露协议、模型选择、工作流步骤和检查清单
  • frontmatter 完整,包含兼容性、许可证和元数据信息
  • 提供端到端示例和具体命令,便于用户直接执行
执行可靠90/100

亮点

  • 工具命令准确(dp train/freeze/test),参数使用规范
  • 覆盖训练过程中的主要异常场景(NaN、发散、学习率问题)
  • 提供检查清单确保关键配置正确,降低执行风险
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

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

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • docs.deepmodeling.com
  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。