Skip to content
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

Dimer #11

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Dimer #11

wants to merge 2 commits into from

Conversation

ChenouZhang
Copy link
Contributor

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.

…rs are hard coded(see comments in draw_membrane2a. In the future, we need to add those parameters to the BornProfiler workflow.)
Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

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.

@@ -507,13 +532,26 @@ int main(int argc, char *argv[])
float V=0, I=0.1, sdie, cdie, pdie, mdie, idie;
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*/
Copy link
Member

Choose a reason for hiding this comment

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

remove comment

char *infix;
char *file_name_x, *file_name_y, *file_name_z;
char *file_name_k, *file_name_c;
char *f1, *f2, *f3, *f4, *f5, *f6;
char ext[]="m.dx";
bool compression = FALSE;

/*11-2021*/
Copy link
Member

Choose a reason for hiding this comment

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

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*/

Copy link
Member

Choose a reason for hiding this comment

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

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*/
Copy link
Member

Choose a reason for hiding this comment

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

change to FALSE

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;

Copy link
Member

Choose a reason for hiding this comment

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

replace with command line passing

@@ -770,6 +818,19 @@ int main(int argc, char *argv[])
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*/
Copy link
Member

Choose a reason for hiding this comment

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

set from commandline args

@@ -770,6 +818,19 @@ int main(int argc, char *argv[])
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*/

/* 11-2021 */
Copy link
Member

Choose a reason for hiding this comment

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

remove date

@@ -933,11 +994,27 @@ int main(int argc, char *argv[])
}

/* 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*/
Copy link
Member

Choose a reason for hiding this comment

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

remove date


if (z[i] <= Membrane.z_m1 && z[i] >= Membrane.z_m0 && R > R_temp) {
kk[cnt] = 0.0; /* Zero ion accessibility */
/*11-2021*/
Copy link
Member

Choose a reason for hiding this comment

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

remove date

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) {
Copy link
Member

Choose a reason for hiding this comment

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

remove commented out code

@orbeckst orbeckst mentioned this pull request Jan 25, 2022
@ChenouZhang ChenouZhang mentioned this pull request Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants