Deepmd train

From jinzhezenggroup/computational-chemistry-agent-skills · View interactive version

Deepmd train is an AI agent skill from the GitHub repository jinzhezenggroup/computational-chemistry-agent-skills. 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, DPA3, DPA4/SeZM, and DPA4C, run `dp train`, monitor learning curves, freeze checkpoints, or test trained mode

How to use this skill

Skill file

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 CODE0.
  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:

Available model references:

| Model reference | Read when |

| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |

| CODE0 | The user wants a classical DeepPot-SE baseline, broad compatibility, or a smaller/established production model. |

| CODE0 | The user wants a high-accuracy DPA3/LAM workflow, large/diverse datasets, dynamic neighbor selection, or pretrained DPA3-style training. |

| CODE0 | The user wants the PyTorch-only DPA4/SeZM SO(3)-equivariant architecture and its .pt2 deployment path. |

| CODE0 | The user wants the compact DPA4C architecture, PyTorch Exportable training, and optional compressed .pt2 deployment. |

Model selection

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

Key inputs:

Recommended defaults:

Common workflow

1. Confirm environment

dp --version

For conventional PyTorch training, use dp --pt ...; DPA4C uses the PyTorch

Exportable backend, dp --pt-expt .... 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:

3. Read the selected model reference

For new DPA4 and DPA4C inputs, follow the preset workflow first and reserve manual architecture blocks for the advanced path.

After selecting a model, read the corresponding file under CODE0 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:

6. Freeze and test

Read the selected model reference before choosing the output format. For

conventional PyTorch models, a typical flow is:

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

DPA4/SeZM and DPA4C checkpoints instead freeze to .pt2; follow the selected

model reference. DPA4C may additionally be compressed for deployment.

Adjust the backend and output format for other model families.

Agent checklist

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.