ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
symm_test.h
Go to the documentation of this file.
1#ifndef ABACUS_SOURCE_CELL_MODULE_SYMMETRY_TEST_SYMM_TEST_H
2#define ABACUS_SOURCE_CELL_MODULE_SYMMETRY_TEST_SYMM_TEST_H
3
6#include "gtest/gtest.h"
7
8#define DOUBLETHRESHOLD 1e-8
9
11{
12 std::string atomname;
13 std::vector<std::vector<double>> coordinate;
14};
15
16struct stru_
17{
18 int ibrav;
19 std::string point_group; // Schoenflies symbol
20 std::string point_group_hm; // Hermann–Mauguin notation.
21 std::string space_group;
22 std::vector<double> cell;
23 std::vector<atomtype_> all_type;
24 std::string coordtype; // caltesian or direct
25 std::vector<int> force_zero_iat; // the index of atoms whose force should be zero
26 std::map<int, int> force_oppo_iat; // the index of atoms pairs whose forces should be opposite
27 std::vector<std::vector<int>> force_oppo_iat_xyz; //{ia1, ia2, xoppo(1)/eq(0), yoppo, zoppo}
28 std::vector<std::pair<int, int>> stress_zero; //a set of elements in the stress tensor that should be zero
29 std::vector<std::vector<std::pair<int, int>>> stress_eq; //a set of elements in the stress tensor that should be equal
30};
31
32class SymmetryTest : public testing::Test
33{
34protected:
36 std::ofstream ofs_running;
37 void construct_ucell(stru_& stru);
38 void ClearUcell();
39};
40
41#endif // ABACUS_SOURCE_CELL_MODULE_SYMMETRY_TEST_SYMM_TEST_H
Definition symm_test.h:33
UnitCell ucell
Definition symm_test.h:35
std::ofstream ofs_running
Definition symm_test.h:36
void ClearUcell()
Definition symm_test.cpp:77
void construct_ucell(stru_ &stru)
Definition symm_test.cpp:3
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition symm_test.h:11
std::string atomname
Definition symm_test.h:12
std::vector< std::vector< double > > coordinate
Definition symm_test.h:13
Definition symm_test.h:17
std::vector< std::pair< int, int > > stress_zero
Definition symm_test.h:28
std::vector< std::vector< std::pair< int, int > > > stress_eq
Definition symm_test.h:29
int ibrav
Definition symm_test.h:18
std::string coordtype
Definition symm_test.h:24
std::string point_group
Definition symm_test.h:19
std::string point_group_hm
Definition symm_test.h:20
std::map< int, int > force_oppo_iat
Definition symm_test.h:26
std::vector< atomtype_ > all_type
Definition symm_test.h:23
std::vector< double > cell
Definition symm_test.h:22
std::string space_group
Definition symm_test.h:21
std::vector< std::vector< int > > force_oppo_iat_xyz
Definition symm_test.h:27
std::vector< int > force_zero_iat
Definition symm_test.h:25