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#
Format | Description | Alias | Supported Conversions |
|---|---|---|---|
Interactive py3Dmol visualization for one System frame. |
| ||
ABACUS molecular-dynamics calculation directory. |
| ||
ABACUS ionic- or cell-relaxation calculation directory. |
| ||
ABACUS self-consistent-field calculation directory. |
| ||
ABACUS structure file. |
| ||
AMBER molecular-dynamics trajectory and label files. |
| ||
In-memory Atomic Simulation Environment (ASE) |
| System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() | |
ASE binary trajectory ( |
| ||
CP2K AIMD calculation directory. |
| ||
Single CP2K output file containing coordinates and calculation labels. |
| ||
HDF5 format for DeePMD-kit. |
| System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to() | |
Mixed type HDF5 format for DeePMD-kit. |
| System.to() LabeledSystem.to() MultiSystems.load_systems_from_file() MultiSystems.to() | |
DeePMD-kit compatible LMDB format. |
| System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to() | |
DeePMD-kit NumPy dataset directory. |
| System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to() | |
Mixed-type NumPy dataset for DeePMD-kit. |
| System.to() LabeledSystem.to() MultiSystems.load_systems_from_file() MultiSystems.to() | |
DeePMD-kit raw text dataset directory. |
| System() System.to() LabeledSystem.to() LabeledSystem() MultiSystems.load_systems_from_file() MultiSystems.to() | |
DFTB+ input/output pair for one labeled molecular configuration. |
| ||
Extended XYZ used by QUIP/GAP and atomistic ML tools. |
| LabeledSystem() LabeledSystem.to() MultiSystems.load_systems_from_file() MultiSystems.to() | |
FHI-aims molecular-dynamics or multi-step output. |
| ||
FHI-aims single-point self-consistent-field output. |
| ||
Gaussian formatted checkpoint ( |
| ||
Gaussian input ( |
| ||
Gaussian text output containing energies, coordinates, and forces. |
| ||
Gaussian molecular-dynamics text output. |
| ||
GROMACS |
| ||
LAMMPS text dump trajectory. |
| ||
LAMMPS data file describing one simulation snapshot. |
| ||
In-memory list of one-frame System objects. |
| ||
MDL Molfile containing one molecular graph and its conformers. |
| ||
n2p2 |
| ||
Output pair from OpenMX. |
| ||
ORCA single-point energy and gradient output. |
| ||
Psi4 input file for a single molecular configuration. |
| ||
Psi4 energy and gradient output. |
| ||
PWmat |
| ||
PWmat |
| ||
In-memory pymatgen |
| ||
In-memory pymatgen |
| ||
In-memory pymatgen |
| ||
Quantum ESPRESSO CP trajectory files sharing a common prefix. |
| ||
Quantum ESPRESSO PWscf self-consistent-field output. |
| ||
Structure-data file (SDF) containing one or more conformers. |
| ||
SIESTA ab initio molecular-dynamics output. |
| ||
SIESTA single-step text output. |
| ||
AmberTools SQM input for semiempirical calculations. |
| ||
AmberTools SQM output from a semiempirical calculation. |
| ||
VASP |
| ||
VASP POSCAR or CONTCAR structure file. |
| ||
In-memory VASP POSCAR text representation. |
| ||
VASP |
| ||
Plain XYZ molecular structure file. |
|
- ase/structure format
- ase/traj format
- abacus/md format
- abacus/relax format
- abacus/scf format
- abacus/stru format
- amber/md format
- cp2k/aimd_output format
- cp2k/output format
- dftbplus format
- deepmd/npy format
- deepmd/hdf5 format
- deepmd/hdf5/mixed format
- deepmd/npy/mixed format
- deepmd/raw format
- fhi_aims/md format
- fhi_aims/scf format
- gaussian/gjf format
- gaussian/fchk format
- gaussian/log format
- gaussian/md format
- gromacs/gro format
- lammps/dump format
- lammps/lmp format
- deepmd/lmdb format
- list format
- mol format
- n2p2 format
- openmx/md format
- orca/spout format
- psi4/inp format
- psi4/out format
- pwmat/atom.config format
- pwmat/output format
- 3dmol format
- pymatgen/computedstructureentry format
- pymatgen/molecule format
- pymatgen/structure format
- qe/pw/scf format
- qe/cp/traj format
- extxyz format
- sqm/in format
- sqm/out format
- sdf format
- siesta/aimd_output format
- siesta/output format
- vasp/outcar format
- vasp/poscar format
- vasp/string format
- vasp/xml format
- xyz format