mlcolvar.utils.timelagged.create_timelagged_dataset¶
- class mlcolvar.utils.timelagged.create_timelagged_dataset(X: Tensor, t: Tensor = None, lag_time: float = 1, reweight_mode: str = None, logweights: Tensor = None, tprime: Tensor = None, interval: list = None, progress_bar: bool = False)[source]¶
Bases:
Create a DictDataset of time-lagged configurations.
In case of biased simulations the reweight can be performed in two different ways (
reweight_mode):rescale_time: the search for time-lagged pairs is performed in the accelerated time (dt’ = dt*exp(logweights)), as described in [1] .weights_t: the weight of each pair of configurations (t,t+lag_time) depends only on time t (logweights(t)), as done in [2] , [3] .
If reweighting is None and tprime is given the rescale_time mode is used. If instead only the logweights are specified the user needs to choose the reweighting mode.
References
- Parameters:
X (array-like) – input descriptors
t (array-like, optional) – time series, by default np.arange(len(X))
reweight_mode (str, optional) – how to do the reweighting, see documentation, by default none
lag_time (float, optional) – lag between configurations, by default = 10
logweights (array-like,optional) – logweight of each configuration (typically beta*bias)
tprime (array-like,optional) – rescaled time estimated from the simulation. If not given and reweighting_mode`=`rescale_time then tprime_evaluation(t,logweights) is used
interval (list or np.array or tuple, optional) – Range for slicing the returned dataset. Useful to work with batches of same sizes. Recall that with different lag_times one obtains different datasets, with different lengths
progress_bar (bool) – Display progress bar with tqdm
- Returns:
dataset – Dataset with keys ‘data’, ‘data_lag’ (data at time t and t+lag), ‘weights’, ‘weights_lag’ (weights at time t and t+lag).
- Return type:
- __init__(**kwargs)¶