qe/cp/traj format#

Aliases#

qe/cp/traj

Implementation: QECPTrajFormat

Overview#

Quantum ESPRESSO CP trajectory files sharing a common prefix.

Quantum ESPRESSO is an integrated suite of open-source codes for electronic-structure calculations based on DFT, plane waves, and pseudopotentials.

Given file_name='run', dpdata reads run.in together with the CP trajectory files rooted at run. Loading as a labeled system also reads the matching energy and force records.

Quick examples#

The examples use the preferred alias qe/cp/traj; any alias listed above is equivalent.

import dpdata

# Geometry-only data
system = dpdata.System("trajectory_prefix", fmt="qe/cp/traj")

# Data with energies and forces
labeled_system = dpdata.LabeledSystem("trajectory_prefix", fmt="qe/cp/traj")

Conversions#

Convert from this format to System#

dpdata.System(file_name, begin=0, step=1, fmt: Literal['qe/cp/traj'] = None, **kwargs) → dpdata.system.System
dpdata.System.from_qe_cp_traj(file_name, begin=0, step=1, **kwargs) → dpdata.system.System

Load coordinates and cells from a Quantum ESPRESSO CP trajectory.

Parameters:
file_namestr

Common prefix of the CP input and trajectory files.

beginint, default=0

Index of the first frame to load.

stepint, default=1

Load every step-th frame.

**kwargsdict

Additional format arguments accepted for API compatibility.

Returns:
System

converted system

Convert from this format to LabeledSystem#

dpdata.LabeledSystem(file_name, begin=0, step=1, fmt: Literal['qe/cp/traj'] = None, **kwargs) → dpdata.system.LabeledSystem
dpdata.LabeledSystem.from_qe_cp_traj(file_name, begin=0, step=1, **kwargs) → dpdata.system.LabeledSystem

Load a labeled Quantum ESPRESSO CP trajectory.

Parameters:
file_namestr

Common prefix of the CP input, trajectory, energy, and force files.

beginint, default=0

Index of the first frame to load.

stepint, default=1

Load every step-th frame.

**kwargsdict

Additional format arguments accepted for API compatibility.

Returns:
LabeledSystem

converted system