Skip to main content

dpdata logo

dpdata

Turn atomistic simulation outputs into interoperable, machine-learning-ready datasets.

DOI:10.1021/acs.jcim.5c01767 conda-forge pip install Documentation Status License

Documentation · Supported formats · Quick start · Try online · Python API · Plugins · Paper

[!IMPORTANT] One data model, many atomistic formats. Load structures, trajectories, energies, forces, and virials from simulation codes, manipulate them through System, LabeledSystem, and MultiSystems, then export the data in the format your next tool expects.

dpdata connects electronic-structure codes, molecular-dynamics engines, and atomistic machine-learning workflows. Use the command line for one-off conversion, or the Python API to build reproducible data-processing pipelines that preserve atomistic structures and labels.

flowchart LR
    A["Electronic structure<br/>VASP · ABACUS · Gaussian · QE · ..."] --> C["dpdata<br/>System · LabeledSystem · MultiSystems"]
    B["Molecular dynamics<br/>LAMMPS · GROMACS"] --> C
    C --> D["Atomistic ML<br/>DeePMD-kit · LMDB datasets"]
    C --> E["Analysis & chemistry<br/>ASE · pymatgen · RDKit · 3Dmol.js"]

⚡ Why dpdata

Advantage What it unlocks
🔄 Format interoperability Read and write formats used by electronic-structure, molecular-dynamics, atomistic-ML, and analysis tools through a common interface.
🏷️ ML-ready labels Keep coordinates, cells, atom types, energies, forces, virials, and registered extra fields together while converting data.
🧩 Heterogeneous datasets Use MultiSystems to organize structures with different compositions and atom counts instead of forcing everything into one system.
💾 Dataset-scale storage Export DeePMD NumPy layouts or a single LMDB database; LMDB can store frames with different compositions and atom counts.
🛠️ Structure operations Select frames, build supercells, perturb structures, replace species, and compose data-processing workflows in Python.
⌨️ CLI and Python Convert a file with one command, then move to the same format registry and data model when a workflow grows more complex.
🔌 Extensible by plugins Add new formats as installable Python packages without modifying dpdata itself.

🚀 Start in minutes

dpdata requires Python 3.10 or later. Install it from PyPI or conda-forge:

python -m pip install dpdata
# or: conda install -c conda-forge dpdata

dpdata --version

Convert a file from the command line

Convert a VASP OUTCAR directly to a DeePMD NumPy dataset:

dpdata OUTCAR -i vasp/outcar -o deepmd/npy -O deepmd_data

See the complete command-line reference for input/output options.

Build a labeled dataset in Python

import dpdata

# OUTCAR is recognized as a labeled VASP trajectory.
data = dpdata.LabeledSystem("OUTCAR")

# Keep selected frames and write a DeePMD NumPy dataset.
data.sub_system([0, -1]).to("deepmd/npy", "deepmd_data")

LabeledSystem keeps atomistic structures together with energies, forces, and virials when they are available. See System and LabeledSystem for loading, data access, frame selection, replication, perturbation, and species replacement.

Combine many systems and scale out

import dpdata

systems = dpdata.MultiSystems.from_dir(
    "./calculations",
    file_name="OUTCAR",
    fmt="vasp/outcar",
)
systems.to("deepmd/lmdb", "training.lmdb")

MultiSystems groups heterogeneous structures by composition, while the deepmd/lmdb format stores frames from one or more systems in a single database. For large DeePMD training sets, this provides a direct path from calculation outputs to the DeePMD data loader. See MultiSystems and LMDB datasets.

🧭 Pick the workflow you need

Goal Start here
Convert one file between supported formats Command-line interface
Load structures or labeled trajectories in Python System and LabeledSystem
Organize many compositions or atom counts MultiSystems
Store heterogeneous DeePMD data in one database DeepMD LMDB format
See every registered input/output format Supported formats
Add support for a new format Plugin guide
Experiment without installing locally Try dpdata online

🧱 Core data model

Object Use it for
System Structures and trajectories: atom types, coordinates, cells, and other non-label fields.
LabeledSystem Reference data for atomistic ML: a System plus energies, forces, virials, and other registered labels.
MultiSystems Collections that contain multiple systems, compositions, or atom counts.

Specialized representations, including bond-order and mixed-type systems, are documented under the Systems guide.

🔬 Scientific ecosystem

dpdata is designed to sit between the tools already used in computational chemistry and materials science. Built-in formats include, among others:

  • Electronic structure and quantum chemistry: VASP, ABACUS, Quantum ESPRESSO, Gaussian, CP2K, ORCA, FHI-aims, SIESTA, OpenMX, and DFTB+.
  • Molecular dynamics: LAMMPS and GROMACS.
  • Atomistic ML and data: DeePMD-kit formats, LMDB datasets, ASE, and pymatgen-compatible structures.
  • Chemistry and visualization: RDKit and 3Dmol.js integrations.
  • Common interchange formats: XYZ and other registered structure or trajectory formats.

The supported-formats table is generated from dpdata's format registry and is the source of truth for available readers and writers.

🧩 Plugins

The format registry can be extended by third-party packages through the dpdata.plugins entry point. The repository includes a minimal plugin_example/ showing the complete pattern.

One ecosystem plugin is cp2kdata, which adds current CP2K support on top of dpdata. See the plugin guide to build and distribute your own integration.

📚 Documentation and community

Citation

If dpdata contributes to published work, please cite:

Jinzhe Zeng, Xingliang Peng, Yong-Bin Zhuang, Haidi Wang, Fengbo Yuan, Duo Zhang, Renxi Liu, Yingze Wang, Ping Tuo, Yuzhi Zhang, Yixiao Chen, Yifan Li, Cao Thang Nguyen, Jiameng Huang, Anyang Peng, Marián Rynik, Wei-Hong Xu, Zezhong Zhang, Xu-Yuan Zhou, Tao Chen, Jiahao Fan, Wanrun Jiang, Bowen Li, Denan Li, Haoxi Li, Wenshuo Liang, Ruihao Liao, Liping Liu, Chenxing Luo, Logan Ward, Kaiwei Wan, Junjie Wang, Pan Xiang, Chengqian Zhang, Jinchao Zhang, Rui Zhou, Jia-Xin Zhu, Linfeng Zhang, and Han Wang. “dpdata: A Scalable Python Toolkit for Atomistic Machine Learning Data Sets.” Journal of Chemical Information and Modeling 65 (21), 11497–11504 (2025). DOI: 10.1021/acs.jcim.5c01767. Citations

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpdata-1.1.0.tar.gz (206.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpdata-1.1.0-py3-none-any.whl (223.6 kB view details)

Uploaded Python 3

File details

Details for the file dpdata-1.1.0.tar.gz.

File metadata

  • Download URL: dpdata-1.1.0.tar.gz
  • Upload date:
  • Size: 206.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dpdata-1.1.0.tar.gz
Algorithm Hash digest
SHA256 27a56ac7425bcd8c911ae0a4830867e1ac3cc9273f9591d8e18ff3c3ff824e7f
MD5 3d791885c0f41fd53a742b44f18016e6
BLAKE2b-256 f3ea78fd98f23a4da5f3c82a3f95374dcabcdedf5edf29f97949e84be63347ed

See more details on using hashes here.

File details

Details for the file dpdata-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: dpdata-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 223.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dpdata-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 955f7ba330f4f9f6849cf7b2e9cc2956f35f2c45b32193087df2a700c7346b37
MD5 7b3929abe8623398da15872fe389e75f
BLAKE2b-256 c12727063de86b30098c2d37f17d462b8b94b981c1acd80f504b2bc7e7c35c6e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.2.25

2 files

0.2.24

2 files

0.2.23

2 files

0.2.22

2 files

0.2.21

2 files

0.2.20

2 files

0.2.19

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

3 files

0.1.0

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page