PhononBS

class emmet.core.phonon.PhononBS(**data)

Bases: BandStructure

Define schema of pymatgen phonon band structure.

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

  • qpoints (list[tuple[float, float, float]])

  • lattice_rec (Annotated[tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]], BeforeValidator(func=~emmet.core.band_theory._deser_lattice, json_schema_input_type=PydanticUndefined)])

  • labels_dict (dict[str, tuple[float, float, float]])

  • has_nac (bool)

  • bands (list[list[float]])

  • eigendisplacements (Annotated[list[list[list[tuple[complex, complex, complex]]]] | None, BeforeValidator(func=~emmet.core.phonon._deser_eigenmode, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~emmet.core.phonon._ser_eigenmode, return_type=PydanticUndefined, when_used=always)])

classmethod from_pmg(config)

Ensure fields are correctly populated.

Return type:

Any

Parameters:

config (PhononBandStructureSymmLine | dict)

property primitive_structure: Structure | None

Cache primitive structure for use in computing entropy, heat capacity, etc.

property to_pmg: PhononBandStructureSymmLine

Get / cache corresponding pymatgen object.

classmethod from_phonopy(phonon_bandstructure_file)

Create a PhononBS from phonopy .yaml output.

Parameters:

phonon_bandstructure_file (Annotated[str | Path | DirEntry[str] | PathLike[str], PlainSerializer(func=~emmet.core.types.typing.<lambda>, return_type=str, when_used=always)])

model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

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

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Return type:

None

Parameters:
  • self (BaseModel)

  • context (Any)

Args:

self: The BaseModel instance. context: The context.