shnitsel.data.shnitsel_db.grouping_methods

Classes

ShMetadataKeys

Helper class to retain certain key metadata to differentiate different trajectories

Functions

group_subtree_by_metadata(subtree)

If there are Trajectories below this level, introduces new groups, grouping them by specific metadata except when all of them already have the same metadata.

Module Contents

class ShMetadataKeys

Bases: NamedTuple

Helper class to retain certain key metadata to differentiate different trajectories

delta_t: float
software: str
version: str
est_level: str | None
theory_basis: str | None
has_forces: bool | typing_extensions.Literal[all, active_only] | None
input_type: typing_extensions.Literal[static, dynamic, unknown]
to_groupname()
group_subtree_by_metadata(subtree)

If there are Trajectories below this level, introduces new groups, grouping them by specific metadata except when all of them already have the same metadata.

Parameters:

subtree (xr.DataTree) – The subtree for which to recursively perform the grouping.

Returns:

Either the grouped subtree or a pair of the metadata of the subtree and the subtree to be grouped in the Trajectory group of that metadata combination.

Return type:

xr.DataTree | tuple[ShMetadataKeys, xr.DataTree]