TaskDocument¶
- class atomate2.cp2k.schemas.task.TaskDocument(*, charge=None, spin_multiplicity=None, natoms=None, elements=None, nelements=None, nelectrons=None, composition=None, composition_reduced=None, formula_alphabetical=None, formula_pretty=None, formula_anonymous=None, chemsys=None, symmetry=None, species_hash=None, coord_hash=None, nsites=None, volume=None, density=None, density_atomic=None, dir_name=None, last_updated=<factory>, completed_at=None, input=None, output=None, structure=None, state=None, included_objects=None, cp2k_objects=None, entry=None, analysis=None, run_stats=None, orig_inputs=None, task_label=None, tags=None, author=None, icsd_id=None, calcs_reversed=None, transformations=None, custodian=None, additional_json=None, schema='0.0.1')[source]¶
Bases:
StructureMetadata,MoleculeMetadataDefinition of CP2K task document.
- Parameters:
charge (int | None)
spin_multiplicity (int | None)
natoms (int | None)
elements (list[Annotated[ElementTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.element_adapter.<lambda>, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.element_adapter.<lambda>, return_type=str, when_used=always)]] | None)
nelements (int | None)
nelectrons (int | None)
composition (Annotated[CompositionTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.composition_adapter.<lambda>, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.composition_adapter.<lambda>, return_type=dict[str, float], when_used=always)] | None)
composition_reduced (Annotated[CompositionTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.composition_adapter.<lambda>, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.composition_adapter.<lambda>, return_type=dict[str, float], when_used=always)] | None)
formula_alphabetical (str | None)
formula_pretty (str | None)
formula_anonymous (str | None)
chemsys (str | None)
symmetry (SymmetryData | None)
species_hash (str | None)
coord_hash (str | None)
nsites (int | None)
volume (float | None)
density (float | None)
density_atomic (float | None)
dir_name (str | None)
last_updated (str)
completed_at (str | None)
input (InputSummary | None)
output (OutputSummary | None)
structure (Structure | Molecule)
state (Status | None)
included_objects (list[Cp2kObject] | None)
cp2k_objects (dict[Cp2kObject, Any] | None)
entry (ComputedEntry | None)
analysis (AnalysisSummary | None)
run_stats (dict[str, RunStatistics] | None)
task_label (str | None)
author (str | None)
icsd_id (str | None)
calcs_reversed (list[Calculation] | None)
custodian (Any)
schema (str)
- classmethod from_directory(dir_name, volumetric_files=_VOLUMETRIC_FILES, store_additional_json=SETTINGS.CP2K_STORE_ADDITIONAL_JSON, additional_fields=None, **cp2k_calculation_kwargs)[source]¶
Create a task document from a directory containing CP2K files.
- Parameters:
dir_name (Path | str) – The path to the folder containing the calculation outputs.
store_additional_json (bool) – Whether to store additional JSON files found in the calculation directory.
volumetric_files (tuple[str, ...]) – Volumetric files to search for.
additional_fields (dict[str, Any]) – dictionary of additional fields to add to output document.
**cp2k_calculation_kwargs – Additional parsing options that will be passed to the
Calculation.from_cp2k_filesfunction.
- Returns:
A task document for the calculation.
- Return type:
Cp2kTaskDoc
- static get_entry(calc_docs, job_id=None)[source]¶
Get a computed entry from a list of CP2K calculation documents.
- Parameters:
calc_docs (list[Calculation]) – A list of CP2K calculation documents.
job_id (str | None) – The job identifier.
- Returns:
A computed entry.
- Return type:
ComputedEntry
- model_config = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].