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