httk.atomistic.models.trajectory.trajectory¶
Store the native immutable trajectory representation.
Classes¶
Store an immutable trajectory in the native backend. |
Module Contents¶
- class httk.atomistic.models.trajectory.trajectory.Trajectory(frames, observables=None, reference_frames=None)¶
Bases:
httk.atomistic.models.trajectory.backend.TrajectoryBackendStore an immutable trajectory in the native backend.
A trajectory requires at least one frame and keeps one constant composition across all frames.
- Parameters:
frames (collections.abc.Sequence[httk.atomistic.models.structure.like.StructureLike]) – Unit-cell structures to coerce and store.
observables (collections.abc.Mapping[str, collections.abc.Sequence[Any]] | None) – Optional per-frame observable values.
reference_frames (collections.abc.Sequence[int] | None) – Optional indexes of bounded reference frames.
- frame(i)¶
Return one stored frame by index.
- Parameters:
i (int) – Frame index.
- Returns:
The requested unit-cell structure.
- Raises:
IndexError – If the index is out of range.
- Return type:
- frames()¶
Iterate over the stored frames.
- 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¶
Return the bounded reference-frame indexes, or
None.
- property species: tuple[httk.atomistic.models.species.species.Species, Ellipsis]¶
Return the constant distinct species.