#include "../headers/fpocket.h"
Go to the source code of this file.
Functions | |
c_lst_pockets * | search_pocket (s_pdb *pdb, s_fparams *params, s_pdb *pdb_w_lig) |
c_lst_pockets* search_pocket | ( | s_pdb * | pdb, | |
s_fparams * | params, | |||
s_pdb * | pdb_w_lig | |||
) |
## FUNCTION: pockets search_pocket
## SPECIFICATION: This function will call all functions needed for the pocket finding algorith and will return the list of pockets found on the protein.
## PARAMETRES: @ s_pdb *pdb : The pdb data of the protein to handle. @ s_fparams : Parameters of the algorithm
## RETURN: A chained list of pockets found, sorted according to the current critera (the default is a scoring function)
Definition at line 82 of file fpocket.c.
References s_fparams::asph_max_size, s_fparams::asph_min_size, clusterPockets(), dropSmallNpolarPockets(), load_vvertices(), M_SCORE_SORT_FUNCT, s_fparams::min_apol_neigh, pck_final_clust(), refinePockets(), reIndexPockets(), set_pockets_descriptors(), sort_pockets(), and c_lst_pockets::vertices.
Referenced by check_fpocket(), desc_pocket(), get_actual_pocket(), mdprocess_pdb(), process_pdb(), and test_set().
00083 { 00084 /* 00085 clock_t b, e ; 00086 time_t bt, et ; 00087 */ 00088 c_lst_pockets *pockets = NULL ; 00089 00090 /* Calculate and read voronoi vertices comming from qhull */ 00091 /* 00092 fprintf(stdout,"========= fpocket algorithm begins =========\n") ; 00093 00094 fprintf(stdout, "> Calculating vertices ...\n"); 00095 00096 bt = time(NULL) ; 00097 */ 00098 s_lst_vvertice *lvert = load_vvertices(pdb, params->min_apol_neigh, 00099 params->asph_min_size, 00100 params->asph_max_size) ; 00101 /* 00102 et = time(NULL) ; 00103 fprintf(stdout, "> Vertices successfully calculated in apox. %f sec.\n", 00104 (float) (et-bt)) ; 00105 */ 00106 00107 if(lvert == NULL) { 00108 fprintf(stderr, "! Vertice calculation failed!\n"); 00109 return NULL ; 00110 } 00111 /* First clustering */ 00112 /* fprintf(stdout,"> Basic clustering ...\n"); 00113 00114 b = clock() ; 00115 */ 00116 pockets = clusterPockets(lvert, params); 00117 00118 00119 if(pockets) { 00120 pockets->vertices = lvert ; 00121 /* 00122 e = clock() ; 00123 fprintf(stdout, "> Clustering OK in %f sec.\n", 00124 ((double)e - b) / CLOCKS_PER_SEC) ; 00125 */ 00126 00127 /* Clustering refinment */ 00128 00129 /* 00130 b = clock() ; 00131 fprintf(stdout,"> Cluster refinment steps: \n"); 00132 */ 00133 reIndexPockets(pockets) ; 00134 00135 /* 00136 drop_tiny(pockets) ; 00137 reIndexPockets(pockets) ; 00138 */ 00139 00140 /* 00141 fprintf(stdout,"\t* 2nd refinment step -> clustering : based on barycenters...\n"); 00142 */ 00143 refinePockets(pockets, params) ; /* Refine clustering (rapid) */ 00144 reIndexPockets(pockets) ; 00145 00146 /* 00147 fprintf(stdout,"\t* 3rd refinment step -> single linkage clusturing...\n"); 00148 */ 00149 pck_final_clust(pockets, params,pdb,pdb_w_lig); /* Single Linkage Clustering */ 00150 reIndexPockets(pockets) ; 00151 00152 /* Descriptors calculation */ 00153 /* 00154 fprintf(stdout,"> Calculating descriptors and score...\n"); 00155 b = clock() ; 00156 */ 00157 00158 set_pockets_descriptors(pockets,pdb,params,pdb_w_lig); 00159 00160 /* 00161 e = clock() ; 00162 fprintf(stdout, "> Descriptors found in %f sec.\n", ((double)e - b) / CLOCKS_PER_SEC) ; 00163 00164 fprintf(stdout,"> 4th refinment step -> dropping small and polar pockets...\n"); 00165 */ 00166 00167 /* Drop small and too polar binding pockets */ 00168 dropSmallNpolarPockets(pockets, params); 00169 reIndexPockets(pockets) ; 00170 /* 00171 e = clock() ; 00172 fprintf(stdout, "> Refinment OK in %f sec.\n", ((double)e - b) / CLOCKS_PER_SEC) ; 00173 */ 00174 00175 /* Sorting pockets */ 00176 sort_pockets(pockets, M_SCORE_SORT_FUNCT) ; 00177 /*sort_pockets(pockets, M_NASPH_SORT_FUNCT) ;*/ 00178 00179 reIndexPockets(pockets) ; 00180 /* 00181 fprintf(stdout,"===== fpocket algorithm ends =====\n"); 00182 */ 00183 } 00184 00185 return pockets ; 00186 }