Cp2kDrone

class atomate2.cp2k.drones.Cp2kDrone(**task_document_kwargs)[source]

Bases: AbstractDrone

A CP2K drone to parse CP2K outputs.

Parameters:

**task_document_kwargs – Additional keyword args passed to TaskDocument.from_directory.

assimilate(path=None)[source]

Parse CP2K output files and return the output document.

Parameters:

path (str or Path or None) – Path to the directory containing CP2K outputs

Returns:

A CP2K task document.

Return type:

TaskDocument

get_valid_paths(path)[source]

Get valid paths to assimilate.

There are some restrictions on the valid directory structures:

  1. There can be only one cp2k.out in each directory. Nested directories are ok.

  2. Directories designated “relax1”…”relax9” are considered to be parts of a multiple-optimization run.

  3. Directories containing VASP output with “.relax1”…”.relax9” are also considered as parts of a multiple-optimization run.

Parameters:

path (tuple of (str, list of str, list of str)) – Input path as a tuple generated from os.walk, i.e., (parent, subdirs, files).

Returns:

A list of paths to assimilate.

Return type:

list of str