RelaxTrajectory
- class emmet.core.trajectory.RelaxTrajectory(**data)
Bases:
AtomRelaxTrajectoryLow memory schema for relaxation trajectories that can interface with parquet, pymatgen, and ASE.
This schema is intended primarily for VASP relaxation trajectories, but could be adapted to generic electronic structure trajectories.
Note that for VASP calculations, energies are in eV, forces in eV/Å, and stress tensors in kilobar.
- Parameters:
elements (list[int])
cart_coords (list[list[tuple[float, float, float]] | None])
num_ionic_steps (int)
lattice (list[tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]]] | None)
energy (list[float] | None)
forces (list[list[tuple[float, float, float]]] | None)
stress (list[tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]]] | None)
ionic_step_properties (set[str])
electronic_steps (list[list[ElectronicStep]] | None)
num_electronic_steps (list[int] | None)
e_wo_entrp (list[float] | None)
e_fr_energy (list[float] | None)
identifier (str | None)
task_type (TaskType | None)
run_type (RunType | None)
- property has_full_output: bool
Return true if a trajectory has all structures and SCF convergence info available.
- property convergence_data: dict[str, list[float] | None]
Get convergence of energy and interatomic forces.
If possible, energy convergence is taken at every electronic step. If not, it is taken at each ionic step (the final electronic step).
Forces are taken at each ionic step.
- classmethod from_vasprun(vasprun, store_electronic_steps=True, **kwargs)
Create a Trajectory from a VASP vasprun.xml.
- Return type:
Self- Parameters:
vasprun (Vasprun)
store_electronic_steps (bool)
Parameters
vasprun : pymatgen Vasprun object store_electronic_steps : bool = True (default)
Whether to store the electronic step information
**kwargs : kwargs to pass to _from_dict / the document model
- to_arrow(file_name=None, store_conv_data=True, **write_file_kwargs)
Create a PyArrow Table from a Trajectory.
- Return type:
Table- Parameters:
file_name (str | Path | None)
store_conv_data (bool)
Parameters
- file_namestr, .Path, or None (default)
If not None, a file to write the parquet-format output to. Accepts any compression extension used by pyarrow.write_table
- store_conv_databool = True (default)
Whether to store the data in Trajectory.convergence_data. Defaults to True to ensure that MP website convergence data is stored and easily accesible via parquet.
- **write_file_kwargs
If file_name is not None, any kwargs to pass to pyarrow.parquet.write_file
Returns
pyarrow.Table
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].