QNANO
Bond_Type.h
1 #ifndef QNANO_NEW_BOND_TYPE_DEFINED_H
2 #define QNANO_NEW_BOND_TYPE_DEFINED_H
3 #include "structure/Lattice.h"
4 
10 class Bond_Type{
11 public:
12  int element[2];
13  std::pair<int, int> indices;
14  const Lattice *lat;
15 
16  bool was_set_up()const{
17  return lat!=NULL;
18  }
19  const Vec3d &get_D()const{
20  return lat->list[indices.first][indices.second].D;
21  }
22 
23  void calculate_from_vector(const Lattice *l, int el0, int el1, const Vec3d &v);
24 
25 
26  void copy(const Bond_Type &other){
27  element[0]=other.element[0];
28  element[1]=other.element[1];
29  indices=other.indices;
30  lat=other.lat;
31  }
32  Bond_Type(){
33  lat=NULL;
34  }
35  Bond_Type(const Lattice *l, int el0, int el1, const Vec3d &v){
36  calculate_from_vector(l,el0,el1,v);
37  }
38 };
39 
40 #endif
Class to store positions and to handle operations on 3d vectors.
Definition: Vec3d.h:9
Definition: Lattice.h:36
Definition: Bond_Type.h:10