QNANO
TB_Model_spdsstar.h
1 #ifndef QNANO_TB_MODEL_SPDSSTAR_DEFINED_
2 #define QNANO_TB_MODEL_SPDSSTAR_DEFINED_
3 
4 #include "structure/Atom_List.h"
5 #include "structure/Neighbor_List.h"
6 #include "tightbinding/TB_Model.h"
7 #include "tightbinding/TB_Parameter_List.h"
8 #include "tools/Compare.h"
9 #include <algorithm>
10 
11 class TB_Model_spdsstar : public TB_Model, virtual public Organize_Blocks_Equal{
12 private:
13  inline double SQR(double x)const{return x*x;}
14 public:
15 //Data: list of atoms, materials...
16 //data read from files:
17  Atom_List atlist;
18  TB_Parameter_List parlist;
19  Neighbor_List neilist;
20  Neighbor_List neilist_unrelaxed;
21 
22 
23 //other data
24  bool without_spinorbit;
25  bool without_surface;
26  bool without_strain_correction;
27  bool passivate_sstar;
28  bool passivate_d;
29 
30 //filenames for setup_parameters
31  std::string materialdirectory,positionfile,neighborfile;
32 
33 
34  typedef std::pair<const TB_Parameter *, int> PAR_TYP;
35 
36 //Specify virtual functions
37  virtual size_t get_nr_at() const{ return atlist.size(); }
38 
39  void read_data_from_files(const std::string matdir, const std::string pos, const std::string nei);
40 
41 
42  double get_average_surface_shift(const std::vector<PAR_TYP> &par_typ) const;
43  double get_average_Delta_so(const std::vector<PAR_TYP> &par_typ) const;
44 
45  void add_diags10_nostrain(double *diags, const PAR_TYP& par_typ , int nr_nonzero_nei) const;
46  void get_diags10_nostrain(double *diags, const std::vector<PAR_TYP> &par_typs) const;
47 
48  void get_offdiagonals(double *offdiags, const PAR_TYP &par_typ , const Vec3d D, bool account_for_bond_stretch=true) const;
49 
50  void add_straincorrection(double *correction, const PAR_TYP &par_typ, \
51  const double *diags_nostrain, const double *diags_neighbor, \
52  const double *offdiags, const double *offdiags_eq) const;
53 
54  void get_surface_block(double *block, int atom_index) const;
55 
56 
57  void get_Matrix_row_block( std::vector< col_val > & col_val_vec, const int atom_index) ;
58 
59  virtual void setup(Parameter_Map &param_map);
60  virtual void setup(){ Parameter_Map param_map; setup(param_map); }
61 
62 
63 
65 // setup();
66  }
68  setup(param_map);
69  }
70 /*
71  TB_Model_spdsstar(const std::string matdir, \
72  const std::string pos, const std::string nei=""){
73  setup();
74  read_data_from_files(matdir,pos,nei);
75  }
76 */
77 
78 
79 
80 };
81 
82 
83 #endif
void get_surface_block(double *block, int atom_index) const
Definition: TB_Model_spdsstar.cc:324
Definition: Parameter_Map.h:12
virtual size_t get_nr_at() const
How many atoms.
Definition: TB_Model_spdsstar.h:37
virtual void setup(Parameter_Map &param_map)
Definition: TB_Model_spdsstar.cc:6
Class to store positions and to handle operations on 3d vectors.
Definition: Vec3d.h:9
Definition: Atom_List.h:9
void add_diags10_nostrain(double *diags, const PAR_TYP &par_typ, int nr_nonzero_nei) const
fill array of 10 doubles corresponding to the onsite diagonal energies (without strain correction) of...
Definition: TB_Model_spdsstar.cc:59
Definition: Neighbor_List.h:12
Definition: TB_Parameter_List.h:8
Definition: TB_Model_spdsstar.h:11
void get_offdiagonals(double *offdiags, const PAR_TYP &par_typ, const Vec3d D, bool account_for_bond_stretch=true) const
obtain off-diagonal elements from Slater-Koster (cf. original paper from Slater and Koster for basic ...
Definition: TB_Model_spdsstar.cc:80
void get_diags10_nostrain(double *diags, const std::vector< PAR_TYP > &par_typs) const
get diagonal energies from atom_index only
Definition: TB_Model_spdsstar.cc:69
void get_Matrix_row_block(std::vector< col_val > &col_val_vec, const int atom_index)
central function to generate block of Hamoltonian row corresponding to one atom in sparse matrix form...
Definition: TB_Model_spdsstar.cc:364
Definition: Organize_Blocks.h:28
void add_straincorrection(double *correction, const PAR_TYP &par_typ, const double *diags_nostrain, const double *diags_neighbor, const double *offdiags, const double *offdiags_eq) const
Definition: TB_Model_spdsstar.cc:239
Definition: TB_Model.h:38