Commit ec1ee8e8 by Chloe Dequeker

adding the possibility to compute the interface between two PDBs already docked

parent d8bc6139
...@@ -543,6 +543,18 @@ int main(int argc, char** argv){ ...@@ -543,6 +543,18 @@ int main(int argc, char** argv){
writePDB(newPDB, ligand,target_conf); writePDB(newPDB, ligand,target_conf);
} }
freePDB(newPDB); freePDB(newPDB);
}else if(complexPDB){ /* If we are building for a given complex, no rotation */
/* Write the number of the conformation and get the interface */
fprintf(outputFile_lig,"%d ",i);
fprintf(outputFile_rec,"%d ",i);
getInterface(pdbR,pdbL);
fprintf(outputFile_lig,"\n");
fprintf(outputFile_rec,"\n");
if(constructPDB){
writePDB(newPDB, ligand,target_conf);
}
}else{ /* For all conformations */ }else{ /* For all conformations */
for(i=1;i<dock_res->nbConf;i++){ for(i=1;i<dock_res->nbConf;i++){
......
...@@ -23,6 +23,9 @@ void print_usage() { ...@@ -23,6 +23,9 @@ void print_usage() {
" If nothing is specified, the current directory is used\n" " If nothing is specified, the current directory is used\n"
"<-pose> Desired conformation. Default will compute all conformations\n" "<-pose> Desired conformation. Default will compute all conformations\n"
"<-HCMD2> Means that the docking file is in the HCMD2 MAXDo format\n" "<-HCMD2> Means that the docking file is in the HCMD2 MAXDo format\n"
"<-complex> This option means that we look at two PDBs instead of looking\n"
" at the dockingFile. Both PBDs for '-rec' and '-lig' must be in\n"
" '-pdbDir'\n"
); );
} }
...@@ -42,6 +45,7 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -42,6 +45,7 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
constructPDB = 0; constructPDB = 0;
target_conf = -1; target_conf = -1;
HCMD2 = 0; HCMD2 = 0;
complexPDB = 0;
outputDir = NULL; outputDir = NULL;
outputPDB = NULL; outputPDB = NULL;
verbose_file = NULL; verbose_file = NULL;
...@@ -104,6 +108,8 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -104,6 +108,8 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
} }
}else if(strcmp(argv[i],"-HCMD2") == 0){ }else if(strcmp(argv[i],"-HCMD2") == 0){
HCMD2 = 1; HCMD2 = 1;
}else if(strcmp(argv[i],"-complex") == 0){
complexPDB = 1;
}else if(strcmp(argv[i],"-h") == 0 || }else if(strcmp(argv[i],"-h") == 0 ||
strcmp(argv[i],"--help") == 0){ strcmp(argv[i],"--help") == 0){
print_help = 1; print_help = 1;
...@@ -114,7 +120,7 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -114,7 +120,7 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
} }
} }
if(dockingFile == NULL){ 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)
print_usage(); print_usage();
...@@ -175,6 +181,21 @@ struct argLine* parseLineOfArgument(int argc, char** argv){ ...@@ -175,6 +181,21 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
outputFile_lig = fopen(buf,"w"); outputFile_lig = fopen(buf,"w");
}else if(complexPDB){
sprintf(buf,"%s/%s-%s_rec_0_dockinter.txt",outputDir,receptor,ligand);
outputFile_rec = fopen(buf,"w");
if(outputFile_rec == NULL){
perror("fopen");
exit(EXIT_FAILURE);
}
sprintf(buf,"%s/%s-%s_lig_0_dockinter.txt",outputDir,receptor,ligand);
outputFile_lig = fopen(buf,"w");
if(outputFile_lig == NULL){
perror("fopen");
exit(EXIT_FAILURE);
}
outputFile_lig = fopen(buf,"w");
}else{ }else{
sprintf(buf,"%s/%s-%s_rec_dockinter.txt",outputDir,receptor,ligand); sprintf(buf,"%s/%s-%s_rec_dockinter.txt",outputDir,receptor,ligand);
outputFile_rec = fopen(buf,"w"); outputFile_rec = fopen(buf,"w");
......
...@@ -21,6 +21,7 @@ int verbose; /* 1 if we are in verbose mode */ ...@@ -21,6 +21,7 @@ int verbose; /* 1 if we are in verbose mode */
int constructPDB; /* 1 if we should build the PDB */ int constructPDB; /* 1 if we should build the PDB */
int target_conf; /* 1 if we are specific to one conformation */ int target_conf; /* 1 if we are specific to one conformation */
int HCMD2; /* 1 if this is HCMD2 format */ int HCMD2; /* 1 if this is HCMD2 format */
int complexPDB; /* 1 if we are computing the interface of a given complex */
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