本文へ移動
cccskills
無料GitHub で公開

deepmd-train

Train DeePMD-kit machine learning potentials. Covers DPA-3 (recommended), se_e2_a (legacy), and fine-tuning from pretrained models.

日本語の概要は準備中です。原文の説明を表示しています。

Hello-QM/catgo-LRGスター 208(GitHub 208 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

DeePMD Training

When to Use

  • User wants to train a machine learning interatomic potential
  • User has DFT data (energies, forces, stresses) and wants a DP model
  • User wants to fine-tune a pretrained DPA-3 model

Prerequisites

  1. Training data in DeePMD format (use data/dpdata/SKILL.md to convert from VASP/QE)
  2. GPU node available on HPC
  3. deepmd-kit installed (dp --version)

Data Directory Structure

data/
├── train/
│   ├── set.000/
│   │   ├── coord.npy       # Atomic coordinates (natoms*3,)
│   │   ├── energy.npy      # Total energy (1,)
│   │   ├── force.npy       # Forces (natoms*3,)
│   │   ├── box.npy         # Cell vectors (9,)
│   │   └── virial.npy      # Stress tensor (optional, 9,)
│   └── type.raw            # Atom type indices
└── valid/
    └── set.000/
        └── ...

Workflow Steps

1. Create workflow

catgo_workflow_engine(action="create", params={"name": "DeePMD DPA-3 training"})

2. Add training task

catgo_workflow_engine(action="add_task", params={
  "workflow_id": "wf_xxx",
  "task_type": "shell",
  "name": "dp_train",
  "command": "dp train input.json 2>&1 | tee train.log",
  "input_files": {
    "input.json": "<training config>"
  },
  "system_name": "dp_model"
})

3. Add freeze step (convert to production model)

catgo_workflow_engine(action="add_task", params={
  "workflow_id": "wf_xxx",
  "task_type": "shell",
  "name": "dp_freeze",
  "command": "dp freeze -o frozen_model.pb",
  "depends_on": ["dp_train"],
  "system_name": "dp_model"
})

DPA-3 Training Config (Recommended)

{
  "model": {
    "type_map": ["Ti", "O"],
    "descriptor": {
      "type": "dpa3",
      "rcut": 6.0,
      "rcut_smth": 0.5,
      "sel": "auto",
      "neuron": [25, 50, 100],
      "n_interaction": 3,
      "n_head": 4
    },
    "fitting_net": {
      "type": "ener",
      "neuron": [240, 240, 240]
    }
  },
  "training": {
    "training_data": {
      "systems": ["./data/train"],
      "batch_size": "auto"
    },
    "validation_data": {
      "systems": ["./data/valid"],
      "batch_size": "auto"
    },
    "numb_steps": 1000000,
    "disp_freq": 1000,
    "save_freq": 10000
  },
  "learning_rate": {
    "type": "exp",
    "start_lr": 1e-3,
    "stop_lr": 1e-8,
    "decay_steps": 5000
  },
  "loss": {
    "type": "ener",
    "start_pref_e": 0.02,
    "limit_pref_e": 1.0,
    "start_pref_f": 1000,
    "limit_pref_f": 1.0,
    "start_pref_v": 0.0,
    "limit_pref_v": 0.0
  }
}

se_e2_a Training Config (Legacy)

Replace the descriptor block:

"descriptor": {
  "type": "se_e2_a",
  "rcut": 6.0,
  "rcut_smth": 0.5,
  "sel": [46, 92],
  "neuron": [25, 50, 100],
  "axis_neuron": 16
}

sel must list the max neighbor count per element type. Use dp neighbor-stat to determine.

Fine-Tuning from Pretrained Model

# Download pretrained model (e.g., from AIS Square)
# Then fine-tune:
dp train input.json --finetune pretrained.pb 2>&1 | tee finetune.log

Reduce numb_steps to 100000-200000 and start_lr to 1e-4 for fine-tuning.

Parameter Guidance

ParameterTypical valueNotes
rcut6.0-9.0 AInteraction cutoff; larger = more accurate but slower
selauto or [N1, N2]Max neighbors per type; use dp neighbor-stat
numb_steps500K-2MMore data needs more steps
start_lr1e-3Learning rate; reduce for fine-tuning
batch_sizeautoLet DeePMD choose based on system size
start_pref_f1000Force weight starts high, decays to limit_pref_f

Common Pitfalls

  1. Insufficient training data — need at least 1000-5000 frames for a reliable model. More diverse configs = better.
  2. sel too small — if max neighbors exceeds sel, training crashes. Always run dp neighbor-stat first.
  3. Overfitting — monitor validation loss. If train loss drops but valid loss plateaus, stop training or add more data.
  4. Missing virial — if training data has no stress tensor, set start_pref_v = 0, limit_pref_v = 0.
  5. Mixed element sets — type_map must be consistent across all training systems and inference.
  6. Forgetting to freeze — the checkpoint directory is not the production model. Run dp freeze to create a portable .pb file.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

abinit

無料

Generate and manage ABINIT DFT calculations. Use when the user requests ABINIT, or needs DFPT phonons, GW calculations, or BSE optical spectra.

日本語の概要は準備中です。原文の説明を表示しています。

Hello-QM/catgo-LRG2082026年10月23日 更新

Use when the user asks to place an adsorbate molecule on a surface, find adsorption sites, or set up a surface+adsorbate model for DFT.

日本語の概要は準備中です。原文の説明を表示しています。

Hello-QM/catgo-LRG2082026年10月23日 更新

Use when the user asks for adsorption energy, binding energy, or wants to compare how strongly a molecule binds to a surface.

日本語の概要は準備中です。原文の説明を表示しています。

Hello-QM/catgo-LRG2082026年10月23日 更新

Use when the user asks to analyze computational results: Gibbs free energy, OER/HER/CO2RR overpotentials, adsorption energy, convergence tests, DOS/d-band analysis, or Bader charge analysis.

日本語の概要は準備中です。原文の説明を表示しています。

Hello-QM/catgo-LRG2082026年10月23日 更新

Use AmberTools antechamber for molecular force field parameterization. Generates GAFF/GAFF2 parameters and AM1-BCC or RESP charges for use in AMBER or LAMMPS classical MD simulations.

日本語の概要は準備中です。原文の説明を表示しています。

Hello-QM/catgo-LRG2082026年10月23日 更新

atom-ops

無料

One-shot recipes for adding, deleting, moving, and replacing individual atoms in the active CatGo viewer structure. Use whenever the user asks to "add an atom", "delete atoms", "remove this atom", "move atom N", "replace H with Li", or any single-atom edit — including "add a hydrogen on top of atom 12" / "delete atoms 5–9" / "swap the oxygen at site 3 for fluorine". Skips the discovery loop (no need to list structure tools or check adsorption sites first); goes straight to the matching `catgo_structure` action. Triggers in Chinese on 加原子, 删原子, 减原子, 移动原子, 替换原子, 增加氢, 删除氧, 把 ... 换成 ....

日本語の概要は準備中です。原文の説明を表示しています。

Hello-QM/catgo-LRG2082026年10月23日 更新

Hello-QM のスキルをすべて見る

このスキルの問題を報告する