ProvenanceDoc

class emmet.core.provenance.ProvenanceDoc(**data)

Bases: PropertyDoc

A provenance property block

Parameters:
  • builder_meta (EmmetMeta | None)

  • 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)

  • material_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)

  • deprecated (bool)

  • deprecation_reasons (list[DeprecationMessage | str] | None)

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

  • origins (list[PropertyOrigin] | None)

  • warnings (list[str])

  • structure (Annotated[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, SkipJsonSchema()])

  • property_name (str)

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

  • references (list[str])

  • authors (Annotated[list[Author], BeforeValidator(func=~emmet.core.provenance._remove_dupe_authors, json_schema_input_type=PydanticUndefined)])

  • remarks (list[str] | None)

  • tags (list[str] | None)

  • theoretical (bool)

  • database_IDs (dict[Database, list[str]] | None)

  • history (Annotated[list[History] | None, BeforeValidator(func=~emmet.core.provenance._migrate_legacy_history_data, json_schema_input_type=PydanticUndefined)])

classmethod from_SNLs(structure, snls, material_id=None, **kwargs)

Converts legacy Pymatgen SNLs into a single provenance document

Return type:

ProvenanceDoc

Parameters:
  • structure (Structure)

  • snls (list[SNLDict])

  • material_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)

classmethod migrate_legacy_data(config)

Migrate legacy provenance data with free-form JSON values to schematized.

Return type:

Self

Parameters:

config (dict[str, Any])

model_config: ClassVar[ConfigDict] = {}

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