CrystalArchive

class emmet.archival.atoms.CrystalArchive(**data)

Bases: Archiver

Atomistic data for an ordered structure.

Retains only lattice, atomic positions, and atomic identities. Could be used to represent structures from VASP output, e.g., CHGCAR, where only this data is present.

The fields on this class are flexible enough to store all atomistic info from crystallographic databases.

Parameters:
  • atomic_num (list[int])

  • direct_coords (list[list[float]])

  • lattice (tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]])

  • pbc (tuple[bool, bool, bool])

  • oxi_states (list[float] | None)

to_arrow()

Convert a structure to a pyarrow table.

Return type:

Table

classmethod from_arrow(struct_table, prefix=None)

Create a pymatgen structure from a pyarrow table.

Return type:

Structure

Parameters:
  • struct_table (Table)

  • prefix (str | None)

classmethod from_pmg(structure)

Convert a pymatgen ordered structure to an archive.

Return type:

Self

Parameters:

structure (Structure)

model_config: ClassVar[ConfigDict] = {}

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