#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 | bondsearchthrparms |
Functions | |
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. 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... |
|
|
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 373 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. |
|
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 210 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, wkf_mutex_destroy, wkf_mutex_init, wkf_mutex_t, wkf_thread_create, wkf_thread_join, wkf_thread_numprocessors, and wkf_thread_t. |
|
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 37 of file BondSearch.C. References find_minmax_all, make_neighborlist, minmax_3fv_aligned, GridSearchPairlist::next, NULL, num, vec_sub, and vmd_bondsearch_thr. |