ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
sep_cell.h
Go to the documentation of this file.
1
4
5#ifndef SEP_CELL
6#define SEP_CELL
7
8#include "source_cell/sep.h"
9
10#include <fstream>
11#include <string>
12#include <vector>
13
15{
16 public:
17 Sep_Cell() noexcept;
18 ~Sep_Cell() noexcept;
19
25 void init(const int ntype_in);
26
33 void set_omega(const double omega_in, const double tpiba2_in);
34
44 int read_sep_potentials(std::ifstream& ifpos,
45 const std::string& pp_dir,
46 std::ofstream& ofs_running,
47 std::vector<std::string>& ucell_atom_label);
48
49#ifdef __MPI
53 void bcast_sep_cell();
54#endif // __MPI
55
57 const std::vector<SepPot>& get_seps() const
58 {
59 return seps;
60 }
61 int get_ntype() const
62 {
63 return ntype;
64 }
65 const std::vector<bool>& get_sep_enable() const
66 {
67 return sep_enable;
68 }
69
70 double get_omega() const
71 {
72 return omega;
73 }
74
75 double get_tpiba2() const
76 {
77 return tpiba2;
78 }
79
80 private:
81 std::vector<SepPot> seps;
82 int ntype;
83 std::vector<bool> sep_enable;
84
86 double omega;
87 double tpiba2;
88};
89
90#endif // SEP_CEll
double tpiba2
tpiba ^ 2
Definition sep_cell.h:87
void set_omega(const double omega_in, const double tpiba2_in)
Sets omega and tpiba2.
Definition sep_cell.cpp:30
void init(const int ntype_in)
Sets the number of atom types and initializes internal vectors.
Definition sep_cell.cpp:22
const std::vector< bool > & get_sep_enable() const
Definition sep_cell.h:65
double get_tpiba2() const
Definition sep_cell.h:75
~Sep_Cell() noexcept
Definition symm_rho_soc_test.cpp:42
Sep_Cell() noexcept
Definition symm_rho_soc_test.cpp:41
const std::vector< SepPot > & get_seps() const
Getter methods.
Definition sep_cell.h:57
void bcast_sep_cell()
Broadcasts the Sep_Cell object to all processes.
Definition sep_cell.cpp:101
std::vector< SepPot > seps
Self potentials for each atom type.
Definition sep_cell.h:81
std::vector< bool > sep_enable
Whether self potential is enabled for each atom type.
Definition sep_cell.h:83
double get_omega() const
Definition sep_cell.h:70
double omega
unit cell data for VSep
Definition sep_cell.h:86
int get_ntype() const
Definition sep_cell.h:61
int ntype
number of atom types
Definition sep_cell.h:82
int read_sep_potentials(std::ifstream &ifpos, const std::string &pp_dir, std::ofstream &ofs_running, std::vector< std::string > &ucell_atom_label)
Reads self potentials from STRU file and xx.sep files.
Definition sep_cell.cpp:47