class ReactiveFlux

class deeptime.markov.ReactiveFlux(source_states, target_states, net_flux, stationary_distribution=None, qminus=None, qplus=None, gross_flux=None)

The A->B reactive flux from transition path theory (TPT).

This object describes a reactive flux, i.e. a network of fluxes from a set of source states A, to a set of sink states B, via a set of intermediate nodes. Every node has three properties: the stationary probability mu, the forward committor qplus and the backward committor qminus. Every pair of edges has the following properties: a flux, generally a net flux that has no unnecessary back-fluxes, and optionally a gross flux.

Flux objects can be used to compute transition pathways (and their weights) from A to B, the total flux, the total transition rate or mean first passage time, and they can be coarse-grained onto a set discretization of the node set.

Fluxes can be computed using transition path theory - see [1] and deeptime.markov.tools.tpt().

Parameters:
  • source_states (array_like) – List of integer state labels for set A

  • target_states (array_like) – List of integer state labels for set B

  • net_flux ((n,n) ndarray or scipy sparse matrix) – effective or net flux of A->B pathways

  • stationary_distribution ((n,) ndarray (optional)) – Stationary vector

  • qminus ((n,) ndarray (optional)) – Backward committor for A->B reaction

  • qplus ((n,) ndarray (optional)) – Forward committor for A-> B reaction

  • gross_flux ((n,n) ndarray or scipy sparse matrix) – gross flux of A->B pathways, if available

Notes

Reactive flux contains a flux network from educt states (A) to product states (B).

See also

reactive_flux

Method that produces ReactiveFlux instances

deeptime.markov.msm.MarkovStateModel.reactive_flux

TPT analysis based on a Markov state model

References

Attributes

backward_committor

backward committor probability

forward_committor

forward committor probability

gross_flux

Gross \(A\\rightarrow B\) flux.

intermediate_states

set of intermediate states

mfpt

Mean-first-passage-time (inverse rate) of \(A\rightarrow B\) transitions.

n_states

number of states.

net_flux

Effective or net flux.

rate

Rate (inverse mfpt) of \(A\\rightarrow B\) transitions in units of \(1/ \mathrm{time}\).

source_states

set of reactant (source) states.

stationary_distribution

stationary distribution

target_states

set of product (target) states

total_flux

The total flux.

Methods

coarse_grain(user_sets)

Coarse-grains the flux onto user-defined sets.

copy()

Makes a deep copy of this model.

get_params([deep])

Get the parameters.

major_flux([fraction])

Returns the main pathway part of the net flux comprising at most the requested fraction of the full flux.

pathways([fraction, maxiter])

Decompose flux network into dominant reaction paths.

set_params(**params)

Set the parameters of this estimator.

coarse_grain(user_sets)

Coarse-grains the flux onto user-defined sets.

Parameters:

user_sets (list of int-iterables) – sets of states that shall be distinguished in the coarse-grained flux.

Returns:

(sets, tpt) – sets contains the sets tpt is computed on. The tpt states of the new tpt object correspond to these sets of states in this order. Sets might be identical, if the user has already provided a complete partition that respects the boundary between A, B and the intermediates. If not, Sets will have more members than provided by the user, containing the “remainder” states and reflecting the splitting at the A and B boundaries. tpt contains a new tpt object for the coarse-grained flux. All its quantities (gross_flux, net_flux, A, B, committor, backward_committor) are coarse-grained to sets.

Return type:

(list of int-iterables, ReactiveFlux)

Notes

All user-specified sets will be split (if necessary) to preserve the boundary between A, B and the intermediate states.

copy() Model

Makes a deep copy of this model.

Returns:

A new copy of this model.

Return type:

copy

get_params(deep=False)

Get the parameters.

Returns:

params – Parameter names mapped to their values.

Return type:

mapping of string to any

major_flux(fraction=0.9)

Returns the main pathway part of the net flux comprising at most the requested fraction of the full flux.

pathways(fraction=1.0, maxiter=1000)

Decompose flux network into dominant reaction paths.

Parameters:
  • fraction (float, optional) – Fraction of total flux to assemble in pathway decomposition

  • maxiter (int, optional) – Maximum number of pathways for decomposition

Returns:

  • paths (list) – List of dominant reaction pathways

  • capacities (list) – List of capacities corresponding to each reactions pathway in paths

set_params(**params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Parameters:

**params (dict) – Estimator parameters.

Returns:

self – Estimator instance.

Return type:

object

property backward_committor

backward committor probability

property forward_committor

forward committor probability

property gross_flux

Gross \(A\\rightarrow B\) flux. Units are \(1/ \mathrm{time}\).

property intermediate_states

set of intermediate states

property mfpt

Mean-first-passage-time (inverse rate) of \(A\rightarrow B\) transitions.

property n_states

number of states.

property net_flux

Effective or net flux. Units are \(1/ \mathrm{time}\).

property rate

Rate (inverse mfpt) of \(A\\rightarrow B\) transitions in units of \(1/ \mathrm{time}\).

property source_states

set of reactant (source) states.

property stationary_distribution

stationary distribution

property target_states

set of product (target) states

property total_flux

The total flux. Units are \(1/ \mathrm{time}\).