markovmodel / msmtools

Tools for estimating and analyzing Markov state models
GNU Lesser General Public License v3.0
40 stars 27 forks source link

[tpt.pathways] Handle case of non-positive flux matrix. #107

Closed marscher closed 6 years ago

marscher commented 6 years ago

For certain inputs it could happen that the pathway decomposition kicks out all of the entries of the flux matrix F, before reaching the total flux convergence criterion. Now the input is checked for this case.

This happend eg. for Fs generated from P, pi estimated with msmtools.estimation.tmatrix(reversible=True, return_statdist=True). The matrix, stat vector pair in the attached test shows such an example.

Although it is not fully clear to me, why this happens, checking the input, leads to correct termination and the result looks good.

Fixes #106

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at ?% when pulling 59612edba20d7f60451dabc35065e0d9778341b1 on marscher:fix_corner_case_flux_pathway_convergence_check into 665f508ac4358deb4bc4a027b916b8037ca51f5f on markovmodel:devel.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at ?% when pulling 0320843aa1a435e95ebc44e2bbea65f1e8dfffe6 on marscher:fix_corner_case_flux_pathway_convergence_check into 665f508ac4358deb4bc4a027b916b8037ca51f5f on markovmodel:devel.

marscher commented 6 years ago

The test failures are unrelated, merging.