1 #ifndef QNANO_NEW_NEIGHBORHOOD_CRITERION_VDW_DEFINED_H 2 #define QNANO_NEW_NEIGHBORHOOD_CRITERION_VDW_DEFINED_H 4 #include "structure/Neighborhood_Criterion.h" 12 : distance(distance_), tolerance(tolerance_){
15 virtual bool is_neighbor(
const Atom &a1,
const Atom &a2)
const{
16 Vec3d pos1(a1.pos[0], a1.pos[1], a1.pos[2]+distance);
17 Vec3d pos2(a1.pos[0], a1.pos[1], a1.pos[2]-distance);
18 if( dist(pos1,a2.pos)<distance*tolerance)
return true;
19 else if(dist(pos2,a2.pos)<distance*tolerance)
return true;
22 virtual double upper_bound_radius()
const{
return distance*(1+tolerance);}
Class to store positions and to handle operations on 3d vectors.
Definition: Vec3d.h:9
Definition: Neighborhood_Criterion.h:6
Definition: Neighborhood_Criterion_vdW.h:6