Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SpatialSearch.C File Reference

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "BondSearch.h"
#include "Timestep.h"
#include "BaseMolecule.h"
#include "Molecule.h"
#include "Inform.h"
#include "WKFThreads.h"
#include "WKFUtils.h"
#include <ctype.h>
#include <string.h>

Go to the source code of this file.

Compounds

struct  AtomEntry
struct  FindWithinData

Defines

#define MAXGRIDDIM   31

Typedefs

typedef ResizeArray< AtomEntryatomlist

Functions

void add_link (GridSearchPair *link, int i, int j)
void find_minmax_all (const float *pos, int n, float *min, float *max)
 Find axis-aligned bounding box for all atoms in the list. More...

int find_minmax_selected (int n, const int *flgs, const float *pos, float &_xmin, float &_ymin, float &_zmin, float &_xmax, float &_ymax, float &_zmax)
 Find axis-aligned bounding box for selected atoms in the list Return true if minmax was found, false if all flags are zero. More...

void find_minmax (const float *pos, int n, const int *on, float *min, float *max, int *oncount)
 Find axis-aligned bounding box for selected atoms in the list. More...

int make_neighborlist (int **nbrlist, int xb, int yb, int zb)
 Build neighborlist. More...

int make_neighborlist_sym (int **nbrlist, int xb, int yb, int zb)
GridSearchPairvmd_gridsearch1 (const float *pos, int natoms, const int *on, float pairdist, int allow_double_counting, int maxpairs)
 Grid search for the case of a single set of atoms. It ignore pairs between atoms with identical coords. The maxpairs parameter is set to -1 for no-limit pairlist calculation, or a maximum value otherwise. More...

GridSearchPairvmd_gridsearch2 (const float *pos, int natoms, const int *A, const int *B, float pairdist, int maxpairs)
 Grid search for two different sets of atoms in same molecule. (will eventually be obsoleted by the faster and more useful vmd_gridsearch3). right now, is still needed by measure hbonds (until problems resolved) The maxpairs parameter is set to -1 for no-limit pairlist calculation, or a maximum value otherwise. More...

GridSearchPairvmd_gridsearch3 (const float *posA, int natomsA, const int *A, const float *posB, int natomsB, const int *B, float pairdist, int allow_double_counting, int maxpairs)
 Grid search for two different sets of atoms and/or molecules. By default, if (posA == posB), all bonds are unique. Otherwise, double-counting is allowed. This can be overridden by setting the allow_double_counting param (true=1, false=0, or default=-1). The maxpairs parameter is set to -1 for no-limit pairlist calculation, or a maximum value otherwise. More...

void * find_within_routine (void *v)
void find_within (const float *xyz, int *flgs, const int *others, int num, float r)
 Find selected atoms within a specified distance of a second set of points. More...


Define Documentation

#define MAXGRIDDIM   31
 

Definition at line 983 of file SpatialSearch.C.

Referenced by find_within.


Typedef Documentation

typedef ResizeArray<AtomEntry> atomlist
 

Definition at line 965 of file SpatialSearch.C.


Function Documentation

void add_link GridSearchPair   link,
int    i,
int    j
[static]
 

Definition at line 36 of file SpatialSearch.C.

References GridSearchPair::ind1, GridSearchPair::ind2, GridSearchPair::next, and NULL.

Referenced by vmd_gridsearch1, vmd_gridsearch2, and vmd_gridsearch3.

void find_minmax const float *    pos,
int    n,
const int *    on,
float *    min,
float *    max,
int *    oncount
 

Find axis-aligned bounding box for selected atoms in the list.

Definition at line 117 of file SpatialSearch.C.

References n, and NULL.

void find_minmax_all const float *    pos,
int    n,
float *    min,
float *    max
 

Find axis-aligned bounding box for all atoms in the list.

Definition at line 43 of file SpatialSearch.C.

References n.

int find_minmax_selected int    n,
const int *    flgs,
const float *    pos,
float &    _xmin,
float &    _ymin,
float &    _zmin,
float &    _xmax,
float &    _ymax,
float &    _zmax
 

