#include "../headers/fpout.h"
Go to the source code of this file.
Functions | |
void | write_out_fpocket (c_lst_pockets *pockets, s_pdb *pdb, char *pdbname) |
void | write_out_fpocket_DB (c_lst_pockets *pockets, s_pdb *pdb, char *input_name) |
void | write_descriptors_DB (c_lst_pockets *pockets, FILE *f) |
void write_descriptors_DB | ( | c_lst_pockets * | pockets, | |
FILE * | f | |||
) |
Definition at line 212 of file fpout.c.
References s_desc::aa_compo, s_desc::characterChain1, s_desc::characterChain2, s_desc::charge_score, s_desc::drug_score, c_lst_pockets::first, s_desc::flex, s_desc::hydrophobicity_score, s_desc::interChain, s_desc::ligTag, s_desc::masph_sacc, s_desc::mean_asph_ray, s_desc::mean_loc_hyd_dens, s_desc::n_abpa, s_pocket::nAlphaApol, s_desc::nameChain1, s_desc::nameChain2, s_desc::nb_asph, node_pocket::next, s_desc::numResChain1, s_desc::numResChain2, s_pocket::pdesc, node_pocket::pocket, s_desc::polarity_score, s_desc::surf_apol_vdw14, s_desc::surf_apol_vdw22, s_desc::surf_pol_vdw14, s_desc::surf_pol_vdw22, and s_desc::volume_score.
Referenced by process_pdb().
00212 { 00213 00214 /*Todo adapt things here*/ 00215 00216 int n=1; 00217 s_pocket *p; 00218 node_pocket *npcur; 00219 npcur=pockets->first; 00220 int r=1,i; 00221 fprintf(f,"cav_id drug_score nb_asph inter_chain apol_asph_proportion mean_asph_radius " 00222 "mean_asph_solv_acc mean_loc_hyd_dens flex hydrophobicity_score volume_score charge_score " 00223 "polarity_score a0_apol a0_pol af_apol af_pol n_abpa " 00224 "ala cys asp glu phe gly his ile lys ley met asn pro gln arg ser thr val trp tyr " 00225 "chain_1_type chain_2_type num_res_chain_1 " 00226 "num_res_chain_2 lig_het_tag name_chain_1 name_chain_2\n"); 00227 while(npcur){ 00228 p=npcur->pocket; 00229 // python counter part entry={"pdb_id":pdbFile,"cav_id":int(r[0]),"drug_score":r[1],"nb_asph":int(r[2]),"inter_chain":int(r[3]),"apol_asph_proportion": 00230 //float(r[4]),"mean_asph_radius":float(r[5]),"mean_asph_solv_acc":float(r[6]),"mean_loc_hyd_dens":float(r[7]),"flex":r[8],"hydrophobicity_score":float(r[9]), 00231 //"volume_score":float(r[10]),"charge_score":int(r[11]),"polarity_score":int(r[12]),"a0_apol":float(r[13]),"a0_pol":float(r[14]),"af_apol":float(r[15]), 00232 //"af_pol":float(r[16]),"n_abpa":int(r[17]),"ala":int(r[18]),"cys":int(r[19]),"asp":int(r[20]),"glu":int(r[21]),"phe":int(r[22]),"gly":int(r[23]), 00233 //"his":int(r[24]),"ile":int(r[25]),"lys":int(r[26]),"leu":int(r[27]),"met":int(r[28]),"asn":int(r[29]),"pro":int(r[30]),"gln":int(r[31]),"arg":int(r[32]), 00234 //"ser":int(r[33]),"thr":int(r[34]),"val":int(r[35]),"trp":int(r[36]),"tyr":int(r[37])} 00235 //entry={"pdb_id":pdbFile,"cav_id":int(r[0]),"chain_1_type":int(r[38]), "chain_2_type":int(r[39]), "num_res_chain_1":int(r[40]),"num_res_chain_2":int(r[41])} 00236 // entry={"pdb_id":pdbFile,"cav_id":int(r[0]),"lig_het_tag":str(r[42])} 00237 fprintf(f,"%d %.4f %d %d %.4f %.4f",r,p->pdesc->drug_score,\ 00238 p->pdesc->nb_asph,p->pdesc->interChain,(float)p->nAlphaApol/(float)p->pdesc->nb_asph,p->pdesc->mean_asph_ray); 00239 fprintf(f," %.4f %.4f %.4f %.4f %.4f %d",p->pdesc->masph_sacc,p->pdesc->mean_loc_hyd_dens,p->pdesc->flex,p->pdesc->hydrophobicity_score,\ 00240 p->pdesc->volume_score,p->pdesc->charge_score); 00241 fprintf(f," %d %.4f %.4f %.4f %.4f %d",p->pdesc->polarity_score,p->pdesc->surf_apol_vdw14,p->pdesc->surf_pol_vdw14,\ 00242 p->pdesc->surf_apol_vdw22,p->pdesc->surf_pol_vdw22,p->pdesc->n_abpa); 00243 for(i = 0 ; i < 20 ; i++) fprintf(f, " %d", p->pdesc->aa_compo[i]) ; 00244 fprintf(f," %d %d %d %d %s %s %s",p->pdesc->characterChain1, p->pdesc->characterChain2, p->pdesc->numResChain1, p->pdesc->numResChain2, p->pdesc->ligTag, p->pdesc->nameChain1, p->pdesc->nameChain2); 00245 //fprintf(f,"%s %s %s",p->pdesc->nameChain1,p->pdesc->nameChain2); 00246 fprintf(f,"\n"); 00247 fflush(f); 00248 00249 00250 00251 00252 /* sprintf(filename,"pocket_%d.txt",n); 00253 f=fopen(filename,"w"); 00254 fprintf(f,"probe apolar_surface polar_surface\n"); 00255 00256 int i; 00257 for(i=0;i<l;i++){ 00258 fprintf(f,"%.3f %.3f %.3f\n",p->probe_size[i], p->apol_asa_probe[i],p->pol_asa_probe[i]); 00259 } 00260 fclose(f);*/ 00261 npcur=npcur->next; 00262 n++; 00263 r++; 00264 } 00265 00266 }
void write_out_fpocket | ( | c_lst_pockets * | pockets, | |
s_pdb * | pdb, | |||
char * | pdbname | |||
) |
## FUNCTION: write_out_fpocket
## SPECIFICATION: Output routine. See the documentation for more information.
## PARAMETRES: @ c_lst_pockets *pockets : All pockets found and kept. @ c_lst_pockets *pockets : The (input) pdb structure @ char *pdbname : Name of the pdb
## RETURN: void
Definition at line 79 of file fpout.c.
References extract_path(), remove_ext(), remove_path(), write_each_pocket(), write_pockets_single_pdb(), write_pockets_single_pqr(), and write_visualization().
Referenced by check_fpocket(), process_pdb(), and test_set().
00080 { 00081 char pdb_code[350] = "" ; 00082 char pdb_path[350] = "" ; 00083 char out_path[350] = "" ; 00084 char pdb_out_path[350] = "" ; 00085 char fout[350] = "" ; 00086 char command[370] = "" ; 00087 int status ; 00088 00089 if(pockets) { 00090 /* Extract path, pdb code... */ 00091 strcpy(pdb_code, pdbname) ; 00092 extract_path(pdbname, pdb_path) ; 00093 remove_ext(pdb_code) ; 00094 remove_path(pdb_code) ; 00095 00096 if(strlen(pdb_path) > 0) sprintf(out_path, "%s/%s_out", pdb_path, pdb_code) ; 00097 else sprintf(out_path, "%s_out", pdb_code) ; 00098 00099 sprintf(command, "mkdir %s", out_path) ; 00100 status = system(command) ; 00101 /*if(status != 0) { 00102 return ; 00103 }*/ 00104 00105 sprintf(out_path, "%s/%s", out_path, pdb_code) ; 00106 sprintf(pdb_out_path, "%s_out.pdb", out_path) ; 00107 00108 /* Write vmd and pymol scripts */ 00109 sprintf(fout, "%s_out.pdb", pdb_code) ; 00110 write_visualization(out_path, fout); 00111 00112 /* Writing full pdb */ 00113 sprintf(pdb_out_path, "%s_out.pdb", out_path) ; 00114 00115 write_pockets_single_pdb(pdb_out_path, pdb, pockets) ; 00116 00117 /* Writing pockets as a single pqr */ 00118 sprintf(fout, "%s_pockets.pqr", out_path) ; 00119 write_pockets_single_pqr(fout, pockets) ; 00120 00121 /* Writing individual pockets pqr */ 00122 if(strlen(pdb_path) > 0) sprintf(out_path, "%s/%s_out", pdb_path, pdb_code) ; 00123 else sprintf(out_path, "%s_out", pdb_code) ; 00124 00125 sprintf(out_path, "%s/pockets", out_path) ; 00126 sprintf(command, "mkdir %s", out_path) ; 00127 status = system(command) ; 00128 /*if(status != 0) { 00129 return ; 00130 }*/ 00131 00132 write_each_pocket(out_path, pockets) ; 00133 } 00134 }
void write_out_fpocket_DB | ( | c_lst_pockets * | pockets, | |
s_pdb * | pdb, | |||
char * | input_name | |||
) |
----------------------------------------------------------------------------- ## FUNCTION: void write_out(c_lst_pockets *pockets) ----------------------------------------------------------------------------- ## SPECIFICATION: Output routine. -----------------------------------------------------------------------------
Definition at line 145 of file fpout.c.
References extract_path(), remove_ext(), remove_path(), and write_each_pocket_for_DB().
Referenced by process_pdb().
00146 { 00147 char pdb_code[350] = "" ; 00148 char pdb_path[350] = "" ; 00149 char out_path[350] = "" ; 00150 char pdb_out_path[350] = "" ; 00151 char command[370] = "" ; 00152 00153 if(pockets) { 00154 // Extract path, pdb code... 00155 strcpy(pdb_code, input_name) ; 00156 extract_path(input_name, pdb_path) ; 00157 remove_ext(pdb_code) ; 00158 remove_path(pdb_code) ; 00159 /*sprintf(out_path, "%s/%s_out", pdb_path, pdb_code) ;*/ 00160 if(strlen(pdb_path) > 0) sprintf(out_path, "%s/%s_out", pdb_path, pdb_code) ; 00161 else sprintf(out_path, "%s_out", pdb_code) ; 00162 sprintf(command, "mkdir %s", out_path) ; 00163 system(command) ; 00164 /* 00165 sprintf(out_path, "%s/%s_out/%s", pdb_path, pdb_code, pdb_code) ; 00166 sprintf(pdb_out_path, "%s_out.pdb", out_path) ; 00167 */ 00168 //Write vmd and pymol scripts 00169 /* 00170 sprintf(fout, "%s_out.pdb", pdb_code) ; 00171 write_visualization(out_path, fout); 00172 // Print the whole pockets informations in a single file 00173 */ 00174 /*sprintf(fout, "%s_pockets.info", out_path) ; 00175 FILE *f = fopen(fout, "w") ; 00176 if(f) { 00177 print_pockets(f, pockets) ; 00178 fclose(f) ; 00179 } 00180 */ 00181 // Writing full pdb 00182 sprintf(pdb_out_path, "%s_out.pdb", out_path) ; 00183 00184 //write_pockets_single_pdb(pdb_out_path, pdb, pockets) ; 00185 00186 // Writing topology clusters 00187 /* sprintf(pdb_out_path, "%s_topo_connect.pdb", out_path) ; 00188 00189 write_topology_pdb(pdb_out_path,pockets) ;*/ 00190 // Writing pockets as a single pqr 00191 /*sprintf(fout, "%s_pockets.pqr", out_path) ; 00192 write_pockets_single_pqr(fout, pockets) ;*/ 00193 00194 // Writing pocket distance matrix to a file 00195 // sprintf(fout, "%s_dist_mat.txt", out_path) ; 00196 00197 00198 // Writing individual pockets pqr 00199 00200 /* sprintf(out_path, "%s/%s_out/", pdb_path, pdb_code) ; 00201 sprintf(command, "mkdir %s", out_path) ; 00202 system(command) ;*/ 00203 00204 write_each_pocket_for_DB(out_path, pockets,pdb) ; 00205 //write_each_matrix(out_path,pockets); 00206 } 00207 }