deeptime.markov.tools.analysis.relaxation

deeptime.markov.tools.analysis.relaxation(T, p0, obs, times=(1,), k=None)

Relaxation experiment. [1]

The relaxation experiment describes the time-evolution of an expectation value starting in a non-equilibrium situation.

Parameters:
  • T ((M, M) ndarray or scipy.sparse matrix) – Transition matrix

  • p0 ((M,) ndarray (optional)) – Initial distribution for a relaxation experiment

  • obs ((M,) ndarray) – Observable, represented as vector on state space

  • times (list of int (optional)) – List of times at which to compute expectation

  • k (int (optional)) – Number of eigenvalues and eigenvectors to use for computation

Returns:

res – Array of expectation value at given times

Return type:

ndarray

References

Notes

Relaxation

A relaxation experiment looks at the time dependent expectation value of an observable for a system out of equilibrium

\[\mathbb{E}_{w_{0}}[a(x, t)]=\sum_x w_0(x) a(x, t)=\sum_x w_0(x) \sum_y p^t(x, y) a(y). \]

Examples

>>> import numpy as np
>>> from deeptime.markov.tools.analysis import relaxation
>>> T = np.array([[0.9, 0.1, 0.0], [0.5, 0.0, 0.5], [0.0, 0.1, 0.9]])
>>> p0 = np.array([1.0, 0.0, 0.0])
>>> a = np.array([1.0, 1.0, 0.0])
>>> times = np.array([1, 5, 10, 20])
>>> rel = relaxation(T, p0, a, times=times)
>>> rel
array([1.        , 0.8407    , 0.71979377, 0.60624287])