00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef DH_POCKET
00034 #define DH_POCKET
00035
00036
00037
00038
00039 #define MAX_CON_DIST 2.5
00040
00041 #define M_LIG_IN_POCKET_DIST 4.0
00042
00043
00044 #include <math.h>
00045 #include <stdio.h>
00046 #include <stdlib.h>
00047
00048 #include "voronoi_lst.h"
00049 #include "pscoring.h"
00050 #include "fparams.h"
00051 #include "aa.h"
00052
00053 #include "utils.h"
00054 #include "memhandler.h"
00055
00056
00057
00058
00059 typedef struct s_pocket
00060 {
00061 s_desc *pdesc ;
00062
00063 c_lst_vertices *v_lst ;
00064 float score,
00065 ovlp,
00066 ovlp2,
00067 vol_corresp,
00068 bary[3] ;
00069
00070 int rank,
00071 size,
00072 nAlphaApol,
00073 nAlphaPol ;
00074
00075 } s_pocket ;
00076
00077
00078 typedef struct node_pocket
00079 {
00080 struct node_pocket *next ;
00081 struct node_pocket *prev ;
00082 s_pocket *pocket ;
00083
00084 } node_pocket ;
00085
00086
00087 typedef struct c_lst_pockets
00088 {
00089 struct node_pocket *first ;
00090 struct node_pocket *last ;
00091 struct node_pocket *current ;
00092 size_t n_pockets ;
00093
00094 s_lst_vvertice *vertices ;
00095
00096 } c_lst_pockets ;
00097
00098
00099
00100
00101
00102
00103 c_lst_pockets *clusterPockets(s_lst_vvertice *lvvert, s_fparams *params);
00104 int updateIds(s_lst_vvertice *lvvert, int i, int *vNb, int resid,int curPocket,c_lst_pockets *pockets, s_fparams *params);
00105 void addStats(int resid, int size, int **stats,int *lenStats);
00106
00107
00108 void set_pockets_descriptors(c_lst_pockets *pockets,s_pdb *pdb,s_fparams *params, s_pdb *pdb_w_lig) ;
00109 void set_normalized_descriptors(c_lst_pockets *pockets) ;
00110 void set_pockets_bary(c_lst_pockets *pockets) ;
00111 s_atm** get_pocket_contacted_atms(s_pocket *pocket, int *natoms) ;
00112 int count_pocket_contacted_atms(s_pocket *pocket) ;
00113 s_vvertice** get_pocket_pvertices(s_pocket *pocket) ;
00114 void set_pocket_contacted_lig_name(s_pocket *pocket, s_pdb *pdb_w_lig);
00115
00116 float set_pocket_mtvolume(s_pocket *pocket, int niter) ;
00117 float set_pocket_volume(s_pocket *pocket, int discret) ;
00118
00119
00120
00121 s_pocket* alloc_pocket(void) ;
00122 c_lst_pockets *c_lst_pockets_alloc(void);
00123 node_pocket *node_pocket_alloc(s_pocket *pocket);
00124 void c_lst_pocket_free(c_lst_pockets *lst);
00125
00126 node_pocket *c_lst_pockets_add_first(c_lst_pockets *lst, s_pocket *pocket);
00127 node_pocket *c_lst_pockets_add_last(c_lst_pockets *lst,s_pocket *pocket,int cur_n_apol, int cur_n_pol);
00128 void swap_pockets(c_lst_pockets *pockets, node_pocket *p1, node_pocket *p2) ;
00129 void dropPocket(c_lst_pockets *pockets,node_pocket *pocket);
00130 void mergePockets(node_pocket *pocket,node_pocket *pocket2,c_lst_pockets *pockets);
00131 node_pocket *searchPocket(int resid,c_lst_pockets *pockets);
00132
00133
00134 void reset_pocket(s_pocket *pocket) ;
00135 void print_pocket(FILE *f, s_pocket *pocket);
00136 void print_pockets(FILE *f, c_lst_pockets *pockets) ;
00137 void print_pockets_inv(FILE *f, c_lst_pockets *pockets) ;
00138
00139
00140 #endif