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

dpdata

Convert between computational chemistry data formats using dpdata. Handles VASP, QE, CP2K, Gaussian, LAMMPS, and DeePMD formats. Essential for preparing ML potential training data.

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

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

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

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

dpdata — Format Conversion

When to Use

  • User needs to convert DFT calculation outputs to DeePMD training format
  • User wants to convert between VASP, QE, CP2K, Gaussian, LAMMPS formats
  • User needs to merge, filter, or split trajectory data
  • User is preparing training data for machine learning potentials

Prerequisites

  1. dpdata installed (pip install dpdata, or python -c "import dpdata")

Supported Formats

FormatReadWriteKey
VASP OUTCARYes-vasp/outcar
VASP POSCAR/CONTCARYesYesvasp/poscar
VASP XMLYes-vasp/xml
QE pw.x outputYes-qe/pw/scf
CP2K outputYes-cp2k/output
Gaussian logYes-gaussian/log
LAMMPS dumpYesYeslammps/dump
LAMMPS dataYesYeslammps/lmp
DeePMD rawYesYesdeepmd/raw
DeePMD npyYesYesdeepmd/npy
ExtXYZYesYesextxyz

Workflow Steps

1. Convert VASP OUTCAR to DeePMD

catgo_workflow_engine(action="add_task", params={
  "workflow_id": "wf_xxx",
  "task_type": "shell",
  "name": "convert_data",
  "command": "python convert.py",
  "input_files": {
    "convert.py": "import dpdata\nd = dpdata.LabeledSystem('OUTCAR', fmt='vasp/outcar')\nd.to('deepmd/npy', 'training_data')"
  },
  "system_name": "data_prep"
})

Common Conversion Scripts

VASP to DeePMD (with train/valid split)

import dpdata
import numpy as np

# Load all frames from OUTCAR
d = dpdata.LabeledSystem("OUTCAR", fmt="vasp/outcar")
print(f"Loaded {len(d)} frames")

# Random split: 90% train, 10% valid
indices = np.random.permutation(len(d))
n_train = int(0.9 * len(d))

d_train = d.sub_system(indices[:n_train])
d_valid = d.sub_system(indices[n_train:])

d_train.to("deepmd/npy", "data/train")
d_valid.to("deepmd/npy", "data/valid")
print(f"Train: {len(d_train)}, Valid: {len(d_valid)}")

Multiple OUTCARs to single dataset

import dpdata
from pathlib import Path

d = None
for outcar in Path(".").rglob("OUTCAR"):
    sys = dpdata.LabeledSystem(str(outcar), fmt="vasp/outcar")
    d = sys if d is None else d + sys

print(f"Total frames: {len(d)}")
d.to("deepmd/npy", "merged_data")

QE to DeePMD

import dpdata
d = dpdata.LabeledSystem("relax.out", fmt="qe/pw/scf")
d.to("deepmd/npy", "training_data")

LAMMPS dump to ExtXYZ

import dpdata
d = dpdata.System("dump.lammpstrj", fmt="lammps/dump",
                  type_map=["Ti", "O"])
d.to("extxyz", "trajectory.xyz")

Filter by energy/force

import dpdata
import numpy as np

d = dpdata.LabeledSystem("OUTCAR", fmt="vasp/outcar")

# Remove frames with max force > 10 eV/Ang (likely unconverged)
mask = []
for i in range(len(d)):
    max_f = np.max(np.abs(d["forces"][i]))
    mask.append(max_f < 10.0)

d_clean = d.sub_system(np.where(mask)[0])
print(f"Kept {len(d_clean)}/{len(d)} frames")

CLI Usage

# Quick convert
dpdata convert OUTCAR vasp/outcar deepmd/npy training_data

# System info
dpdata info OUTCAR vasp/outcar

Parameter Guidance

ParameterNotes
fmtFormat string — must match exactly (case-sensitive)
type_mapRequired for LAMMPS formats — maps type indices to element symbols
begin / end / stepFrame selection for large trajectories

Common Pitfalls

  1. Missing type_map for LAMMPS — LAMMPS dump files have numeric types, not element names. Always provide type_map.
  2. Unconverged frames — VASP OUTCARs may contain unconverged ionic steps. Filter by force magnitude before training.
  3. Mixed element order — when merging data from different calculations, ensure consistent element ordering.
  4. Large memory for big trajectories — dpdata loads all frames into memory. For >10K frames, process in chunks.
  5. Units — dpdata converts to eV/Angstrom internally. LAMMPS real units are auto-converted.

レビュー

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

コメント

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

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

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。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 のスキルをすべて見る

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