QNANO
Neighborhood_Criterion.h
1 #ifndef QNANO_NEW_NEIGHBORHOOD_CRITERION_DEFINED_H
2 #define QNANO_NEW_NEIGHBORHOOD_CRITERION_DEFINED_H
3 
4 #include "structure/Atom.h"
5 
7 public:
8 
9  virtual bool is_neighbor(const Atom &a1, const Atom &a2) const =0;
10  bool operator() (const Atom &a1, const Atom &a2) const {return is_neighbor(a1,a2);}
11 
12  virtual double upper_bound_radius() const=0;
13 };
14 
16 public:
17  double distance;
18 
19  Neighborhood_Criterion_Distance(double distance_) :distance(distance_){
20  }
21 
22  virtual bool is_neighbor(const Atom &a1, const Atom &a2) const{
23  if(dist(a1,a2)<distance)return true;
24  else return false;
25  }
26  virtual double upper_bound_radius() const{ return distance;}
27 
28 };
29 
30 
31 #endif
Definition: Neighborhood_Criterion.h:15
Definition: Atom.h:6
Definition: Neighborhood_Criterion.h:6