DefectTaskDoc

class emmet.core.defect.DefectTaskDoc(**data)

Bases: DefectInfo, TaskDoc

Defect Task Document.

Contains all the task-level information for a defect supercell calculation.

Parameters:
  • nsites (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)

  • 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_pretty (str | None)

  • formula_anonymous (str | None)

  • chemsys (str | None)

  • volume (float | None)

  • density (float | None)

  • density_atomic (float | None)

  • symmetry (SymmetryData | None)

  • batch_id (str | None)

  • calc_type (CalcType | None)

  • completed_at (Annotated[datetime | None, BeforeValidator(func=~emmet.core.utils.convert_datetime, json_schema_input_type=PydanticUndefined)])

  • dir_name (str | None)

  • icsd_id (int | None)

  • input (CalculationInput | None)

  • last_updated (Annotated[datetime, BeforeValidator(func=~emmet.core.utils.convert_datetime, json_schema_input_type=PydanticUndefined)])

  • orig_inputs (CalculationInput | None)

  • output (OutputDoc | None)

  • run_type (RunType | None)

  • structure (Annotated[StructureTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.structure_adapter.pop_empty_structure_keys, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.structure_adapter.<lambda>, return_type=~emmet.core.types.pymatgen_types.structure_adapter.TypedStructureDict, when_used=always)] | None)

  • tags (list[str] | None)

  • task_id (Annotated[MPID | AlphaID, BeforeValidator(func=~emmet.core.types.typing._fault_tolerant_id_serde, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~emmet.core.types.typing.<lambda>, return_type=PydanticUndefined, when_used=always)] | None)

  • task_type (TaskType | CalcType | None)

  • transformations (Annotated[dict[str, Any] | None, BeforeValidator(func=~emmet.core.types.typing._deser_json_like, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.typing._ser_json_like, return_type=PydanticUndefined, when_used=always)])

  • vasp_objects (Annotated[dict[VaspObject, Any] | None, BeforeValidator(func=~emmet.core.types.typing._deser_json_like, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.typing._ser_json_like, return_type=PydanticUndefined, when_used=always)])

  • additional_json (Annotated[dict[str, Any] | None, BeforeValidator(func=~emmet.core.types.typing._deser_json_like, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.typing._ser_json_like, return_type=PydanticUndefined, when_used=always)])

  • analysis (AnalysisDoc | None)

  • author (str | None)

  • calcs_reversed (list[Calculation] | None)

  • custodian (list[CustodianDoc] | None)

  • entry (Annotated[ComputedEntryTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.computed_entries_adapter.entry_deserializer, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.computed_entries_adapter.entry_serializer, return_type=dict[str, Any], when_used=always)] | None)

  • included_objects (list[VaspObject] | None)

  • run_stats (dict[str, RunStatistics] | None)

  • state (TaskState | None)

  • task_label (str | None)

  • defect_name (str)

  • bulk_formula (str)

  • defect (Annotated[DefectTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.defect_adapter.pop_defect_empty_structure_fields, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.defect_adapter.<lambda>, return_type=~emmet.core.types.pymatgen_types.defect_adapter.TypedDefectDict, when_used=always)])

  • charge_state (int | None)

  • supercell_matrix (list[list[int, int, int]] | None)

  • extra_data (Any)

classmethod from_directory(dir_name, volumetric_files=_VOLUMETRIC_FILES, additional_fields=None, volume_change_warning_tol=0.2, defect_info_key='info', **vasp_calculation_kwargs)

Create a task document from a directory containing VASP files.

Return type:

TaskDoc

Parameters:
  • dir_name (Path | str)

  • volumetric_files (tuple[str, ...])

  • additional_fields (dict[str, Any] | None)

  • volume_change_warning_tol (float)

  • defect_info_key (str)

Parameters

dir_name

The path to the folder containing the calculation outputs.

store_additional_json

Whether to store additional json files found in the calculation directory.

volumetric_files

Volumetric files to search for.

additional_fields

Dictionary of additional fields to add to output document.

volume_change_warning_tol

Maximum volume change allowed in VASP relaxations before the calculation is tagged with a warning.

defect_info_key

The key in the additional_json to extract the defect information from

**vasp_calculation_kwargs

Additional parsing options that will be passed to the Calculation.from_vasp_files function.

Returns

TaskDoc

A task document for the calculation.

classmethod from_taskdoc(taskdoc, defect_info_key='info')

Create a DefectTaskDoc from a TaskDoc

Return type:

DefectTaskDoc

Parameters:
  • taskdoc (TaskDoc)

  • defect_info_key (str)

Args:

taskdoc: TaskDoc to convert defect_info_key: The key in the additional_json

to extract the defect information from

Returns:

DefectTaskDoc

model_config: ClassVar[ConfigDict] = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].