Gromacs  2025-dev-20241002-88a4191
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
#include "gmxpre.h"
#include "gromacs/selection/nbsearch.h"
#include <cmath>
#include <cstring>
#include <algorithm>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
#include "gromacs/math/functions.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/selection/position.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/classhelpers.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/listoflists.h"
#include "gromacs/utility/real.h"
#include "gromacs/utility/stringutil.h"
+ Include dependency graph for nbsearch.cpp:

Description

Implements neighborhood searching for analysis (from nbsearch.h).

High-level overview of the algorithm is at Neighborhood search for analysis tools.

Todo:
The grid implementation could still be optimized in several different ways:
  • A better heuristic for selecting the grid size or falling back to a simple all-pairs search.
  • A multi-level grid implementation could be used to be able to use small grids for short cutoffs with very inhomogeneous particle distributions without a memory cost.
Author
Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com

Classes

class  gmx::anonymous_namespace{nbsearch.cpp}::MindistAction
 Search action find the minimum distance. More...
 

Functions

void gmx::anonymous_namespace{nbsearch.cpp}::computeBoundingBox (int posCount, const rvec x[], rvec origin, rvec size)
 Computes the bounding box for a set of positions. More...
 
bool gmx::anonymous_namespace{nbsearch.cpp}::withinAction (int, real, const rvec)
 Search action to find the next neighbor. More...