-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple paths #258
Multiple paths #258
Conversation
Add multiple paths finding Update tests according to correct F
I have added this notebook to showcase the multiple path functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, nice work! Some python suggestions/nitpicks from my side.
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
Refactor nested loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 🚀
Co-authored-by: Stef Smeets <stefsmeets@users.noreply.github.com>
This PR has the following two main objectives
(1) Fix a small bug in the definition of the free energy graph:
Instead of weighting the graph edge between
i
andj
asweight = F[j]
we now do instead
weight = 0.5*(F[i] + F[j])
.This guarantees that the graph is well balanced and the optimal path is calculated corrected in all edge cases.
The tests have been update according to this new definition.
(2) Address #204
I have added the function
paths.multiple_paths
that returns a list ofPathway
object, corresponding to the desired number of optimal paths between two selected sites.The multiple paths are collected according to this algorithm (implemented in networkx ) , while discarding all the ones that are too similar.
I have updated
energy_along_path
andpath_on_landscape
to accept lists of paths as input and produce plots like this one: