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

BondSearch.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 "VMDThreads.h"
#include <ctype.h>
#include <string.h>

Go to the source code of this file.

Compounds

struct  bondsearchthrparms

Functions

GridSearchPairlistvmd_gridsearch_bonds (const float *pos, const float *radii, int natoms, float pairdist, 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. This is the same code as gridsearch1(), but simplified and hopefully a bit faster. More...

void * bondsearchthread (void *)
int vmd_bondsearch_thr (const float *pos, const float *radii, GridSearchPairlist *head, int totb, int **boxatom, int *numinbox, int **nbrlist, int maxpairs, float pairdist)
 Multithreaded bond search worker routine handles spawning and joining all of the worker threads, and merging their results into a single list. More...

int vmd_bond_search (BaseMolecule *mol, const Timestep *ts, float cutoff, int dupcheck)
 Compute bonds for the molecule using the given timestep (which must not be NULL) and adds them to the given molecule. Return success. The code currently calls gridsearch1 with a pairlist limit of 27 * natoms, which should easily be sufficient for any real structure. More...


Function Documentation

void * bondsearchthread void *    [static]
 

Definition at line 254 of file BondSearch.C.

References ResizeArray::append, bondsearchthrparms::boxatom, bondsearchthrparms::head, bondsearchthrparms::maxpairs, msg_timer_create, msg_timer_destroy, msg_timer_timeout, bondsearchthrparms::nbrlist, GridSearchPairlist::next, NULL, bondsearchthrparms::numinbox, bondsearchthrparms::pairdist, GridSearchPairlist::pairlist, bondsearchthrparms::pairlistmutex, bondsearchthrparms::pos, bondsearchthrparms::radii, bondsearchthrparms::threadcount, bondsearchthrparms::threadid, bondsearchthrparms::totb, vmd_mutex_lock, vmd_mutex_t, and vmd_mutex_unlock.

Referenced by vmd_bondsearch_thr.

int vmd_bond_search BaseMolecule   mol,
const Timestep   ts,
float    cutoff,
int    dupcheck
 

Compute bonds for the molecule using the given timestep (which must not be NULL) and adds them to the given molecule. Return success. The code currently calls gridsearch1 with a pairlist limit of 27 * natoms, which should easily be sufficient for any real structure.

Definition at line 352 of file BondSearch.C.

References BaseMolecule::add_bond, BaseMolecule::add_bond_dupcheck, MolAtom::altlocindex, BaseMolecule::altlocNames, BaseMolecule::atom, ATOMHYDROGEN, BaseMolecule::atomNames, MolAtom::atomType, IS_HYDROGEN, NameList< int >::name, MolAtom::nameindex, BaseMolecule::nAtoms, GridSearchPairlist::next, NULL, ResizeArray< int >::num, GridSearchPairlist::pairlist, Timestep::pos, BaseMolecule::radius, and vmd_gridsearch_bonds.

int vmd_bondsearch_thr const float *    pos,
const float *    radii,
GridSearchPairlist   head,
int    totb,
int **    boxatom,
int   numinbox,
int **    nbrlist,
int    maxpairs,
float    pairdist
 

Multithreaded bond search worker routine handles spawning and joining all of the worker threads, and merging their results into a single list.

Definition at line 189 of file BondSearch.C.

References bondsearchthread, bondsearchthrparms::boxatom, bondsearchthrparms::head, bondsearchthrparms::maxpairs, bondsearchthrparms::nbrlist, GridSearchPairlist::next, NULL, bondsearchthrparms::numinbox, bondsearchthrparms::pairdist, bondsearchthrparms::pairlistmutex, bondsearchthrparms::pos, bondsearchthrparms::radii, bondsearchthrparms::threadcount, bondsearchthrparms::threadid, bondsearchthrparms::totb, vmd_mutex_destroy, vmd_mutex_init, vmd_mutex_t, vmd_thread_create, vmd_thread_join, vmd_thread_numprocessors, and vmd_thread_t.

GridSearchPairlist* vmd_gridsearch_bonds const float *    pos,
const float *    radii,
int    natoms,
float    pairdist,
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. This is the same code as gridsearch1(), but simplified and hopefully a bit faster.

Definition at line 36 of file BondSearch.C.

References find_minmax_all, make_neighborlist, GridSearchPairlist::next, NULL, num, vec_sub, and vmd_bondsearch_thr.


Generated on Thu Jul 24 01:27:45 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002