deeptime.markov.tools.analysis.fingerprint_correlation¶
- deeptime.markov.tools.analysis.fingerprint_correlation(T, obs1, obs2=None, tau=1, k=None, ncv=None)¶
Dynamical fingerprint for equilibrium correlation experiment. [1].
- Parameters:
T ((M, M) ndarray or scipy.sparse matrix) – Transition matrix
obs1 ((M,) ndarray) – Observable, represented as vector on state space
obs2 ((M,) ndarray (optional)) – Second observable, for cross-correlations
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 correlation 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.
Auto-correlation
The auto-correlation of an observable for a system in equilibrium is
is the observable at time . It can be propagated forward in time using the t-step transition matrix .
The propagated observable at time is .
Using the eigenvlaues and eigenvectors of the transition matrix the autocorrelation can be written as
The fingerprint amplitudes are given by
And the fingerprint time scales are given by
Cross-correlation
The cross-correlation of two observables , is similarly given
The fingerprint amplitudes are similarly given in terms of the eigenvectors
Examples
>>> import numpy as np >>> from deeptime.markov.tools.analysis import fingerprint_correlation
>>> T = np.array([[0.9, 0.1, 0.0], [0.5, 0.0, 0.5], [0.0, 0.1, 0.9]]) >>> a = np.array([1.0, 0.0, 0.0]) >>> ts, amp = fingerprint_correlation(T, a)
>>> ts array([ inf, 9.49122158, 0.43429448])
>>> amp array([0.20661157, 0.22727273, 0.02066116])