Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Train

ASecurity

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

199 stars
0 votes
0 copies
0 views
Added 9/20/2026
ai-agentsgoshellbashnode

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add Hello-QM/catgo-LRG --skill train --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Train?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Train
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hello-qm-train/badge)](https://www.skillsdirectory.com/skills/hello-qm-train)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: deepmd-train
description: >
  Train DeePMD-kit machine learning potentials. Covers DPA-3 (recommended),
  se_e2_a (legacy), and fine-tuning from pretrained models.
compatibility: >
  Requires deepmd-kit >= 3.0, GPU with CUDA. Training data in dpdata format.
catalog-hidden: true
---

# 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)

```json
{
  "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:

```json
"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

```bash
# 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

| Parameter | Typical value | Notes |
|---|---|---|
| rcut | 6.0-9.0 A | Interaction cutoff; larger = more accurate but slower |
| sel | auto or [N1, N2] | Max neighbors per type; use `dp neighbor-stat` |
| numb_steps | 500K-2M | More data needs more steps |
| start_lr | 1e-3 | Learning rate; reduce for fine-tuning |
| batch_size | auto | Let DeePMD choose based on system size |
| start_pref_f | 1000 | Force 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.

Attribution

Hello-QMHello-QM
View sourceMore from Hello-QM →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3331 votes

catchup

Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.

611 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →