ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <symmetry.h>
Public Member Functions | |
Symmetry () | |
~Symmetry () | |
void | analy_sys (const Lattice &lat, const Statistics &st, Atom *atoms, std::ofstream &ofs_running) |
analyze the symmetry of the system | |
int | standard_lat (ModuleBase::Vector3< double > &a, ModuleBase::Vector3< double > &b, ModuleBase::Vector3< double > &c, double *celconst) const |
void | lattice_type (ModuleBase::Vector3< double > &v1, ModuleBase::Vector3< double > &v2, ModuleBase::Vector3< double > &v3, ModuleBase::Vector3< double > &v01, ModuleBase::Vector3< double > &v02, ModuleBase::Vector3< double > &v03, double *cel_const, double *pre_const, int &real_brav, std::string &bravname, const Atom *atoms, bool convert_atoms, double *newpos=nullptr) const |
void | getgroup (int &nrot, int &nrotk, std::ofstream &ofs_running, const int &nop, const ModuleBase::Matrix3 *symop, ModuleBase::Matrix3 *gmatrix, ModuleBase::Vector3< double > *gtrans, double *pos, double *rotpos, int *index, const int ntype, const int itmin_type, const int itmin_start, int *istart, int *na) const |
bool | checksym (const ModuleBase::Matrix3 &s, ModuleBase::Vector3< double > >rans, double *pos, double *rotpos, int *index, const int itmin_type, const int ntype, const int itmin_start, int *istart, int *na) const |
void | pricell (double *pos, const Atom *atoms) |
primitive cell analysis | |
void | rho_symmetry (double *rho, const int &nr1, const int &nr2, const int &nr3) |
void | rhog_symmetry (std::complex< double > *rhogtot, int *ixyz2ipw, const int &nx, const int &ny, const int &nz, const int &fftnx, const int &fftny, const int &fftnz) |
void | symmetrize_vec3_nat (double *v) const |
symmetrize a vector3 with nat elements, which can be forces or variation of atom positions in relax | |
void | symmetrize_mat3 (ModuleBase::matrix &sigma, const Lattice &lat) const |
symmetrize a 3*3 tensor, which can be stress or variation of unitcell in cell-relax | |
void | gmatrix_convert (const ModuleBase::Matrix3 *sa, ModuleBase::Matrix3 *sb, const int n, const ModuleBase::Matrix3 &a, const ModuleBase::Matrix3 &b) const |
void | gmatrix_convert_int (const ModuleBase::Matrix3 *sa, ModuleBase::Matrix3 *sb, const int n, const ModuleBase::Matrix3 &a, const ModuleBase::Matrix3 &b) const |
void | gtrans_convert (const ModuleBase::Vector3< double > *va, ModuleBase::Vector3< double > *vb, const int n, const ModuleBase::Matrix3 &a, const ModuleBase::Matrix3 &b) const |
void | gmatrix_invmap (const ModuleBase::Matrix3 *s, const int n, int *invmap) const |
void | hermite_normal_form (const ModuleBase::Matrix3 &s, ModuleBase::Matrix3 &H, ModuleBase::Matrix3 &b) const |
int | get_rotated_atom (int isym, int iat) const |
![]() | |
Symmetry_Basic () | |
~Symmetry_Basic () | |
bool | equal (const double &m, const double &n) const |
void | check_boundary (double &x) const |
double | get_translation_vector (const double &x1, const double &x2) const |
void | check_translation (double &x, const double &t) const |
double | check_diff (const double &x1, const double &x2) const |
void | veccon (double *va, double *vb, const int num, const ModuleBase::Vector3< double > &aa1, const ModuleBase::Vector3< double > &aa2, const ModuleBase::Vector3< double > &aa3, const ModuleBase::Vector3< double > &bb1, const ModuleBase::Vector3< double > &bb2, const ModuleBase::Vector3< double > &bb3) |
void | matrigen (ModuleBase::Matrix3 *symgen, const int ngen, ModuleBase::Matrix3 *symop, int &nop) const |
void | setgroup (ModuleBase::Matrix3 *symop, int &nop, const int &ibrav) const |
void | rotate (ModuleBase::Matrix3 &gmatrix, ModuleBase::Vector3< double > >rans, int i, int j, int k, const int, const int, const int, int &, int &, int &) |
void | test_atom_ordering (double *posi, const int natom, int *subindex) const |
int | subgroup (const int &nrot, const int &ninv, const int &nc2, const int &nc3, const int &nc4, const int &nc6, const int &ns1, const int &ns3, const int &ns4, const int &ns6) const |
bool | pointgroup (const int &nrot, int &pgnumber, std::string &pgname, const ModuleBase::Matrix3 *gmatrix, std::ofstream &ofs_running) const |
Public Attributes | |
ModuleBase::Vector3< double > | s1 |
ModuleBase::Vector3< double > | s2 |
ModuleBase::Vector3< double > | s3 |
ModuleBase::Vector3< double > | a1 |
ModuleBase::Vector3< double > | a2 |
ModuleBase::Vector3< double > | a3 |
ModuleBase::Vector3< double > | p1 |
ModuleBase::Vector3< double > | p2 |
ModuleBase::Vector3< double > | p3 |
int | ntype =0 |
int | nat =0 |
int * | na =nullptr |
int * | istart =nullptr |
int | itmin_type =0 |
int | itmin_start =0 |
double * | newpos =nullptr |
double * | rotpos =nullptr |
std::vector< ModuleBase::Vector3< double > > | ptrans |
int | ncell =1 |
int * | index =nullptr |
double | cel_const [6] ={0.0} |
double | pcel_const [6] ={0.0} |
double | pre_const [6] ={0.0} |
bool | symflag_fft [48] ={false} |
int | sym_test =0 |
int | pbrav =0 |
int | real_brav =0 |
std::string | ilattname |
std::string | plattname |
ModuleBase::Matrix3 | gmatrix [48] |
ModuleBase::Matrix3 | kgmatrix [48] |
ModuleBase::Vector3< double > | gtrans [48] |
ModuleBase::Matrix3 | symop [48] |
int | nop =0 |
int | nrot =0 |
int | nrotk = -1 |
int | max_nrotk = -1 |
record the maximum number of symmetry operations during cell-relax | |
int | pgnumber =0 |
int | spgnumber =0 |
std::string | pgname |
std::string | spgname |
ModuleBase::Matrix3 | optlat |
ModuleBase::Matrix3 | plat |
bool | all_mbl = true |
whether all the atoms are movable in all the directions | |
![]() | |
double | epsilon |
the precision of symmetry operation | |
double | epsilon_input |
the input value of symmetry_prec, should not be changed | |
Static Public Attributes | |
static int | symm_flag = 0 |
static bool | symm_autoclose = false |
static bool | pricell_loop = true |
whether to loop primitive cell in rhog_symmetry, Only for AFM | |
Private Member Functions | |
void | set_atom_map (const Atom *atoms) |
set atom map for each symmetry operation | |
bool | is_all_movable (const Atom *atoms, const Statistics &st) const |
check if all the atoms are movable delta_pos symmetrization in relax is only meaningful when all the atoms are movable in all the directions. | |
void | get_shortest_latvec (ModuleBase::Vector3< double > &a1, ModuleBase::Vector3< double > &a2, ModuleBase::Vector3< double > &a3) const |
void | get_optlat (ModuleBase::Vector3< double > &v1, ModuleBase::Vector3< double > &v2, ModuleBase::Vector3< double > &v3, ModuleBase::Vector3< double > &w1, ModuleBase::Vector3< double > &w2, ModuleBase::Vector3< double > &w3, int &real_brav, double *cel_const, double *tmp_const) const |
bool | magmom_same_check (const Atom *atoms) const |
void | analyze_magnetic_group (const Atom *atoms, const Statistics &st, int &nrot_out, int &nrotk_out) |
Private Attributes | |
std::vector< std::vector< int > > | isym_rotiat_ |
atom-map for each symmetry operation: isym_rotiat[isym][iat]=rotiat | |
Additional Inherited Members | |
![]() | |
std::string | get_brav_name (const int ibrav) const |
void | atom_ordering (double *posi, const int natom, int *subindex) |
void | atom_ordering_new (double *posi, const int natom, int *subindex) const |
|
inline |
|
inline |
void Symmetry::analy_sys | ( | const Lattice & | lat, |
const Statistics & | st, | ||
Atom * | atoms, | ||
std::ofstream & | ofs_running | ||
) |
analyze the symmetry of the system
lat | structure of lattice |
st | |
atoms | all atoms |
ofs_running | get the symmetry information of the system, gmatries (rotation 3*3 matrixs), gtrans (transfer a collections vector3), etc. |
|
private |
Analyze magnetic group without time-reversal symmetry (because currently the charge density symmetrization does not support it) Method: treat atoms with different magmom as atoms of different type
bool Symmetry::checksym | ( | const ModuleBase::Matrix3 & | s, |
ModuleBase::Vector3< double > & | gtrans, | ||
double * | pos, | ||
double * | rotpos, | ||
int * | index, | ||
const int | itmin_type, | ||
const int | ntype, | ||
const int | itmin_start, | ||
int * | istart, | ||
int * | na | ||
) | const |
|
private |
|
inline |
|
private |
void Symmetry::getgroup | ( | int & | nrot, |
int & | nrotk, | ||
std::ofstream & | ofs_running, | ||
const int & | nop, | ||
const ModuleBase::Matrix3 * | symop, | ||
ModuleBase::Matrix3 * | gmatrix, | ||
ModuleBase::Vector3< double > * | gtrans, | ||
double * | pos, | ||
double * | rotpos, | ||
int * | index, | ||
const int | ntype, | ||
const int | itmin_type, | ||
const int | itmin_start, | ||
int * | istart, | ||
int * | na | ||
) | const |
void ModuleSymmetry::Symmetry::gmatrix_convert | ( | const ModuleBase::Matrix3 * | sa, |
ModuleBase::Matrix3 * | sb, | ||
const int | n, | ||
const ModuleBase::Matrix3 & | a, | ||
const ModuleBase::Matrix3 & | b | ||
) | const |
void ModuleSymmetry::Symmetry::gmatrix_convert_int | ( | const ModuleBase::Matrix3 * | sa, |
ModuleBase::Matrix3 * | sb, | ||
const int | n, | ||
const ModuleBase::Matrix3 & | a, | ||
const ModuleBase::Matrix3 & | b | ||
) | const |
void ModuleSymmetry::Symmetry::gmatrix_invmap | ( | const ModuleBase::Matrix3 * | s, |
const int | n, | ||
int * | invmap | ||
) | const |
void ModuleSymmetry::Symmetry::gtrans_convert | ( | const ModuleBase::Vector3< double > * | va, |
ModuleBase::Vector3< double > * | vb, | ||
const int | n, | ||
const ModuleBase::Matrix3 & | a, | ||
const ModuleBase::Matrix3 & | b | ||
) | const |
void Symmetry::hermite_normal_form | ( | const ModuleBase::Matrix3 & | s, |
ModuleBase::Matrix3 & | H, | ||
ModuleBase::Matrix3 & | b | ||
) | const |
|
private |
check if all the atoms are movable delta_pos symmetrization in relax is only meaningful when all the atoms are movable in all the directions.
void Symmetry::lattice_type | ( | ModuleBase::Vector3< double > & | v1, |
ModuleBase::Vector3< double > & | v2, | ||
ModuleBase::Vector3< double > & | v3, | ||
ModuleBase::Vector3< double > & | v01, | ||
ModuleBase::Vector3< double > & | v02, | ||
ModuleBase::Vector3< double > & | v03, | ||
double * | cel_const, | ||
double * | pre_const, | ||
int & | real_brav, | ||
std::string & | bravname, | ||
const Atom * | atoms, | ||
bool | convert_atoms, | ||
double * | newpos = nullptr |
||
) | const |
|
private |
Loop the magmom of each atoms in its type when NSPIN>1. If not all the same, primitive cells should not be looped in rhog_symmetry.
void Symmetry::pricell | ( | double * | pos, |
const Atom * | atoms | ||
) |
primitive cell analysis
void Symmetry::rho_symmetry | ( | double * | rho, |
const int & | nr1, | ||
const int & | nr2, | ||
const int & | nr3 | ||
) |
void Symmetry::rhog_symmetry | ( | std::complex< double > * | rhogtot, |
int * | ixyz2ipw, | ||
const int & | nx, | ||
const int & | ny, | ||
const int & | nz, | ||
const int & | fftnx, | ||
const int & | fftny, | ||
const int & | fftnz | ||
) |
|
private |
set atom map for each symmetry operation
int Symmetry::standard_lat | ( | ModuleBase::Vector3< double > & | a, |
ModuleBase::Vector3< double > & | b, | ||
ModuleBase::Vector3< double > & | c, | ||
double * | celconst | ||
) | const |
void ModuleSymmetry::Symmetry::symmetrize_mat3 | ( | ModuleBase::matrix & | sigma, |
const Lattice & | lat | ||
) | const |
symmetrize a 3*3 tensor, which can be stress or variation of unitcell in cell-relax
void ModuleSymmetry::Symmetry::symmetrize_vec3_nat | ( | double * | v | ) | const |
symmetrize a vector3 with nat elements, which can be forces or variation of atom positions in relax
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::a1 |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::a2 |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::a3 |
bool ModuleSymmetry::Symmetry::all_mbl = true |
whether all the atoms are movable in all the directions
double ModuleSymmetry::Symmetry::cel_const[6] ={0.0} |
ModuleBase::Matrix3 ModuleSymmetry::Symmetry::gmatrix[48] |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::gtrans[48] |
std::string ModuleSymmetry::Symmetry::ilattname |
int* ModuleSymmetry::Symmetry::index =nullptr |
int* ModuleSymmetry::Symmetry::istart =nullptr |
|
private |
atom-map for each symmetry operation: isym_rotiat[isym][iat]=rotiat
int ModuleSymmetry::Symmetry::itmin_start =0 |
int ModuleSymmetry::Symmetry::itmin_type =0 |
ModuleBase::Matrix3 ModuleSymmetry::Symmetry::kgmatrix[48] |
int ModuleSymmetry::Symmetry::max_nrotk = -1 |
record the maximum number of symmetry operations during cell-relax
int* ModuleSymmetry::Symmetry::na =nullptr |
int ModuleSymmetry::Symmetry::nat =0 |
int ModuleSymmetry::Symmetry::ncell =1 |
double* ModuleSymmetry::Symmetry::newpos =nullptr |
int ModuleSymmetry::Symmetry::nop =0 |
int ModuleSymmetry::Symmetry::nrot =0 |
int ModuleSymmetry::Symmetry::nrotk = -1 |
int ModuleSymmetry::Symmetry::ntype =0 |
ModuleBase::Matrix3 ModuleSymmetry::Symmetry::optlat |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::p1 |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::p2 |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::p3 |
int ModuleSymmetry::Symmetry::pbrav =0 |
double ModuleSymmetry::Symmetry::pcel_const[6] ={0.0} |
std::string ModuleSymmetry::Symmetry::pgname |
int ModuleSymmetry::Symmetry::pgnumber =0 |
ModuleBase::Matrix3 ModuleSymmetry::Symmetry::plat |
std::string ModuleSymmetry::Symmetry::plattname |
double ModuleSymmetry::Symmetry::pre_const[6] ={0.0} |
|
static |
whether to loop primitive cell in rhog_symmetry, Only for AFM
std::vector<ModuleBase::Vector3<double> > ModuleSymmetry::Symmetry::ptrans |
int ModuleSymmetry::Symmetry::real_brav =0 |
double* ModuleSymmetry::Symmetry::rotpos =nullptr |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::s1 |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::s2 |
ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::s3 |
std::string ModuleSymmetry::Symmetry::spgname |
int ModuleSymmetry::Symmetry::spgnumber =0 |
int ModuleSymmetry::Symmetry::sym_test =0 |
bool ModuleSymmetry::Symmetry::symflag_fft[48] ={false} |
|
static |
|
static |
ModuleBase::Matrix3 ModuleSymmetry::Symmetry::symop[48] |