Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

ReactiveFlux preserve order of input sets #1005

Merged
merged 2 commits into from Dec 7, 2016

Conversation

marscher
Copy link
Member

@marscher marscher commented Dec 6, 2016

  • To preserve the order we use a ordered set implementation.
    Note that this also increases speed a bit.
  • The first and the last state of F are always A and B, so we use that info in
    plotting.

Fixes #1004

… plots

* To preserve the order we use a ordered set implementation.
  Note that this also increases speed a bit.
* The first and the last state of F are always A and B, so we use that info in
  plotting.
@franknoe
Copy link
Contributor

franknoe commented Dec 6, 2016 via email

@codecov-io
Copy link

Current coverage is 89.37% (diff: 100%)

Merging #1005 into devel will increase coverage by 0.01%

@@              devel      #1005   diff @@
==========================================
  Files           172        173     +1   
  Lines         16589      16598     +9   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          14824      14834    +10   
+ Misses         1765       1764     -1   
  Partials          0          0          

Powered by Codecov. Last update 6bf304f...a18bcf0

@nsplattner
Copy link

Thanks for addressing #1004 !

I understand that its probably not possible to find a general solution for the order of output sets since there are many potential use cases. However, I think the most important use case is using the PCCA sets for coarse graining, either with A and B being macrostates or with A and B being microstates belonging to different PCCA states. (This is also what we show in the BPTI notebook.) In this case I think it helps to have a defined order of the output states which can easily be connected to the input sets, as well as having A and B clearly marked, since in the end the main interest is connecting the observed transition states to macrostates and their specific properties.

@franknoe
Copy link
Contributor

franknoe commented Dec 6, 2016 via email

@nsplattner
Copy link

As far as I understand the order as indicated above was not preserved before. Also, states A and B were not marked. So what I expect the code to do (I have not tested it yet) is to mark A and B in the flux plot and preserve the order of states otherwise. This should make it easier to connect the transition states to the PCCA sets of the model.
Please correct me if this is wrong and comment if you think there is a better way of solving this problem.

@franknoe
Copy link
Contributor

franknoe commented Dec 6, 2016 via email

@nsplattner
Copy link

That's exactly what the current code does (placing A in the beginning and B in the end). This is fine if A and B are clearly marked as in the code submitted here, but its confusing in the current release in the case your input is a defined set of PCCA states and you get the same number of states as an output, but with a different numbering compared to your input.

I agree that preserving the order of states is not meaningful in case states are divided. However, I think in these cases users should be aware of dealing with a new state definition/ordering anyways.

@franknoe
Copy link
Contributor

franknoe commented Dec 6, 2016 via email

@nsplattner
Copy link

I think that would be a good solution!

@franknoe
Copy link
Contributor

franknoe commented Dec 6, 2016 via email

@marscher
Copy link
Member Author

marscher commented Dec 7, 2016

The changes in #1005 reflect exactly what have been discussed here:

  1. The order is preserved if A and B are already disjoint to the sets to coarse grain to.
  2. If the set definition changes, the user will get a warning that it had to be changed.
  3. Plotting the flux will label A and B

@franknoe
Copy link
Contributor

franknoe commented Dec 7, 2016 via email

@marscher
Copy link
Member Author

marscher commented Dec 7, 2016 via email

@franknoe
Copy link
Contributor

franknoe commented Dec 7, 2016 via email

@marscher
Copy link
Member Author

marscher commented Dec 7, 2016 via email

@franknoe
Copy link
Contributor

franknoe commented Dec 7, 2016 via email

@marscher
Copy link
Member Author

marscher commented Dec 7, 2016 via email

@franknoe
Copy link
Contributor

franknoe commented Dec 7, 2016 via email

@nsplattner
Copy link

The main problem I have with the current release is that the numbering is confusing in case the macrostates are not split. This is solved by the changes above.

For the case where macrostate are split I'm not sure what information should be provided. On one hand this could be treated as a new macrostate definition. In this case the user would just need the indices of the new microstates in each macrostates. However, if the new macrostates can clearly be related to the input macrostates then it would be good to have this information. But I'm not sure if this can be done in a generally applicable way.

@franknoe
Copy link
Contributor

franknoe commented Dec 7, 2016 via email

@marscher marscher merged commit 7e4ef42 into markovmodel:devel Dec 7, 2016
@marscher marscher deleted the flux_preserve_order branch December 7, 2016 15:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants