httk.atomistic.entries.trajectories

Project trajectories onto the OPTIMADE trajectories entry-provider contract.

Attributes

Classes

TrajectoryEntry

Define the non-instantiable OPTIMADE trajectory entry family.

TrajectoryEntryProvider

Serve trajectory metadata and bounded frame projections.

Module Contents

httk.atomistic.entries.trajectories.TRAJECTORY_FRAME_MATERIALIZATION_LIMIT = 100
class httk.atomistic.entries.trajectories.TrajectoryEntry

Define the non-instantiable OPTIMADE trajectory entry family.

type = 'trajectories'
definition_id = 'https://schemas.optimade.org/defs/v1.3/entrytypes/optimade/trajectories'
classmethod entry_type_definition()

Load the trajectory definition with httk extensions.

Returns:

The extended OPTIMADE trajectories definition.

Return type:

httk.core.EntryTypeDefinition

class httk.atomistic.entries.trajectories.TrajectoryEntryProvider(entries, *, extra_definitions=None, properties=None)

Bases: httk.core.EntryProvider

Serve trajectory metadata and bounded frame projections.

Native frame lists are materialized only through httk.atomistic.entries.trajectories.TRAJECTORY_FRAME_MATERIALIZATION_LIMIT (100) frames. Larger or record-backed trajectories still serve the entry, frame count, references, and null frame properties. Recover their frame data by re-reading the original source files or the JSONL container; partial-data serving is planned.

Parameters:
entry_types()

Return the trajectory entry type served by this provider.

Returns:

The trajectories entry-type definition.

Return type:

collections.abc.Mapping[str, httk.core.EntryTypeDefinition]

property_keys(entry_type)

Map served trajectory properties to storage keys.

Parameters:

entry_type (str) – The entry type to inspect.

Returns:

Served-property to storage-key mappings.

Raises:

KeyError – If entry_type is not trajectories.

Return type:

collections.abc.Mapping[str, str]

records(entry_type)

Project trajectories into OPTIMADE records.

Native frame lists are served only for trajectories up to the materialization limit; larger and record-backed trajectories serve null frame properties.

Parameters:

entry_type (str) – The entry type to project.

Returns:

The projected records.

Raises:

KeyError – If entry_type is not trajectories.

Return type:

collections.abc.Iterable[collections.abc.Mapping[str, Any]]