Open
Conversation
…rs are hard coded(see comments in draw_membrane2a. In the future, we need to add those parameters to the BornProfiler workflow.)
…dDataFormats in MDAnalysis.
orbeckst
requested changes
Jan 25, 2022
Member
orbeckst
left a comment
There was a problem hiding this comment.
If you put the fix for analysis.py in a separate PR then I can merge it right away.
For drawmembrane we need
- remove hard coding of dimer option: use command line argument processing
- add documentation to the help for the new options
- list new options (e.g., -x, -y, -D)
- explain how the second cylinder position is computed (equation)
- state assumptions (e.g., would the box center need to be between the two cylinders??)
We can merge this without changing of the other code as long as it still works with the old code, i.e., the dimer option is off by default. Then in the next PR we change the Python code.
| float l_m=40, a0=0; | ||
| float z_m0=0, R_m0=0, R_m1=0, x0_R=NO_COORDINATE, y0_R=NO_COORDINATE; | ||
| float R, R_temp; | ||
| float R, R2, R_temp; /*11-2021 added R2*/ |
| char ext[]="m.dx"; | ||
| bool compression = FALSE; | ||
|
|
||
| /*11-2021*/ |
Member
There was a problem hiding this comment.
remove date from comment, that's available in the git log, rest of the comment is great
Comment on lines
+550
to
+554
| /* For this test case, we are going to hard code the second zone center as:*/ | ||
| /* x0_R - 2 * dx_R */ | ||
| /* y0_R - 2 * dy_R */ | ||
| /* see core.py line 458*/ | ||
|
|
Member
There was a problem hiding this comment.
remove comment when command line passing is implemented
| /*11-2021*/ | ||
| /* Draw symmetric exclusion zone for a dimer. */ | ||
| /* The zone is defined by x0_R, y0_R, dx_R, dy_R. */ | ||
| bool dimer = TRUE; /* New feature for CPA dimer. Set to FALSE as default*/ |
Comment on lines
+583
to
+588
| /*11-2021*/ | ||
| /* Warning: this is the hard coded offset. Normally you should get them from core.py*/ | ||
| /* But the way wrote in core.py made it hard to do so. */ | ||
| dx_R = 20; | ||
| dy_R = -5; | ||
|
|
Member
There was a problem hiding this comment.
replace with command line passing
| Membrane.x0_p = x0_p; /* centre of the protein */ | ||
| Membrane.y0_p = y0_p; | ||
| Membrane.z0_p = z0_p; | ||
| Membrane.dimer = TRUE; /*11-2021 CPA hack*/ |
| Membrane.z0_p = z0_p; | ||
| Membrane.dimer = TRUE; /*11-2021 CPA hack*/ | ||
|
|
||
| /* 11-2021 */ |
| /* channel exclusion zone for ion accessibility */ | ||
| R = sqrt(SQR(x[k]-Membrane.x0_R) + SQR(y[j]-Membrane.y0_R)); | ||
| R_temp = (R_m1*(z[i]-Membrane.z_m0) - R_m0*(z[i]-Membrane.z_m1))/(Membrane.z_m1 - Membrane.z_m0); | ||
| /*If the system is not a dimer. 11-2021 added*/ |
|
|
||
| if (z[i] <= Membrane.z_m1 && z[i] >= Membrane.z_m0 && R > R_temp) { | ||
| kk[cnt] = 0.0; /* Zero ion accessibility */ | ||
| /*11-2021*/ |
| R2 = sqrt(SQR(x[k]-x2_R) + SQR(y[j]-y2_R)); | ||
| R_temp = (R_m1*(z[i]-Membrane.z_m0) - R_m0*(z[i]-Membrane.z_m1))/(Membrane.z_m1 - Membrane.z_m0); | ||
|
|
||
| //if (z[i] <= Membrane.z_m1 && z[i] >= Membrane.z_m0 && R > R_temp && R2 > R_temp) { |
Closed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated bornprofiler/analysis.py to match current version of griddataformats.
Added dimer option for drawmembrane2a.c. Currently the dimer parameters are still hard coded. Need more work on this in the future.