Skip to content

Fix MISTIS minus ensemble not forbidding other states#983

Merged
dwhswenson merged 4 commits into
openpathsampling:masterfrom
dwhswenson:no-other-state-minus
Feb 25, 2021
Merged

Fix MISTIS minus ensemble not forbidding other states#983
dwhswenson merged 4 commits into
openpathsampling:masterfrom
dwhswenson:no-other-state-minus

Conversation

@dwhswenson

@dwhswenson dwhswenson commented Feb 24, 2021

Copy link
Copy Markdown
Member

The minus interface as set up by the MISTISNetwork didn't forbid the trajectory from entering other states during the excursion from the state. This would occasionally manifest as a failure of the sanity check when saving, stating that the trajectory for some replica did not satisfy the ensemble (because the trajectory in the TIS ensemble after a replica exchange had frames in the other state).

Typically, this meant that the minus trajectory had to cross to the other state and then cross back, so it was extremely rare, but I found it when working on a simple model that isn't actually rare enough to really need TIS to get the rate. @gyorgy-hantal: I think you encountered this problem once. This is the explanation.

This fixes it -- everything was in place to forbid other states (and used in MSTIS); just needed to add it to MISTIS. Also adds a test to prevent regression.

@dwhswenson dwhswenson added the bugfix PRs fixing bugs label Feb 24, 2021
@codecov

codecov Bot commented Feb 24, 2021

Copy link
Copy Markdown

Codecov Report

Merging #983 (2a18a50) into master (f403459) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #983      +/-   ##
==========================================
+ Coverage   80.26%   80.28%   +0.01%     
==========================================
  Files         136      136              
  Lines       14455    14468      +13     
==========================================
+ Hits        11603    11616      +13     
  Misses       2852     2852              
Impacted Files Coverage Δ
openpathsampling/high_level/network.py 85.50% <100.00%> (+0.07%) ⬆️
openpathsampling/ensemble.py 84.74% <0.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f403459...2a18a50. Read the comment docs.

@dwhswenson

Copy link
Copy Markdown
Member Author

Side note: looks like #980 did fix my issues with CodeCov. Now we get the comment after the last of the pytest runs has come in, but while the notebook tests are still running. Perfect!

@dwhswenson

Copy link
Copy Markdown
Member Author

This is ready for review and comment. I will leave it open for at least 24 hours, merging no earlier than Thu 25 Feb 15:00 GMT (16:00 local).

@sroet sroet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, thank you for adding the understandable regression test. 1 extra newline snuck in, but don't block this PR based on that

Comment thread openpathsampling/tests/test_network.py Outdated
Co-authored-by: Sander Roet <sanderroet@hotmail.com>
@dwhswenson dwhswenson merged commit d32c198 into openpathsampling:master Feb 25, 2021
@dwhswenson dwhswenson deleted the no-other-state-minus branch February 25, 2021 16:25
@dwhswenson dwhswenson mentioned this pull request Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PRs fixing bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants