aiida_cp2k.calculations package

Module contents

AiiDA-CP2K input plugin.

class aiida_cp2k.calculations.Cp2kCalculation(*args, **kwargs)[source]

Bases: CalcJob

This is a Cp2kCalculation, subclass of JobCalculation, to prepare input for an ab-initio CP2K calculation.

For information on CP2K, refer to: https://www.cp2k.org.

_DEFAULT_COORDS_FILE_NAME = 'aiida.coords.xyz'
_DEFAULT_INPUT_FILE = 'aiida.inp'
_DEFAULT_OUTPUT_FILE = 'aiida.out'
_DEFAULT_PARENT_CALC_FLDR_NAME = 'parent_calc/'
_DEFAULT_PARSER = 'cp2k_base_parser'
_DEFAULT_PROJECT_NAME = 'aiida'
_DEFAULT_RESTART_FILE_NAME = 'aiida-1.restart'
_DEFAULT_TRAJECT_FILE_NAME = 'aiida-pos-1.dcd'
__abstractmethods__ = frozenset({})
__module__ = 'aiida_cp2k.calculations'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 54
_abc_registry = <_weakrefset.WeakSet object>
static _write_structure(structure, folder, name)[source]

Function that writes a structure and takes care of element tags.

classmethod define(spec)[source]

Define the process specification, including its inputs, outputs and known exit codes.

Parameters

spec – the calculation job process spec to define.

prepare_for_submission(folder)[source]

Create the input files from the input nodes passed to this instance of the CalcJob.

Parameters

folder – an aiida.common.folders.Folder to temporarily write files on disk

Returns

aiida.common.datastructures.CalcInfo instance

aiida_cp2k.calculations._atoms_to_xyz(atoms)[source]

Converts ASE atoms to string, taking care of element tags.

Parameters

atoms – ASE Atoms instance

Returns

str (in xyz format)

aiida_cp2k.calculations.kind_names(atoms)[source]

Get atom kind names from ASE atoms based on tags.

Simply append the tag to element symbol. E.g., ‘H’ with tag 1 becomes ‘H1’. Note: This mirrors the behavior of StructureData.get_kind_names()

Parameters

atoms – ASE atoms instance

Returns

list of kind names