-
Notifications
You must be signed in to change notification settings - Fork 0
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
Leaflet sorter speed up and shell selection bug fix #102
Leaflet sorter speed up and shell selection bug fix #102
Conversation
closed because I found aberrant behavior with lipids that were only partially enclosed in the shell created by Rmax |
Note from convo today: This PR will be reviewed when I have completely replicated analysis on the nachr project from end to end with this branch and gotten the same results out as previously. |
As discussed in nougat meeting, I have re-run a DTA calculation from a separate project and confirmed that the site delta G does not change when these changes are made. |
As discussed in the lab, I have created a separate repo - DTA_Testing - that now houses any testing notebooks and materials created. |
set divisibility_test [expr [expr int([expr $params(Rmax) * 10000])] % [expr int([expr $params(dr) * 10000])]] | ||
if {$divisibility_test != 0} { | ||
error "Rmax must be evenly divisible by dr." | ||
} |
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.
This code is more complicated than it needs to be. Do a simple (i.e. double($Rmax) % $dr
) modulo to get the remainder, and then compare the remainder against a small tolerance (not 0!).
Do not make the tolerance a magic number.
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.
Code has been modified per discussion on slack. Thank you!
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.
I have left two comments, please address.
Description
When running polarDensityBin the leaflet sorter would run on all lipids in the system, even those outside of the zone of analysis. After this PR, the user can select whether leaflet sorting will only occur for lipids within Rmax or for all lipids.
In the process, we discovered a bug (issue #104). If the user specified an Rmax that was evenly divisible by dr, then polarDensityBin would analyze past Rmax by one shell. If the user specified an Rmax that was not evenly divisible by dr, then polarDensityBin would happily accept that choice without balking (but density enrichment analysis would be affected in the outermost shell downstream).
We also found that expected density was being measured on start_frame rather than end_frame (issue #107).
We also found a minor error when no lipids are detected within the shell (issue #110).
After this PR, shells will no longer exceed Rmax when Rmax is evenly divisible by dr. Additionally, polarDensityBin will give an error message and quit if Rmax is not evenly divisible by dr. This fix is agnostic to whether the user uses ints or floats in their config file. Expected density will be measured on end_frame.
Implementation of auto-rescaling dr (issue #105) will occur in a future PR
Usage Changes
Todos
Notable points that this PR has either accomplished or will accomplish.
Pre-Review checklist (PR maker)
Review checklist (Reviewer)
Status