QNANO
TB_Parameter.h
1 #ifndef QNANO_NEW_TB_PARAMETER_DEFINED_H
2 #define QNANO_NEW_TB_PARAMETER_DEFINED_H
3 
4 #include <iostream>
5 #include <iomanip>
6 #include <fstream>
7 #include <string>
8 #include <cstdlib>
9 
10 #include "structure/Lattice.h"
11 
13 public:
14  int element[2];
15 
16  double lattice_constant[3];
17  Lattice lat;
18  std::string latticefile;
19 
20  static const int TBPARAM_PARVEC_SIZE=(13*2+7+6*2+4+7*2+7+3*2);
21  union {
22  double parvec[TBPARAM_PARVEC_SIZE];
23  struct{
24  double E_s[2],E_p[2],E_pz[2],E_sstar[2],E_d[2],Delta_so[2];
25  double T_sp[2], T_ssstar[2], T_psstar[2];
26  double T_sd[2], T_pd_sigma[2],T_pd_pi[2], T_dsstar[2];
27 
28  double T_ss, T_sstarsstar;
29  double T_pp_sigma,T_pp_pi;
30  double T_dd_sigma,T_dd_pi,T_dd_delta;
31 
32  double C_sp[2], C_ssstar[2], C_psstar[2];
33  double C_sd[2], C_pd[2], C_dsstar[2];
34  double C_ss, C_pp;
35  double C_sstarsstar, C_dd;
36 
37  double N_sp[2], N_ssstar[2],N_psstar[2];
38  double N_sd[2], N_pd_sigma[2],N_pd_pi[2];
39  double N_dsstar[2];
40 
41  double N_ss, N_sstarsstar;
42  double N_pp_sigma,N_pp_pi;
43  double N_dd_sigma,N_dd_pi,N_dd_delta;
44 
45  double E_strain_shift[2], Surface_shift[2];
46  double C_diag[2];
47  };
48  };
49 
50  int type_from_element(const int el)const;
51 
52  void read(const std::string &res_dir, const std::string &filename);
53 
54  void print(const std::string &filename) const;
55 
56  void setNZero();
57  void setCZero();
58 
59  bool check_symmetry()const;
60 
61  void initialize();
62 
63  TB_Parameter(){
64  initialize();
65  }
66  TB_Parameter(const std::string &res_dir, const std::string &filename){
67  initialize();
68  read(res_dir, filename);
69  }
70 
71 // static TB_Parameter get_analytic();
72 
73 };
74 
75 TB_Parameter get_effective_strained_param(TB_Parameter &param, double lengthratio);
76 
77 #endif
Definition: TB_Parameter.h:12
Definition: Lattice.h:36