Run Python inference with DeePMD-kit models using the DeepPot API.

LGPL-3.0-or-laterAuto-check passedData & Analytics

Install Deepmd Python Inference

skills CLI
$ npx skills add jinzhezenggroup/computational-chemistry-agent-skills --skill deepmd-python-inference -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jinzhezenggroup/computational-chemistry-agent-skills deepmd-python-inference --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jinzhezenggroup/computational-chemistry-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/machine-learning-potentials/deepmd-python-inference .claude/skills/deepmd-python-inference && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
deepmd-python-inference
GitHub stars
148
Token cost
~2.3k tokens
SKILL.md length
423 words
Files
1
Skills in repo
62
Repo updated
First seen
Licence
LGPL-3.0-or-later

At a glance

Run Python inference with DeePMD-kit models using the DeepPot API.

  • Works in 4 steps: Determine the model source → Determine the inference task → Help the user prepare input arrays in… → …
  • The user wants to load a trained/frozen DeePMD model (.pth
  • SKILL.md covers Quick Start, Agent Responsibilities, Python API: DeepPot and CLI Testing: dp test, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Deepmd Python Inference is an agent skill from jinzhezenggroup/computational-chemistry-agent-skills. Run Python inference with DeePMD-kit models using the DeepPot API. Use when the user wants to load a trained/frozen DeePMD model (.pth or .pb) or a built-in pretrained model (e.g., DPA-3.2-5M) in Python, predict energy/force/virial for atomic configurations, evaluate descriptors, or calculate model deviation between multiple models. Also covers using dp test CLI for batch evaluation against labeled data.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires deepmd-kit Python package installed. PyTorch backend for .pth models, TensorFlow for .pb models.

It sits in Data & Analytics. It works with Python. The repository describes itself as: Agent skills to run computational-chemistry tasks, used in OpenClaw. The licence is LGPL-3.0-or-later.

When your agent uses it

  • The user wants to load a trained/frozen DeePMD model (.pth
  • A built-in pretrained model (e.g.
  • DPA-3.2-5M) in Python
  • Predict energy/force/virial for atomic configurations

Example prompts

  • “/deepmd-python-inference”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires deepmd-kit Python package installed. PyTorch backend for .pth models, TensorFlow for .pb models.

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Determine the model source
  2. Determine the inference task
  3. Help the user prepare input arrays in the correct format.
  4. Run inference and report results.

What it can do on your machine

Read from SKILL.md and the folder at commit 5c19e75. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.deepmodeling.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires deepmd-kit Python package installed. PyTorch backend for .pth models, TensorFlow for .pb models.

    From compatibility in the SKILL.md frontmatter.

Context cost

Deepmd Python Inference loads about 2.3k tokens when it runs. Until then it costs about 108 tokens; SKILL.md has 423 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jinzhezenggroup/computational-chemistry-agent-skills at commit 5c19e75, republished under its LGPL-3.0-or-later licence (© jinzhezenggroup). 423 words, ~2,289 tokens.

Download SKILL.mdSave it as .claude/skills/deepmd-python-inference/SKILL.md (or your agent's skills folder).
name
deepmd-python-inference
description
Run Python inference with DeePMD-kit models using the DeepPot API. Use when the user wants to load a trained/frozen DeePMD model (.pth or .pb) or a built-in pretrained model (e.g., DPA-3.2-5M) in Python, predict energy/force/virial for atomic configurations, evaluate descriptors, or calculate model deviation between multiple models. Also covers using `dp test` CLI for batch evaluation against labeled data.
compatibility
Requires deepmd-kit Python package installed. PyTorch backend for .pth models, TensorFlow for .pb models.
license
LGPL-3.0-or-later
metadata.author
iProzd
metadata.version
1.0
metadata.repository
https://github.com/deepmodeling/deepmd-kit

DeePMD-kit Python Inference

Load a trained DeePMD-kit model in Python and predict energy, forces, and virial for atomic configurations. Also covers CLI-based testing with dp test.

Quick Start

python
from deepmd.infer import DeepPot
import numpy as np

dp = DeepPot("model.pth")
coord = np.array([[1, 0, 0], [0, 0, 1.5], [1, 0, 3]]).reshape([1, -1])
cell = np.diag(10 * np.ones(3)).reshape([1, -1])
atype = [1, 0, 1]
e, f, v = dp.eval(coord, cell, atype)

Agent Responsibilities

  1. Determine the model source:
    • Frozen model file (.pth for PyTorch, .pb for TensorFlow)
    • Built-in pretrained model name (e.g., DPA-3.2-5M)
    • Checkpoint file (requires freezing first)
  2. Determine the inference task:
    • Single-frame prediction (energy, force, virial)
    • Batch prediction over multiple frames
    • Descriptor evaluation
    • Model deviation calculation
    • CLI-based testing against labeled data
  3. Help the user prepare input arrays in the correct format.
  4. Run inference and report results.

Python API: DeepPot

Load a Model
python
from deepmd.infer import DeepPot

# From a frozen PyTorch model
dp = DeepPot("model.pth")

# From a frozen TensorFlow model
dp = DeepPot("graph.pb")

# From a built-in pretrained model (auto-downloads if not cached)
dp = DeepPot("DPA-3.2-5M")

Built-in pretrained model names include DPA-3.3-1M, DPA-3.2-5M, DPA-3.1-3M, DPA3-Omol-Large, etc. DeePMD-kit will automatically download and cache the model on first use.

Predict Energy, Forces, and Virial
python
import numpy as np
from deepmd.infer import DeepPot

dp = DeepPot("model.pth")

# Prepare inputs
# coord: (nframes, natoms * 3) in Angstrom
# cell: (nframes, 9) cell vectors in Angstrom, row-major
# atype: list of atom type indices (length natoms)

coord = np.array(
    [
        [
            0.0,
            0.0,
            0.0,  # atom 0 (O)
            0.0,
            0.0,
            1.0,  # atom 1 (H)
            0.0,
            1.0,
            0.0,
        ]  # atom 2 (H)
    ]
).reshape([1, -1])

cell = np.diag([10.0, 10.0, 10.0]).reshape([1, -1])

# atype indices correspond to type_map order in the model
# e.g., if type_map = ["O", "H"], then O=0, H=1
atype = [0, 1, 1]

e, f, v = dp.eval(coord, cell, atype)

print(f"Energy (eV): {e}")  # shape: (nframes, 1)
print(f"Forces (eV/A): {f}")  # shape: (nframes, natoms, 3)
print(f"Virial (eV): {v}")  # shape: (nframes, 9)
Non-periodic Systems

For non-periodic (isolated) systems, pass cell=None:

python
e, f, v = dp.eval(coord, None, atype)
Batch Prediction

Process multiple frames at once:

python
nframes = 10
natoms = 3

coords = np.random.rand(nframes, natoms * 3)
cells = np.tile(np.diag([10.0, 10.0, 10.0]).reshape([1, -1]), (nframes, 1))
atype = [0, 1, 1]

e, f, v = dp.eval(coords, cells, atype)
# e: (nframes, 1)
# f: (nframes, natoms, 3)
# v: (nframes, 9)
Evaluate Descriptors

Extract the descriptor (atomic environment representation) from the model:

python
descriptors = dp.eval_descriptor(coord, cell, atype)
# shape: (nframes, natoms, ndesc)

This can also be done via CLI:

bash
dp eval-desc -m model.pth -s /path/to/system -o desc_output
Calculate Model Deviation

Compare predictions from multiple models to estimate uncertainty:

python
from deepmd.infer import calc_model_devi, DeepPot

coord = np.array([[1, 0, 0], [0, 0, 1.5], [1, 0, 3]]).reshape([1, -1])
cell = np.diag(10 * np.ones(3)).reshape([1, -1])
atype = [1, 0, 1]

graphs = [DeepPot("model_0.pth"), DeepPot("model_1.pth")]
model_devi = calc_model_devi(coord, cell, atype, graphs)

Important: avoid loading the same model multiple times in a loop, as this can cause memory leaks.

CLI Testing: dp test

Test a frozen model against labeled data:

bash
# Basic test
dp --pt test -m model.pth -s /path/to/test_system -n 30

# Test with detailed output
dp --pt test -m model.pth -s /path/to/test_system -n 30 -d test_detail
dp test Options
OptionDescription
-m MODELPath to the frozen model file
-s SYSTEMPath to the test data system
-n NUMBNumber of test frames
-d DETAILOutput prefix for detailed results
--shuffle-testShuffle test frames
Output

dp test prints RMSE values for energy, force, and virial:

Energy RMSE        : 1.234e-03 eV
Energy RMSE/Natoms : 6.427e-06 eV
Force  RMSE        : 2.345e-02 eV/A
Virial RMSE        : 5.678e-02 eV
Virial RMSE/Natoms : 2.957e-04 eV

With -d test_detail, per-frame predictions are saved to files for further analysis.

Show full SKILL.md (161 more words)Show less

Complete Example: Train, Freeze, and Inference

python
import subprocess
import numpy as np
from deepmd.infer import DeepPot

# Step 1: Train (run in shell)
# dp --pt train input.json

# Step 2: Freeze (run in shell)
# dp --pt freeze -o model.pth

# Step 3: Python inference
dp = DeepPot("model.pth")

# Load test data from deepmd format
coord = np.load("test_system/set.000/coord.npy")  # (nframes, natoms*3)
cell = np.load("test_system/set.000/box.npy")  # (nframes, 9)
atype_raw = np.loadtxt("test_system/type.raw", dtype=int).tolist()

# Predict
e, f, v = dp.eval(coord, cell, atype_raw)

# Compare with reference
ref_energy = np.load("test_system/set.000/energy.npy")
ref_force = np.load("test_system/set.000/force.npy")

natoms = len(atype_raw)
energy_rmse = np.sqrt(np.mean((e.flatten() - ref_energy.flatten()) ** 2)) / natoms
force_rmse = np.sqrt(np.mean((f.reshape(-1) - ref_force.reshape(-1)) ** 2))

print(f"Energy RMSE/atom: {energy_rmse:.6f} eV")
print(f"Force RMSE:       {force_rmse:.6f} eV/A")

Using Pretrained Models Directly

Built-in pretrained models can be used without any training:

python
from deepmd.infer import DeepPot
import numpy as np

# Auto-downloads DPA-3.2-5M on first use
dp = DeepPot("DPA-3.2-5M")

# Water molecule example
coord = np.array(
    [
        [0.000, 0.000, 0.117],  # O
        [0.000, 0.757, -0.469],  # H
        [0.000, -0.757, -0.469],  # H
    ]
).reshape([1, -1])

cell = np.diag([10.0, 10.0, 10.0]).reshape([1, -1])
atype = [0, 1, 1]  # Check model's type_map for correct indices

e, f, v = dp.eval(coord, cell, atype)
print(f"Energy: {e[0][0]:.6f} eV")
print(f"Forces:\n{f[0]}")

To download pretrained models explicitly:

bash
dp pretrained download DPA-3.3-1M
dp pretrained download DPA-3.2-5M
dp pretrained download DPA-3.1-3M
dp pretrained download DPA-3.2-5M --cache-dir ./models

Input Array Format Reference

ArrayShapeUnitDescription
coord(nframes, natoms*3)AngstromAtomic coordinates, flattened
cell(nframes, 9)AngstromCell vectors, row-major (a1x,a1y,a1z,a2x,...)
atype(natoms,)-Atom type indices matching model's type_map
OutputShapeUnitDescription
e(nframes, 1)eVTotal energy per frame
f(nframes, natoms, 3)eV/AForces on each atom
v(nframes, 9)eVVirial tensor per frame

Agent Checklist

  • Model file exists and is accessible (.pth, .pb, or valid pretrained name)
  • coord array is shaped (nframes, natoms*3) and in Angstrom
  • cell array is shaped (nframes, 9) or None for non-periodic systems
  • atype indices match the model's type_map ordering
  • For model deviation, multiple models are loaded only once (not in a loop)
  • Results are reported with correct units (eV, eV/A)

References

© jinzhezenggroup, LGPL-3.0-or-later. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in machine-learning-potentials/deepmd-python-inference of jinzhezenggroup/computational-chemistry-agent-skills.

Open the folder on GitHubat commit 5c19e75

Compare with similar skills

Deepmd Python Inference next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Deepmd Python Inference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Deepmd Python Inference this skilljinzhezenggroup/computational-chemistry-agent-skills148—~2.3kAutomated safety check: PassLGPL-3.0-or-later
Scikit LearnzLanqing/codex-claude-academic-skills4.6k17 repos~3.9kAutomated safety check: PassBSD-3-Clause
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0
Excel and CSV Data Analysisbytedance/deer-flow83k4 repos~2.2kAutomated safety check: PassMIT
StatsmodelszLanqing/codex-claude-academic-skills4.6k16 repos~4.9kAutomated safety check: PassBSD-3-Clause
Scientific Figure MakingChenLiu-1996/figures4papers8.2k—~557Automated safety check: PassCustom licence

Similar skills

  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 8 days ago
    Data & AnalyticsAuto-check passed
  • Excel and CSV Data Analysis

    bytedance/deer-flow

    Analyzes uploaded Excel and CSV files with SQL through DuckDB, producing schema inspections, statistical summaries and exports to CSV, JSON or Markdown.

    83k GitHub starsUsed in 4 repos~2.2k tokens
    Data & AnalyticsAuto-check passed
  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 16 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • Scientific Figure Making

    ChenLiu-1996/figures4papers

    Covers publication-ready matplotlib figures for academic papers, slides, and reports—bars, trends, scatter, heatmaps, and multi-panel layouts—with this…

    8.2k GitHub stars~557 tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • Diagnose and fix ModuleNotFoundError in Nuitka standalone binaries caused by missing implicit imports.

    15k GitHub stars~519 tokensUpdated today
    Data & AnalyticsAuto-check passed

More from jinzhezenggroup/computational-chemistry-agent-skills

All 62 skills in this repo
  • LAMMPS ReaxFF Setup

    jinzhezenggroup/computational-chemistry-agent-skills

    Prepares and explains LAMMPS input scripts for reactive molecular dynamics with the ReaxFF potential, including charge equilibration and ensemble choice.

    148 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • RDKit Conformer Generator

    jinzhezenggroup/computational-chemistry-agent-skills

    Generates 3D molecular conformers from SMILES strings or files with RDKit, keeps the lowest-energy one per molecule, and falls back to 2D coordinates when embedding fails.

    148 GitHub starsUsed in 1 repo~2.4k tokens
    Auto-check passed
  • RDKit Descriptors and Fingerprints

    jinzhezenggroup/computational-chemistry-agent-skills

    Computes RDKit physicochemical descriptors and molecular fingerprints from SMILES through a uv-run CLI script that skips and logs invalid molecules.

    148 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Unimol

    jinzhezenggroup/computational-chemistry-agent-skills

    A standardized CLI wrapper for Uni-Mol molecular ML workflows that handles representation extraction (embeddings), model training (regression/classification), and property prediction with built-in…

    148 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Quantum ESPRESSO DFT Task Builder

    jinzhezenggroup/computational-chemistry-agent-skills

    Turns a user-supplied atomic structure and DFT settings into a runnable Quantum ESPRESSO input file, stopping short of submitting the job.

    148 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • DP-GEN Simplify Workflow

    jinzhezenggroup/computational-chemistry-agent-skills

    Prepares, validates and runs DP-GEN simplify jobs that thin out repeated or redundant DeepMD datasets, generating param.json and machine.json for local or scheduler runs.

    148 GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Deepmd Python Inference

What does Deepmd Python Inference do?

Run Python inference with DeePMD-kit models using the DeepPot API. Deepmd Python Inference is an agent skill from jinzhezenggroup/computational-chemistry-agent-skills. Run Python inference with DeePMD-kit models using the DeepPot API.

When should I use Deepmd Python Inference?

Deepmd Python Inference fits situations like: the user wants to load a trained/frozen DeePMD model (.pth; A built-in pretrained model (e.g; DPA-3.2-5M) in Python; predict energy/force/virial for atomic configurations.

How do I install Deepmd Python Inference in Claude Code?

Run `npx skills add jinzhezenggroup/computational-chemistry-agent-skills --skill deepmd-python-inference -a claude-code`. Or copy the skill folder (machine-learning-potentials/deepmd-python-inference in jinzhezenggroup/computational-chemistry-agent-skills) into .claude/skills/deepmd-python-inference in your project. Claude Code loads it when a task matches its description.

How do I install Deepmd Python Inference in Codex?

Run `npx skills add jinzhezenggroup/computational-chemistry-agent-skills --skill deepmd-python-inference -a codex`. Or copy the skill folder (machine-learning-potentials/deepmd-python-inference in jinzhezenggroup/computational-chemistry-agent-skills) into .agents/skills/deepmd-python-inference in your project. Codex loads it when a task matches its description.

Can I use Deepmd Python Inference in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jinzhezenggroup/computational-chemistry-agent-skills --skill deepmd-python-inference -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deepmd-python-inference, .gemini/skills/deepmd-python-inference, .github/skills/deepmd-python-inference and .opencode/skills/deepmd-python-inference in your project.

What does Deepmd Python Inference need to run?

SKILL.md names no scripts, command-line tools or credentials: Deepmd Python Inference is instructions for the agent only. Our summary lists: Python 3. Compatibility (from SKILL.md): Requires deepmd-kit Python package installed. PyTorch backend for .pth models, TensorFlow for .pb models..

Does Deepmd Python Inference access the network?

SKILL.md names 2 domains. As links in the text: docs.deepmodeling.com and github.com. This is read from the text; nothing was executed.

Is Deepmd Python Inference safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Deepmd Python Inference use?

Deepmd Python Inference is published under the LGPL-3.0-or-later licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Deepmd Python Inference use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Deepmd Python Inference?

Skills that share tags, products or a category with Deepmd Python Inference: Scikit Learn (zLanqing/codex-claude-academic-skills, 4.6k stars), TimesFM Forecasting (google-research/timesfm, 34k stars), Excel and CSV Data Analysis (bytedance/deer-flow, 83k stars) and Statsmodels (zLanqing/codex-claude-academic-skills, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Deepmd Python Inference?

jinzhezenggroup (a GitHub organization) maintains it in jinzhezenggroup/computational-chemistry-agent-skills, which has 148 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 5, 2026.

Source: jinzhezenggroup/computational-chemistry-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.