Commit 9b386c51 by Chloe Dequeker

dist threshold as an argument

parent 9349157a
...@@ -144,6 +144,8 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){ ...@@ -144,6 +144,8 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
for(i=0;i<pdbR->nbRes;i++) for(i=0;i<pdbR->nbRes;i++)
t_candidateR[i] = &pdbR->residues[i]; t_candidateR[i] = &pdbR->residues[i];
int totR = pdbR->nbRes, totL = pdbL->nbRes, step = 0;
printf("RSTEP 0 1.0\n");printf("LSTEP 0 1.0\n");
/* Start removing candidates */ /* Start removing candidates */
while(oldCandL != nbCandL && oldCandR != nbCandR){ while(oldCandL != nbCandL && oldCandR != nbCandR){
oldCandL = nbCandL; oldCandL = nbCandL;
...@@ -165,6 +167,15 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){ ...@@ -165,6 +167,15 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
nbCandR = 0; nbCandR = 0;
break; break;
} }
step++;
printf("RSTEP %d %d %d -- %f\n",step,nbCandR,totR,(float)(1-((float)(totR-nbCandR)/totR)));
printf("LSTEP %d %d %d -- %f\n",step,nbCandL,totL,(float)(1-((float)(totL-nbCandL)/totL)));
}
while(step < 15){
step++;
printf("RSTEP %d %d %d -- %f\n",step,nbCandR,totR,(float)(1-((float)(totR-nbCandR)/totR)));
printf("LSTEP %d %d %d -- %f\n",step,nbCandL,totL,(float)(1-((float)(totL-nbCandL)/totL)));
} }
/* The first nbCandR values of t_candidateR correspond to the possible candidates /* The first nbCandR values of t_candidateR correspond to the possible candidates
......
...@@ -32,6 +32,7 @@ void print_usage() { ...@@ -32,6 +32,7 @@ void print_usage() {
" Useful if you only want to use the '-outputPDB' option\n" " Useful if you only want to use the '-outputPDB' option\n"
"<--force/-f>.......Will force the computation of the pause even in case of\n" "<--force/-f>.......Will force the computation of the pause even in case of\n"
" huge number of clashes (threshold defined in struct.h)\n" " huge number of clashes (threshold defined in struct.h)\n"
"<-distTH>..........Distance for contact\n"
"--\n" "--\n"
"Leaving this option blank means that the default format for the docking file\n" "Leaving this option blank means that the default format for the docking file\n"
"will be used.\n" "will be used.\n"
...@@ -57,7 +58,6 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -57,7 +58,6 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
verbose = 0; verbose = 0;
constructPDB = 0; constructPDB = 0;
target_conf = -1;
HCMD2 = 0; HCMD2 = 0;
MAXDo = 0; MAXDo = 0;
HEX = 0; HEX = 0;
...@@ -66,6 +66,8 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -66,6 +66,8 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
clash = 0; clash = 0;
force = 0; force = 0;
atom_res = 0; atom_res = 0;
target_conf = -1;
DIST_FOR_CONTACT = -1;
outputDir = NULL; outputDir = NULL;
outputPDB = NULL; outputPDB = NULL;
verbose_file = NULL; verbose_file = NULL;
...@@ -123,7 +125,13 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -123,7 +125,13 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
}else if(strcmp(argv[i],"-pose") == 0){ }else if(strcmp(argv[i],"-pose") == 0){
target_conf = atoi(argv[i+1]); target_conf = atoi(argv[i+1]);
if(target_conf <= 0){ if(target_conf <= 0){
fprintf(stderr,"Specific conformation not valid\n"); fprintf(stderr,"Target conformation not valid\n");
exit(EXIT_SUCCESS);
}
}else if(strcmp(argv[i],"-distTH") == 0){
DIST_FOR_CONTACT = atof(argv[i+1]);
if(DIST_FOR_CONTACT > 0){
fprintf(stderr,"The threshold distance has to be above 0.\n");
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
}else if(strcmp(argv[i],"-HCMD2") == 0){ }else if(strcmp(argv[i],"-HCMD2") == 0){
...@@ -158,6 +166,11 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -158,6 +166,11 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
if(DIST_FOR_CONTACT == -1){
printf("No distance for contact specified, default distance is 5A.\n");
DIST_FOR_CONTACT = 5.0;
}
if(dockingFile == NULL && !complexPDB){ if(dockingFile == NULL && !complexPDB){
fprintf(stderr,"The docking file has to be provided\n\n"); fprintf(stderr,"The docking file has to be provided\n\n");
if(!print_help) if(!print_help)
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#define NB_MAX_ATOM_PER_RES 100 /* No residue has more atoms than that */ #define NB_MAX_ATOM_PER_RES 100 /* No residue has more atoms than that */
#define TOO_MANY_CLASHES 20 /* If not forcing, program will skip conformation after #define TOO_MANY_CLASHES 20 /* If not forcing, program will skip conformation after
* this number of clashes */ * this number of clashes */
#define DIST_FOR_CONTACT 5 /* Distance under which we consider
* two residues are in contact */
#define DIST_FOR_CLASH 2 /* Distance in Angstrom under which we consider #define DIST_FOR_CLASH 2 /* Distance in Angstrom under which we consider
* the contact is a clash */ * the contact is a clash */
#define NB_HEADER_LINE_HEX 12 /* Number of header lines at the top of a hex docking file */ #define NB_HEADER_LINE_HEX 12 /* Number of header lines at the top of a hex docking file */
...@@ -33,6 +31,7 @@ int doNotOutputINT; /* 1 if we don't want to output the interface */ ...@@ -33,6 +31,7 @@ int doNotOutputINT; /* 1 if we don't want to output the interface */
int atom_res; /* 1 if we want a resolution at atom's level */ int atom_res; /* 1 if we want a resolution at atom's level */
int clash; /* Maybe be incremented in case of clashes */ int clash; /* Maybe be incremented in case of clashes */
int force; /* Will output even if clash, may increase computation time */ int force; /* Will output even if clash, may increase computation time */
float DIST_FOR_CONTACT; /* Distance under which we consider two residues are in contact */
FILE* verbose_file; /* If verbose mode, the output file */ FILE* verbose_file; /* If verbose mode, the output file */
char* pdbDir; /* Directory containing the PDBs */ char* pdbDir; /* Directory containing the PDBs */
char* receptor; /* Name of the receptor */ char* receptor; /* Name of the receptor */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment