Commit 13dcbfcd by Chloe Dequeker

do not output docking interface option

parent 82c1835f
......@@ -577,11 +577,13 @@ int main(int argc, char** argv){
dalpha, dbeta, dgamma, dock_res, i);
/* Write the number of the conformation and get the interface */
fprintf(outputFile_lig,"%d ",i);
fprintf(outputFile_rec,"%d ",i);
getInterface(pdbR,newPDB);
fprintf(outputFile_lig,"\n");
fprintf(outputFile_rec,"\n");
if(!doNotOutputINT){
fprintf(outputFile_lig,"%d ",i);
fprintf(outputFile_rec,"%d ",i);
getInterface(pdbR,newPDB);
fprintf(outputFile_lig,"\n");
fprintf(outputFile_rec,"\n");
}
if(constructPDB){
writePDB(newPDB, ligand,i);
......
......@@ -145,8 +145,11 @@ void free_argLine(){
free(pdbDir);
free(receptor);
free(ligand);
fclose(outputFile_rec);
fclose(outputFile_lig);
if(!doNotOutputINT){
fclose(outputFile_rec);
fclose(outputFile_lig);
}
if(!complexPDB){
free(dockingFile);
......
......@@ -12,6 +12,11 @@ void print_usage() {
"Mandatory\n"
"=========\n\n"
"<-dockingFile> MAXDo file that needs to be analysed\n"
"OR\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"
"--\n"
"<-pdbDir> PDB directory containing the name of the receptor/ligand .pdb\n"
"<-rec> name of the receptor\n"
"<-lig> name of the ligand\n"
......@@ -23,9 +28,6 @@ void print_usage() {
" If nothing is specified, the current directory is used\n"
"<-pose> Desired conformation. Default will compute all conformations\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"
);
}
......@@ -46,6 +48,7 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
target_conf = -1;
HCMD2 = 0;
complexPDB = 0;
doNotOutputINT = 0;
outputDir = NULL;
outputPDB = NULL;
verbose_file = NULL;
......@@ -108,6 +111,8 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
}
}else if(strcmp(argv[i],"-HCMD2") == 0){
HCMD2 = 1;
}else if(strcmp(argv[i],"-noOutput") == 0){
doNotOutputINT = 1;
}else if(strcmp(argv[i],"-complex") == 0){
complexPDB = 1;
}else if(strcmp(argv[i],"-h") == 0 ||
......@@ -166,51 +171,53 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
strcpy(outputPDB,"./");
}
if(target_conf > 0){
sprintf(buf,"%s/%s-%s_rec_%d_dockinter.txt",outputDir,receptor,ligand,target_conf);
outputFile_rec = fopen(buf,"w");
if(outputFile_rec == NULL){
perror("fopen");
exit(EXIT_FAILURE);
}
if(!doNotOutputINT){
if(target_conf > 0){
sprintf(buf,"%s/%s-%s_rec_%d_dockinter.txt",outputDir,receptor,ligand,target_conf);
outputFile_rec = fopen(buf,"w");
if(outputFile_rec == NULL){
perror("fopen");
exit(EXIT_FAILURE);
}
sprintf(buf,"%s/%s-%s_lig_%d_dockinter.txt",outputDir,receptor,ligand,target_conf);
outputFile_lig = fopen(buf,"w");
if(outputFile_lig == NULL){
perror("fopen");
exit(EXIT_FAILURE);
}
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_%d_dockinter.txt",outputDir,receptor,ligand,target_conf);
outputFile_lig = fopen(buf,"w");
if(outputFile_lig == NULL){
perror("fopen");
exit(EXIT_FAILURE);
}
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{
sprintf(buf,"%s/%s-%s_rec_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{
sprintf(buf,"%s/%s-%s_rec_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_dockinter.txt",outputDir,receptor,ligand);
outputFile_lig = fopen(buf,"w");
if(outputFile_lig == NULL){
perror("fopen");
exit(EXIT_FAILURE);
sprintf(buf,"%s/%s-%s_lig_dockinter.txt",outputDir,receptor,ligand);
outputFile_lig = fopen(buf,"w");
if(outputFile_lig == NULL){
perror("fopen");
exit(EXIT_FAILURE);
}
outputFile_lig = fopen(buf,"w");
}
outputFile_lig = fopen(buf,"w");
}
......
......@@ -22,6 +22,7 @@ int constructPDB; /* 1 if we should build the PDB */
int target_conf; /* 1 if we are specific to one conformation */
int HCMD2; /* 1 if this is HCMD2 format */
int complexPDB; /* 1 if we are computing the interface of a given complex */
int doNotOutputINT; /* 1 if we don't want to output the interface */
FILE* verbose_file; /* If verbose mode, the output file */
char* pdbDir; /* Directory containing the PDBs */
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