Supported Formats#

dpdata uses format aliases such as vasp/outcar or deepmd/npy to select a reader or writer. Several aliases may point to the same implementation; each reference page lists all equivalent names, supported data models, conversion parameters, and copyable examples.

Choosing a data model#

Use dpdata.System for cells, coordinates, and atom types. Use dpdata.LabeledSystem when the input also contains energies, forces, virials, or other labels. dpdata.MultiSystems groups systems with different formulas, while dpdata.BondOrderSystem preserves molecular bonds and formal charges.

The supported-conversions column below is authoritative: a format may be read-only, write-only, or support only one data model.

Common conversion patterns#

Load a file explicitly and convert it to another format:

import dpdata

labeled = dpdata.LabeledSystem("OUTCAR", fmt="vasp/outcar")
labeled.to("deepmd/npy", "training_data")

Pass format-specific parameters to the constructor or to():

system = dpdata.System(
    "dump.lammpstrj",
    fmt="lammps/dump",
    type_map=["O", "H"],
    begin=100,
    step=10,
    unwrap=True,
)
system.to("vasp/poscar", "POSCAR", frame_idx=-1)

For files or directories containing multiple formulas, use dpdata.MultiSystems.from_file():

systems = dpdata.MultiSystems.from_file("dataset.xyz", fmt="extxyz")
systems.to("deepmd/hdf5", "dataset.hdf5")

The command-line interface supports the same basic conversion flow:

dpdata OUTCAR -i vasp/outcar -o deepmd/npy -O training_data
dpdata POSCAR -i vasp/poscar -n -o lammps/lmp -O data.lmp

Format reference#

Supported Formats#

Format

Description

Alias

Supported Conversions

3dmol format

Interactive py3Dmol visualization for one System frame.

3dmol

System.to() LabeledSystem.to()

abacus/md format

ABACUS molecular-dynamics calculation directory.

abacus/lcao/md abacus/md abacus/pw/md

LabeledSystem()

abacus/relax format

ABACUS ionic- or cell-relaxation calculation directory.

abacus/lcao/relax abacus/pw/relax abacus/relax

LabeledSystem()

abacus/scf format

ABACUS self-consistent-field calculation directory.

abacus/lcao/scf abacus/pw/scf abacus/scf

LabeledSystem()

abacus/stru format

ABACUS structure file.

abacus/stru stru

System() System.to() LabeledSystem.to()

amber/md format

AMBER molecular-dynamics trajectory and label files.

amber/md

System() LabeledSystem()

ase/structure format

In-memory Atomic Simulation Environment (ASE) Atoms objects.

ase/structure

System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file()

ase/traj format

ASE binary trajectory (.traj) file.

ase/traj

System() System.to() LabeledSystem.to() LabeledSystem()

cp2k/aimd_output format

CP2K AIMD calculation directory.

cp2k/aimd_output

LabeledSystem()

cp2k/output format

Single CP2K output file containing coordinates and calculation labels.

cp2k/output

LabeledSystem()

deepmd/hdf5 format

HDF5 format for DeePMD-kit.

deepmd/hdf5

System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to()

deepmd/hdf5/mixed format

Mixed type HDF5 format for DeePMD-kit.

deepmd/hdf5/mixed

System.to() LabeledSystem.to() MultiSystems.load_systems_from_file() MultiSystems.to()

deepmd/lmdb format

DeePMD-kit compatible LMDB format.

deepmd/lmdb lmdb

System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to()

deepmd/npy format

DeePMD-kit NumPy dataset directory.

deepmd/comp deepmd/npy

System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to()

deepmd/npy/mixed format

Mixed-type NumPy dataset for DeePMD-kit.

deepmd/npy/mixed

System.to() LabeledSystem.to() MultiSystems.load_systems_from_file() MultiSystems.to()

deepmd/raw format

DeePMD-kit raw text dataset directory.

deepmd deepmd/raw

System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to()

dftbplus format

DFTB+ input/output pair for one labeled molecular configuration.

dftbplus

LabeledSystem()

extxyz format

Extended XYZ used by QUIP/GAP and atomistic ML tools.

extxyz gpumd/xyz mace/xyz nequip/xyz quip/gap/xyz quip/gap/xyz_file

LabeledSystem() LabeledSystem.to() MultiSystems.load_systems_from_file() MultiSystems.to()

fhi_aims/md format

FHI-aims molecular-dynamics or multi-step output.

fhi_aims/md fhi_aims/output

LabeledSystem()

fhi_aims/scf format

FHI-aims single-point self-consistent-field output.

fhi_aims/scf

LabeledSystem()

gaussian/fchk format

Gaussian formatted checkpoint (.fchk) file.

gaussian/fchk

LabeledSystem()

gaussian/gjf format

Gaussian input (.gjf/.com) file.

gaussian/gjf

System() System.to() LabeledSystem.to()

gaussian/log format

Gaussian text output containing energies, coordinates, and forces.

gaussian/log

LabeledSystem()

gaussian/md format

Gaussian molecular-dynamics text output.

gaussian/md

LabeledSystem()

gromacs/gro format

GROMACS .gro structure or trajectory file.

gro gromacs/gro

System() System.to() LabeledSystem.to()

lammps/dump format

LAMMPS text dump trajectory.

dump lammps/dump

System() System.to() LabeledSystem.to()

lammps/lmp format

LAMMPS data file describing one simulation snapshot.

lammps/lmp lmp

System() System.to() LabeledSystem.to()

list format

In-memory list of one-frame System objects.

list

System.to() LabeledSystem.to()

mol format

MDL Molfile containing one molecular graph and its conformers.

mol mol_file

BondOrderSystem() BondOrderSystem.to()

n2p2 format

n2p2 input.data neural-network training dataset.

n2p2

LabeledSystem() LabeledSystem.to()

openmx/md format

Output pair from OpenMX.

openmx/md

System() LabeledSystem()

orca/spout format

ORCA single-point energy and gradient output.

orca/spout

LabeledSystem()

psi4/inp format

Psi4 input file for a single molecular configuration.

psi4/inp

System.to() LabeledSystem.to()

psi4/out format

Psi4 energy and gradient output.

psi4/out

LabeledSystem()

pwmat/atom.config format

PWmat atom.config or final.config structure file.

atom.config final.config pwmat/atom.config pwmat/final.config

System() System.to() LabeledSystem.to()

pwmat/output format

PWmat MOVEMENT/OUT.MLMD labeled trajectory.

mlmd movement pwmat/mlmd pwmat/movement pwmat/output

LabeledSystem()

pymatgen/computedstructureentry format

In-memory pymatgen ComputedStructureEntry objects.

pymatgen/computedstructureentry

LabeledSystem.to()

pymatgen/molecule format

In-memory pymatgen Molecule objects for nonperiodic systems.

pymatgen/molecule

System() System.to() LabeledSystem.to()

pymatgen/structure format

In-memory pymatgen Structure objects for periodic systems.

pymatgen/structure

System() System.to() LabeledSystem.to()

qe/cp/traj format

Quantum ESPRESSO CP trajectory files sharing a common prefix.

qe/cp/traj

System() LabeledSystem()

qe/pw/scf format

Quantum ESPRESSO PWscf self-consistent-field output.

qe/pw/scf

LabeledSystem()

sdf format

Structure-data file (SDF) containing one or more conformers.

sdf sdf_file

BondOrderSystem() BondOrderSystem.to()

siesta/aimd_output format

SIESTA ab initio molecular-dynamics output.

siesta/aimd_output

System() LabeledSystem()

siesta/output format

SIESTA single-step text output.

siesta/output

System() LabeledSystem()

sqm/in format

AmberTools SQM input for semiempirical calculations.

sqm/in

System.to() LabeledSystem.to()

sqm/out format

AmberTools SQM output from a semiempirical calculation.

sqm/out

System() LabeledSystem()

vasp/outcar format

VASP OUTCAR labeled trajectory.

outcar vasp/outcar

LabeledSystem() MultiSystems.load_systems_from_file()

vasp/poscar format

VASP POSCAR or CONTCAR structure file.

contcar poscar vasp/contcar vasp/poscar

System() System.to() LabeledSystem.to()

vasp/string format

In-memory VASP POSCAR text representation.

vasp/string

System.to() LabeledSystem.to()

vasp/xml format

VASP vasprun.xml labeled trajectory.

vasp/xml xml

LabeledSystem()

xyz format

Plain XYZ molecular structure file.

xyz

System() System.to() LabeledSystem.to()