Calculation

pydantic model atomate2.cp2k.schemas.calculation.Calculation[source]

Full CP2K calculation inputs and outputs.

field dir_name: str = None

The directory for this CP2K calculation

field cp2k_version: str = None

CP2K version used to perform the calculation

field has_cp2k_completed: Status = None

Whether CP2K completed the calculation successfully

field input: CalculationInput = None

CP2K input settings for the calculation

field output: CalculationOutput = None

The CP2K calculation output

field completed_at: str = None

Timestamp for when the calculation was completed

field task_name: str = None

Name of task given by custodian (e.g., relax1, relax2)

field output_file_paths: dict[str, str] = None

Paths (relative to dir_name) of the CP2K output files associated with this calculation

field bader: dict | None = None

Output from the bader software

field run_type: RunType = None

Calculation run type (e.g., HF, HSE06, PBE)

field task_type: TaskType = None

Calculation task type (e.g., Structure Optimization).

field calc_type: CalcType = None

Return calculation type (run type + task_type).

classmethod from_cp2k_files(dir_name, task_name, cp2k_output_file='cp2k.out', volumetric_files=None, parse_dos=False, parse_bandstructure=False, average_v_hartree=True, run_bader=SETTINGS.CP2K_RUN_BADER and _BADER_EXE_EXISTS, strip_bandstructure_projections=False, strip_dos_projections=False, store_trajectory=False, store_scf=False, store_volumetric_data=SETTINGS.CP2K_STORE_VOLUMETRIC_DATA)[source]

Create a CP2K calculation document from a directory and file paths.

Parameters:
  • dir_name (Path | str) – The directory containing the calculation outputs.

  • task_name (str) – The task name.

  • cp2k_output_file (Path | str) – Path to the main output of cp2k job, relative to dir_name.

  • volumetric_files (list[str] | None) – Path to volumetric (Cube) files, relative to dir_name.

  • parse_dos (str | bool) –

    Whether to parse the DOS. Can be:

    • ”auto”: Only parse DOS if there are no ionic steps.

    • True: Always parse DOS.

    • False: Never parse DOS.

  • parse_bandstructure (str | bool) –

    How to parse the bandstructure. Can be:

    • ”auto”: Parse the bandstructure with projections for NSCF calculations and decide automatically if it’s line or uniform mode.

    • ”line”: Parse the bandstructure as a line mode calculation with projections

    • True: Parse the bandstructure as a uniform calculation with projections .

    • False: Parse the band structure without projects and just store vbm, cbm, band_gap, is_metal and efermi rather than the full band structure object.

  • average_v_hartree (bool = True) – Whether to store the average of the V_HARTREE along the crystal axes.

  • run_bader (bool = False) – Whether to run bader on the charge density.

  • strip_dos_projections (bool) – Whether to strip the element and site projections from the density of states. This can help reduce the size of DOS objects in systems with many atoms.

  • strip_bandstructure_projections (bool) – Whether to strip the element and site projections from the band structure. This can help reduce the size of DOS objects in systems with many atoms.

  • store_trajectory (bool = False) – Whether to store the ionic steps as a pmg trajectory object, which can be pushed, to a bson data store, instead of as a list od dicts. Useful for large trajectories.

  • store_scf (bool = False) – Whether to store the SCF convergence data.

  • store_volumetric_data (tuple[str] | None = SETTINGS.CP2K_STORE_VOLUMETRIC_DATA) – Which volumetric files to store.

Returns:

A CP2K calculation document.

Return type:

Calculation