cp2k/output format#

Aliases#

cp2k/output

Implementation: CP2KOutputFormat

Overview#

Single CP2K output file containing coordinates and calculation labels.

CP2K is a quantum chemistry and solid state physics software package. This legacy reader targets standard CP2K text output. For newer or unsupported CP2K layouts, use the separately maintained cp2kdata plugin referenced by the warning raised on parse failure.

Quick examples#

The examples use the preferred alias cp2k/output; any alias listed above is equivalent.

import dpdata

# Data with energies and forces
labeled_system = dpdata.LabeledSystem("input_file", fmt="cp2k/output")

Conversions#

Convert from this format to LabeledSystem#

dpdata.LabeledSystem(file_name, restart=False, fmt: Literal['cp2k/output'] = None, **kwargs) → dpdata.system.LabeledSystem
dpdata.LabeledSystem.from_cp2k_output(file_name, restart=False, **kwargs) → dpdata.system.LabeledSystem

Load frames from a CP2K text output.

Parameters:
file_namestr or os.PathLike

CP2K output file.

restartbool, default=False

Reserved for compatibility with the AIMD reader.

**kwargsdict

Additional format arguments accepted for API compatibility.

Returns:
LabeledSystem

converted system