httk.atomistic.models.trajectory.plain¶
Map OPTIMADE trajectory properties to a backend.
Classes¶
Represent a mapping whose structure properties have a frame axis. |
Module Contents¶
- class httk.atomistic.models.trajectory.plain.PlainTrajectory(obj, **hints)[source]¶
Bases:
httk.atomistic.models.trajectory.backend.TrajectoryBackendRepresent a mapping whose structure properties have a frame axis.
A compact constant property is represented by a one-element leading axis, e.g.
nelements=[2]for any number of frames. Only properties declaringconstanton that axis accept this compact form.- Parameters:
obj (collections.abc.Mapping[str, Any]) – A trajectory property mapping.
**hints (Any) – Backend-selection hints.
- frame(i)[source]¶
Return one frame from the property mapping.
- Parameters:
i (int) – Frame index; negative indexes count from the end.
- Returns:
The requested unit-cell structure.
- Raises:
IndexError – If the frame index is out of range.
KeyError – If a required trajectory property is absent.
TypeError – If the frame index is not an integer.
ValueError – If the frame cannot be represented as a structure.
- Return type:
- frames()[source]¶
Iterate over all frames in source order.
- Returns:
An iterator of unit-cell structures.
- Return type:
collections.abc.Iterator[httk.atomistic.models.structure.unitcell.UnitcellStructure]
- property reference_frames: tuple[int, Ellipsis] | None[source]¶
Return normalized reference-frame indexes, or
None.
- property species: tuple[httk.atomistic.models.species.species.Species, Ellipsis][source]¶
Return the constant distinct species from the first frame.
- property species_at_sites: tuple[str, Ellipsis][source]¶
Return the constant species name at each site.
- property observable_names: tuple[str, Ellipsis][source]¶
Return names outside the recognized trajectory and structure properties.