msmbuilder.tpt.calculate_fraction_visits

msmbuilder.tpt.calculate_fraction_visits(tprob, waypoint, source, sink, return_cond_Q=False)[source]

Calculate the fraction of times a walker on tprob going from sources to sinks will travel through the set of states waypoints en route.

Computes the conditional committors q^{ABC^+} and uses them to find the fraction of paths mentioned above. The conditional committors can be

Note that in the notation of Dickson et. al. this computes h_c(A,B), with
sources = A sinks = B waypoint = C
Parameters:

tprob : matrix

The transition probability matrix

waypoint : int

The index of the intermediate state

sources : nd_array, int or int

The indices of the source state(s)

sinks : nd_array, int or int

The indices of the sink state(s)

return_cond_Q : bool

Whether or not to return the conditional committors

Returns:

fraction_paths : float

The fraction of times a walker going from sources -> sinks stops by waypoints on its way.

cond_Q : nd_array, float (optional)

Optionally returned (return_cond_Q)

See also

calculate_hub_score
function Compute the ‘hub score’, the weighted fraction of visits for an entire network.
calculate_all_hub_scores
function Wrapper to compute all the hub scores in a network.

Notes

Employs dense linear algebra,
memory use scales as N^2 cycle use scales as N^3

References

..[1] Dickson & Brooks (2012), J. Chem. Theory Comput.,
Article ASAP DOI: 10.1021/ct300537s