00001 00002 /* 00003 COPYRIGHT DISCLAIMER 00004 00005 Vincent Le Guilloux, Peter Schmidtke and Pierre Tuffery, hereby 00006 disclaim all copyright interest in the program “fpocket” (which 00007 performs protein cavity detection) written by Vincent Le Guilloux and Peter 00008 Schmidtke. 00009 00010 Vincent Le Guilloux 28 November 2008 00011 Peter Schmidtke 28 November 2008 00012 Pierre Tuffery 28 November 2008 00013 00014 GNU GPL 00015 00016 This file is part of the fpocket package. 00017 00018 fpocket is free software: you can redistribute it and/or modify 00019 it under the terms of the GNU General Public License as published by 00020 the Free Software Foundation, either version 3 of the License, or 00021 (at your option) any later version. 00022 00023 fpocket is distributed in the hope that it will be useful, 00024 but WITHOUT ANY WARRANTY; without even the implied warranty of 00025 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00026 GNU General Public License for more details. 00027 00028 You should have received a copy of the GNU General Public License 00029 along with fpocket. If not, see <http://www.gnu.org/licenses/>. 00030 00031 **/ 00032 00033 #ifndef DH_SORT 00034 #define DH_SORT 00035 00036 /* ------------------------------INCLUDES-------------------------------------*/ 00037 00038 #include <math.h> 00039 #include <stdio.h> 00040 #include <stdlib.h> 00041 #include <string.h> 00042 #include <ctype.h> 00043 #include <time.h> 00044 00045 #include "rpdb.h" 00046 #include "voronoi.h" 00047 00048 #include "memhandler.h" 00049 00050 /* ---------------------------------MACROS------------------------------------*/ 00051 00052 #define M_ATOM_TYPE 0 00053 #define M_VERTICE_TYPE 1 00054 00055 #define M_SORT_X 1 00056 #define M_SORT_Y 2 00057 #define M_SORT_Z 3 00058 00059 /* ------------------------------------STRUCTURES-----------------------------*/ 00060 /** 00061 A vector (here it will be either atoms or vertices) 00062 */ 00063 typedef struct s_vect_elem 00064 { 00065 void *data ; /**< Pointer to data */ 00066 int type ; /**< Type of data (either s_atm or s_vvertice) */ 00067 00068 } s_vect_elem ; 00069 00070 /** 00071 A list of vector (basicly this structure contains atoms and vertices) 00072 */ 00073 typedef struct s_vsort 00074 { 00075 s_vect_elem *xsort ; /**< Elements sorted by x coord */ 00076 int nelem ; /**< Number of elements */ 00077 00078 } s_vsort ; 00079 00080 00081 /* --------------------------------PROTOTYPES---------------------------------*/ 00082 00083 s_vsort* get_sorted_list(s_atm **atoms, int natms, s_vvertice **pvert, int nvert) ; 00084 void print_sorted_lst(s_vsort *lsort, FILE *buf) ; 00085 void free_s_vsort(s_vsort *lsort) ; 00086 00087 #endif