Commit f0aba0b6 by Chloe Dequeker

Adding the atom resolution for detecting interfaces

parent a08d3a16
......@@ -183,7 +183,7 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
/* Don't worry for that, this is only O(n^2) over the remaining
* candidate residues for each protein
* for each receptor resdiue candidate, we look at each of its atoms
* for each ligand residue candidate, we llok at each of its atoms
* for each ligand residue candidate, we look at each of its atoms
*/
/* For each candidate residue of the receptor */
......@@ -216,6 +216,11 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
if(dist <= DIST_FOR_CONTACT){
t_candidateR[i]->isCandidate = 1;
t_candidateL[k]->isCandidate = 1;
/* We keep the values updated for atoms in any case */
t_candidateR[i]->isAtomCandidate[j] = 1;
t_candidateL[k]->isAtomCandidate[l] = 1;
break;
}
}
......@@ -232,7 +237,6 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL, int confID){
}
}
printf("number of clashes : %d \n",clash);
/* If the amount of clashes is still ok */
if(clash < TOO_MUCH_CLASHES){
......
......@@ -275,9 +275,39 @@ void write_candidate(struct residue** t_candid, int sizeCand, FILE* output_strea
/* Output the residues selected as being part of the interface in the array
* t_candid
*/
int i = 0, j = 0, k= 0, len = 0;
char buf[15];
int i = 0, j = 0, k= 0, l = 0, len = 0;
char buf[15] = "", buf2[15] = "";
if(atom_res){
for(i=0;i<sizeCand;i++){
for(j=0;j<t_candid[i]->nbAtom;j++){
if(t_candid[i]->isAtomCandidate[j]){
/* Getting the residue name */
len = strlen(t_candid[i]->idRes);
k = 0;
for(l=0;l<len;l++){
if(t_candid[i]->idRes[l] != ' '){
buf[k] = t_candid[i]->idRes[l];
k++;
}
}
/* Now, getting the atom name */
len = strlen(t_candid[i]->atomType[j]);
k = 0;
for(l=0;l<len;l++){
if(t_candid[i]->atomType[j][l] != ' '){
buf2[k] = t_candid[i]->atomType[j][l];
k++;
} }
buf2[k] = '\0';
fprintf(output_stream,"'%s' '%c' '%s' ",buf,t_candid[i]->chain, buf2);
fflush(output_stream);
}
}
}
}else{
for(i=0;i<sizeCand;i++){
if(t_candid[i]->isCandidate){
len = strlen(t_candid[i]->idRes);
......@@ -292,5 +322,6 @@ void write_candidate(struct residue** t_candid, int sizeCand, FILE* output_strea
fflush(output_stream);
}
}
}
}
......@@ -22,15 +22,16 @@ void print_usage() {
"<-lig> name of the ligand\n"
"OPTIONAL\n"
"=========\n\n"
"<-outputPDB> Output directory for the constructed PDB (ligand)\n"
"<-outputPDB>.......Output directory for the constructed PDB (ligand)\n"
" If nothing is specified, there will be no PDB output\n"
"<-o> Output directory for the docking interface\n"
"<-o>...............Output directory for the docking interface\n"
" 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"
"<-noOutput> Will prevent the program to output the docking interface\n"
"<-pose>............Desired conformation. Default will compute all conformations\n"
"<--atom-res>.......If specified, will computed the interface at atom level\n"
"<-HCMD2>...........Means that the docking file is in the HCMD2 MAXDo format\n"
"<-noOutput>........Will prevent the program to output the docking interface\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"
);
}
......@@ -55,6 +56,7 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
doNotOutputINT = 0;
clash = 0;
force = 0;
atom_res = 0;
outputDir = NULL;
outputPDB = NULL;
verbose_file = NULL;
......@@ -117,6 +119,8 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
}
}else if(strcmp(argv[i],"-HCMD2") == 0){
HCMD2 = 1;
}else if(strcmp(argv[i],"--atom-res") == 0){
atom_res = 1;
}else if(strcmp(argv[i],"-noOutput") == 0){
doNotOutputINT = 1;
}else if(strcmp(argv[i],"-complex") == 0){
......
......@@ -27,6 +27,7 @@ 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 */
int atom_res; /* 1 if we want a resolution at atom's level */
int clash; /* Maybe be incremented in case of clashes */
int force; /* Will output even if clash, may increase computation time */
FILE* verbose_file; /* If verbose mode, the output file */
......@@ -68,6 +69,7 @@ struct residue {
int idAtom[NB_MAX_ATOM_PER_RES]; /* ID of the atom */
int nbAtom; /* Number of atom for this residue */
int isCandidate; /* 1 if this residue belongs to the docking interface */
int isAtomCandidate[NB_MAX_ATOM_PER_RES]; /* 1 if the atom belongs to the docking interface */
};
struct docking_results {
......
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