httk.serve.optimade.schema.trajectories

The trajectories entry type, derived from the structures properties.

A trajectories entry describes an ordered sequence of structures (frames). Every structures property (other than id and type) is reused with an extra leading dim_frames dimension so it can vary per frame; that leading dimension is declared compactable (constant) so a server MAY send a single value when the property is constant across frames (see the specification sections “Trajectories Entries” and “Compact list representation”). Two trajectory-specific properties, nframes and reference_frames, are added.

When httk-atomistic is present, its TrajectoryEntryProvider serves the vendored official OPTIMADE v1.3 definition and is the preferred route. This helper remains for deriving a definition from a supplied structures definition.

The source structures properties are taken from a supplied EntryTypeDefinition (its PropertyDefinition objects, reduced to the simplified dialect); this module produces the simplified {"description", "properties"} dialect, which a caller turns into a full trajectories EntryTypeDefinition via entry_type_definition_from_simple().

Functions

trajectories_entry_info(structure_definition, ...)

Build trajectories entry metadata from named structures properties.

Module Contents

httk.serve.optimade.schema.trajectories.trajectories_entry_info(structure_definition, structure_properties)[source]

Build trajectories entry metadata from named structures properties.

structure_definition is the structures EntryTypeDefinition; id and type are copied unwrapped (with type’s description adjusted), every other named structures property is frame-wrapped, and the shared last_modified property plus the trajectory-specific nframes and reference_frames are added. The result is the simplified {"description", "properties"} dialect.

Parameters:
Returns:

Simplified trajectories entry metadata.

Return type:

dict[str, Any]