ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
dfpt_stru_tool.h
Go to the documentation of this file.
1#ifndef DFPT_STRU_TOOL_H
2#define DFPT_STRU_TOOL_H
3
4// Shared free-function utilities for the MPI-side DFPT tests
5// (dfpt_pw_data_test / dfpt_pw_run_test): building a minimal UnitCell
6// from a hand-written structure table (abbreviated from
7// module_symmetry/test/symm_test.cpp and klist_test.cpp), in the
8// free-function test-tool pattern of module_pw's test/test_tool (a
9// serial-side counterpart for test_serial/ is pending review and not
10// part of this change). Every test file derives its own fixture from
11// ::testing::Test, owns its UnitCell and calls these functions; there
12// is no shared fixture base class on this side.
13
14#include <string>
15#include <vector>
16
17class UnitCell;
18
19namespace dfpt_test
20{
21
24{
25 std::string atomname;
26 std::vector<std::vector<double>> coordinate;
27};
28
30struct stru_
31{
32 int ibrav;
33 std::string point_group; // Schoenflies symbol
34 std::string point_group_hm; // Hermann-Mauguin notation
35 std::string space_group;
36 std::vector<double> cell; // a1 | a2 | a3 (cartesian, row-major)
37 std::vector<atomtype_> all_type;
38};
39
43
48void construct_ucell(UnitCell &ucell, const stru_ &stru);
49
50} // namespace dfpt_test
51
52#endif // DFPT_STRU_TOOL_H
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition dfpt_stru_tool.h:20
void construct_ucell(UnitCell &ucell, const stru_ &stru)
Definition test_dfpt_stru_fixture.cpp:20
stru_ cubic_carbon_stru()
Definition test_dfpt_stru_fixture.cpp:12
one atom species: label + cartesian coordinates of its sites
Definition dfpt_stru_tool.h:24
std::string atomname
Definition dfpt_stru_tool.h:25
std::vector< std::vector< double > > coordinate
Definition dfpt_stru_tool.h:26
hand-written structure table consumed by construct_ucell
Definition dfpt_stru_tool.h:31
std::string point_group_hm
Definition dfpt_stru_tool.h:34
std::string space_group
Definition dfpt_stru_tool.h:35
int ibrav
Definition dfpt_stru_tool.h:32
std::vector< double > cell
Definition dfpt_stru_tool.h:36
std::string point_group
Definition dfpt_stru_tool.h:33
std::vector< atomtype_ > all_type
Definition dfpt_stru_tool.h:37