htmd.adaptive.util module#
- htmd.adaptive.util.getEpochSimIdx(data: MetricData, epoch: int) ndarray#
Return the simulation indexes in a MetricData object for a given epoch.
- Parameters:
data (MetricData) – Projected simulation data whose
simlistis searched.epoch (int) – The epoch number to select.
- Returns:
idx – Integer array of simulation indexes in
data.simlistthat belong to the requested epoch.- Return type:
np.ndarray
- htmd.adaptive.util.getEpochTrajectoryDictionary(simlist: list) dict#
Build a mapping from epoch number to simulation indexes.
- htmd.adaptive.util.getParentSimIdxFrame(data: MetricData, trajidx: int) tuple#
Find the parent simulation index and frame for a given trajectory.
For a simulation that was spawned from a parent trajectory, returns the index of the parent simulation within
data.simlistand the frame index within that parent simulation.- Parameters:
data (MetricData) – Projected simulation data containing the simlist to search.
trajidx (int) – Index of the simulation in
data.simlistfor which to find the parent.
- Returns:
parentidx (int) – Index of the parent simulation in
data.simlist.frameidx (int) – Frame index within the parent simulation corresponding to the spawn point.