deeptime.markov.tools.analysis.fingerprint_relaxation¶
- deeptime.markov.tools.analysis.fingerprint_relaxation(T, p0, obs, tau=1, k=None, ncv=None)¶
Dynamical fingerprint for relaxation experiment. [1]
The dynamical fingerprint is given by the implied time-scale spectrum together with the corresponding amplitudes.
- Parameters:
T ((M, M) ndarray or scipy.sparse matrix) – Transition matrix
p0 ((M,) ndarray) – Starting distribution.
obs ((M,) ndarray) – Observable, represented as vector on state space
k (int (optional)) – Number of time-scales and amplitudes to compute
tau (int (optional)) – Lag time of given transition matrix, for correct time-scales
ncv (int (optional)) – The number of Lanczos vectors generated, ncv must be greater than k; it is recommended that ncv > 2*k
- Returns:
timescales ((N,) ndarray) – Time-scales of the transition matrix
amplitudes ((N,) ndarray) – Amplitudes for the relaxation experiment
See also
References
Notes
Fingerprints are a combination of time-scale and amplitude spectrum for a equilibrium correlation or a non-equilibrium relaxation experiment.
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). \]The fingerprint amplitudes \(\gamma_i\) are given by
\[\gamma_i=\langle w_0, r_i\rangle \langle l_i, a \rangle. \]And the fingerprint time scales \(t_i\) are given by
\[t_i=-\frac{\tau}{\log \lvert \lambda_i \rvert}. \]Examples
>>> import numpy as np >>> from deeptime.markov.tools.analysis import fingerprint_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, 0.0, 0.0]) >>> ts, amp = fingerprint_relaxation(T, p0, a)
>>> ts array([ inf, 9.49122158, 0.43429448])
>>> amp array([0.45454545, 0.5 , 0.04545455])