00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SPATIALSEARCH_H__
00023 #define SPATIALSEARCH_H__
00024
00025 #include "ResizeArray.h"
00026
00037 struct GridSearchPair {
00038 int ind1, ind2;
00039 GridSearchPair *next;
00040 };
00041
00042
00052 struct GridSearchPairlist {
00053 ResizeArray<int> *pairlist;
00054 GridSearchPairlist *next;
00055 };
00056
00058 int make_neighborlist(int **nbrlist, int xb, int yb, int zb);
00059
00063 GridSearchPair *vmd_gridsearch1(const float *pos, int n, const int *on,
00064 float dist, int allow_double_counting,
00065 int maxpairs);
00066
00073 GridSearchPair *vmd_gridsearch2(const float *pos, int natoms, const int *A,
00074 const int *B, float pairdist, int maxpairs);
00075
00082 GridSearchPair *vmd_gridsearch3(const float *posA, int natomsA, const int *A,
00083 const float *posB,int natomsB, const int *B,
00084 float pairdist, int allow_double_counting,
00085 int maxpairs);
00086
00088 void find_minmax_all(const float *pos, int n, float *min, float *max);
00089
00090
00093 int find_minmax_selected(int n, const int *flgs, const float *pos,
00094 float &_xmin, float &_ymin, float &_zmin,
00095 float &_xmax, float &_ymax, float &_zmax);
00096
00097
00099 void find_minmax(const float *pos, int n, const int *on,
00100 float *min, float *max, int *oncount);
00101
00102
00104 void find_within(const float *xyz, int *flgs, const int *others,
00105 int num, float r);
00106
00107 #endif