msmbuilder.msm_analysis.calc_expectation_timeseries

msmbuilder.msm_analysis.calc_expectation_timeseries(tprob, observable, init_pop=None, timepoints=1000000, n_modes=100, lagtime=15.0)[source]

Calculates the expectation value over time <A(t)> for some observable in an MSM. Does this by eigenvalue decomposition, according to the eq

math :: langle A

angle (t) = sum_{i=0}^N langle p(0), psi^L_i

angle e^{ - lambda_i t } langle psi^R_i, A angle

Parameters:

tprob : matrix

The transition probability matrix (of size N) for the MSM.

observable : array_like, float

A len N array of the values A of the observable for each state.

init_pop : array_like, float

A len N array of the initial populations of each state. If None is passed, then the function will start from even populations in each state.

timepoints : int

The number of timepoints to calculate - the final timeseries will be in length LagTime x timepoints

n_modes : int

The number of eigenmodes to include in the calculation. This number will depend on the timescales involved in the relatation of the observable.

Returns:

timeseries : array_like, float

A timeseries of the observable over time, in units of the lag time of the transition matrix.

Versions