pyemma.msm.its

pyemma.msm.its(dtrajs, lags=None, nits=10, reversible=True, connected=True)

Calculate implied timescales for a series of lag times.

Parameters:
  • dtrajs (array-like or list of array-likes) – discrete trajectories
  • lags (array-like of integers (optional)) – integer lag times at which the implied timescales will be calculated
  • nits (int (optional)) – number of implied timescales to be computed. Will compute less if the number of states are smaller
  • connected (boolean (optional)) – If true compute the connected set before transition matrix estimation at each lag separately
  • reversible (boolean (optional)) – Estimate the transition matrix reversibly (True) or nonreversibly (False)
Returns:

itsobj

Return type:

ImpliedTimescales object

class pyemma.msm.ui.timescales.ImpliedTimescales(dtrajs, lags=None, nits=10, connected=True, reversible=True, failfast=False)

Methods

bootstrap([nsample]) Samples ITS using bootstrapping
get_lagtimes() Return the list of lag times for which timescales were computed.
get_sample_conf([alpha, process]) Returns the confidence interval that contains alpha % of the sample data
get_sample_mean([process]) Returns the sample means of implied timescales.
get_sample_std([process]) Returns the standard error of implied timescales.
get_timescales([process]) Returns the implied timescale estimates

Attributes

fraction_of_frames Returns the fraction of frames used to compute the count matrix at each lagtime.
lagtimes Return the list of lag times for which timescales were computed.
number_of_timescales Return the number of timescales.
sample_lagtimes Return the list of lag times for which sample data is available
sample_mean Returns the sample means of implied timescales.
sample_number_of_timescales Return the number of timescales for which sample data is available
sample_std Returns the standard error of implied timescales.
samples_available Returns True if samples are available and thus sample
timescales Returns the implied timescale estimates
bootstrap(nsample=10)

Samples ITS using bootstrapping

fraction_of_frames

Returns the fraction of frames used to compute the count matrix at each lagtime.

Notes

In a list of discrete trajectories with varying lengths, the estimation at longer lagtimes will mean discarding some trajectories for which not even one count can be computed. This function returns the fraction of frames that was actually used in computing the count matrix.

Be aware: this fraction refers to the full count matrix, and not that of the largest connected set. Hence, the output is not necessarily the active fraction. For that, use the EstimatedMSM.active_count_fraction() function of the EstimatedMSM class object.

get_lagtimes()

Return the list of lag times for which timescales were computed.

get_sample_conf(alpha=0.6827, process=None)

Returns the confidence interval that contains alpha % of the sample data

Use: alpha = 0.6827 for 1-sigma confidence interval alpha = 0.9545 for 2-sigma confidence interval alpha = 0.9973 for 3-sigma confidence interval etc.

Returns:
  • (L,R) ((float[],float[]) or (float[][],float[][])) – lower and upper timescales bounding the confidence interval
  • if process is None, will return two (l x k) arrays, where l is the number of lag times
  • and k is the number of computed timescales.
  • if process is an integer, will return two (l)-arrays with the
  • selected process time scale for every lag time
get_sample_mean(process=None)

Returns the sample means of implied timescales. Need to generate the samples first, e.g. by calling bootstrap

Parameters:process (int or None (default)) – index in [0:n-1] referring to the process whose timescale will be returned. By default, process = None and all computed process timescales will be returned.
Returns:
  • if process is None, will return a (l x k) array, where l is the number of lag times
  • and k is the number of computed timescales.
  • if process is an integer, will return a (l) array with the selected process time scale
  • for every lag time
get_sample_std(process=None)

Returns the standard error of implied timescales. Need to generate the samples first, e.g. by calling bootstrap

Parameters:process (int or None (default)) – index in [0:n-1] referring to the process whose timescale will be returned. By default, process = None and all computed process timescales will be returned.
Returns:
  • if process is None, will return a (l x k) array, where l is the number of lag times
  • and k is the number of computed timescales.
  • if process is an integer, will return a (l) array with the selected process time scale
  • for every lag time
get_timescales(process=None)

Returns the implied timescale estimates

Parameters:process (int or None (default)) – index in [0:n-1] referring to the process whose timescale will be returned. By default, process = None and all computed process timescales will be returned.
Returns:
  • if process is None, will return a (l x k) array, where l is the number of lag times
  • and k is the number of computed timescales.
  • if process is an integer, will return a (l) array with the selected process time scale
  • for every lag time
lagtimes

Return the list of lag times for which timescales were computed.

number_of_timescales

Return the number of timescales.

sample_lagtimes

Return the list of lag times for which sample data is available

sample_mean

Returns the sample means of implied timescales. Need to generate the samples first, e.g. by calling bootstrap

Returns:timescales – mean timescales for all processes and lag times. l is the number of lag times and k is the number of computed timescales.
Return type:ndarray((l x k), dtype=float)
sample_number_of_timescales

Return the number of timescales for which sample data is available

sample_std

Returns the standard error of implied timescales. Need to generate the samples first, e.g. by calling bootstrap

Returns:timescales – standard deviations of timescales for all processes and lag times. l is the number of lag times and k is the number of computed timescales.
Return type:ndarray((l x k), dtype=float)
samples_available

Returns True if samples are available and thus sample means, standard errors and confidence intervals can be obtained

timescales

Returns the implied timescale estimates

Returns:timescales – timescales for all processes and lag times. l is the number of lag times and k is the number of computed timescales.
Return type:ndarray((l x k), dtype=float)

See also

ImpliedTimescales()
The object returned by this function.
pyemma.plots.plot_implied_timescales()
Plotting function for the ImpliedTimescales object

References

[1]Swope, W. C. and J. W. Pitera and F. Suits Describing protein folding kinetics by molecular dynamics simulations: 1. Theory. J. Phys. Chem. B 108: 6571-6581 (2004)