Find axis-aligned bounding box for selected atoms in the list Return true if minmax was found, false if all flags are zero.

Definition at line 74 of file SpatialSearch.C.

References n.

void find_within const float *    xyz,
int *    flgs,
const int *    others,
int    num,
float    r
 

Find selected atoms within a specified distance of a second set of points.

Definition at line 984 of file SpatialSearch.C.

References ResizeArray< AtomEntry >::append, data, find_minmax_selected, find_within_routine, FindWithinData::flgatoms, FindWithinData::flgs, MAXGRIDDIM, FindWithinData::nthreads, NULL, num, FindWithinData::otheratoms, FindWithinData::r2, size, FindWithinData::tid, FindWithinData::totb, wkf_thread_create, wkf_thread_join, wkf_thread_numprocessors, wkf_thread_t, FindWithinData::xb, FindWithinData::xytotb, FindWithinData::xyz, FindWithinData::yb, and FindWithinData::zb.

void * find_within_routine void *    v
 

Definition at line 1121 of file SpatialSearch.C.

References data, FindWithinData::flgatoms, FindWithinData::flgs, AtomEntry::index, n, FindWithinData::nthreads, NULL, ResizeArray< AtomEntry >::num, FindWithinData::otheratoms, FindWithinData::r2, FindWithinData::tid, FindWithinData::totb, AtomEntry::x, FindWithinData::xb, FindWithinData::xytotb, AtomEntry::y, FindWithinData::yb, AtomEntry::z, and FindWithinData::zb.

Referenced by find_within.

int make_neighborlist int **    nbrlist,
int    xb,
int    yb,
int    zb
 

Build neighborlist.

Definition at line 168 of file SpatialSearch.C.

References n, and NULL.

int make_neighborlist_sym int **    nbrlist,
int    xb,
int    yb,
int    zb
[static]
 

Definition at line 216 of file SpatialSearch.C.

References n, and NULL.

Referenced by vmd_gridsearch3.

GridSearchPair* vmd_gridsearch1 const float *    pos,
int    natoms,
const int *    on,
float    pairdist,
int    allow_double_counting,
int    maxpairs
 

Grid search for the case of a single set of atoms. It ignore pairs between atoms with identical coords. The maxpairs parameter is set to -1 for no-limit pairlist calculation, or a maximum value otherwise.

Definition at line 273 of file SpatialSearch.C.

References add_link, distance2, find_minmax, make_neighborlist, GridSearchPair::next, NULL, num, vec_sub, wkf_msg_timer_create, wkf_msg_timer_destroy, and wkf_msg_timer_timeout.

GridSearchPair* vmd_gridsearch2 const float *    pos,
int    natoms,
const int *    A,
const int *    B,
float    pairdist,
int    maxpairs
 

Grid search for two different sets of atoms in same molecule. (will eventually be obsoleted by the faster and more useful vmd_gridsearch3). right now, is still needed by measure hbonds (until problems resolved) The maxpairs parameter is set to -1 for no-limit pairlist calculation, or a maximum value otherwise.

Definition at line 476 of file SpatialSearch.C.

References add_link, distance2, find_minmax, make_neighborlist, GridSearchPair::next, NULL, num, and vec_sub.

GridSearchPair* vmd_gridsearch3 const float *    posA,
int    natomsA,
const int *    A,
const float *    posB,
int    natomsB,
const int *    B,
float    pairdist,
int    allow_double_counting,
int    maxpairs
 

Grid search for two different sets of atoms and/or molecules. By default, if (posA == posB), all bonds are unique. Otherwise, double-counting is allowed. This can be overridden by setting the allow_double_counting param (true=1, false=0, or default=-1). The maxpairs parameter is set to -1 for no-limit pairlist calculation, or a maximum value otherwise.

Definition at line 684 of file SpatialSearch.C.

References add_link, distance2, find_minmax, make_neighborlist_sym, GridSearchPair::next, NULL, num, vec_sub, and vmd_gridsearch1.


Generated on Sun Nov 3 02:46:15 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002