QNANO
Coulomb_NN_Storage.h
1 #ifndef QNANO_NEW_COULOMB_NN_STORAGE_DEFINED_H
2 #define QNANO_NEW_COULOMB_NN_STORAGE_DEFINED_H
3 
4 #include "tools/Tensor4.h"
5 #include "tools/Reader.h"
6 #include "structure/Bond_Type.h"
7 #include "orbitals/Select_Orbitals_List.h"
8 
10 public:
11 
12  //Constructors and copy
13  void copy(const Coulomb_NN_Storage_Entry &other){
14  Tensor4::copy(other);
15  Bond_Type::copy(other);
16  //orbs=other.orbs;
17  }
18  Coulomb_NN_Storage_Entry &operator=(const Coulomb_NN_Storage_Entry &other){
19  copy(other);
20  return *this;
21  }
23  copy(other);
24  }
25  Coulomb_NN_Storage_Entry(const Lattice *l, int el0, int el1, const Vec3d &v, const Select_Orbitals_List &orblist):Bond_Type(l,el0,el1,v), Tensor4(){
26  int orb0=orblist.find_check(el0);
27  int orb1=orblist.find_check(el1);
28  Tensor4::resize(orb0,orb1,orb1,orb0);
29  }
31  }
32 };
33 class Coulomb_NN_Storage: public List_Class<Coulomb_NN_Storage_Entry>{
34 public:
35 
36  void read(const Lattice &lat, const Select_Orbitals_List &orblist, const std::string &filename);
37  int find(int element0, int element1, const Vec3d &vec, double tolerance=0.05)const;
38 
40  Coulomb_NN_Storage(const Lattice &lat, const Select_Orbitals_List &orblist, const std::string &filename){
41  read(lat, orblist, filename);
42  }
43 };
44 
45 #endif
Class to store positions and to handle operations on 3d vectors.
Definition: Vec3d.h:9
Class to store a rank-4 (complex) tensor:
Definition: Tensor4.h:9
Definition: List_Class.h:8
Definition: Coulomb_NN_Storage.h:33
Definition: Coulomb_NN_Storage.h:9
Definition: Lattice.h:36
Definition: Bond_Type.h:10
Definition: Select_Orbitals_List.h:10