Commit e012c524 by Chloe Dequeker

bug fix for interface output

parent e8920575
......@@ -272,20 +272,22 @@ 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, len = 0;
int i = 0, j = 0, k= 0, len = 0;
char buf[15];
for(i=0;i<sizeCand;i++){
if(t_candid[i]->isCandidate){
len = strlen(t_candid[i]->idRes);
k = 0;
for(j=0;j<len;j++){
if(t_candid[i]->idRes[j] != ' '){
buf[j] = t_candid[i]->idRes[j];
}else{
j--;
buf[k] = t_candid[i]->idRes[j];
k++;
}else if(k > 0){
k--;
}
}
buf[len] = '\0';
buf[k] = '\0';
fprintf(output_stream,"'%s' '%c' ",buf,t_candid[i]->chain);
fflush(output_stream);
}
......
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