ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
ModuleSymmetry::Symmetry Class Reference

#include <symmetry.h>

Inheritance diagram for ModuleSymmetry::Symmetry:
Collaboration diagram for ModuleSymmetry::Symmetry:

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 > &gtrans, 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
 
- Public Member Functions inherited from ModuleSymmetry::Symmetry_Basic
 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 > &gtrans, 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
 
- Public Attributes inherited from ModuleSymmetry::Symmetry_Basic
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

- Protected Member Functions inherited from ModuleSymmetry::Symmetry_Basic
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
 

Constructor & Destructor Documentation

◆ Symmetry()

ModuleSymmetry::Symmetry::Symmetry ( )
inline

◆ ~Symmetry()

ModuleSymmetry::Symmetry::~Symmetry ( )
inline

Member Function Documentation

◆ analy_sys()

void Symmetry::analy_sys ( const Lattice lat,
const Statistics st,
Atom atoms,
std::ofstream &  ofs_running 
)

analyze the symmetry of the system

Parameters
latstructure of lattice
st
atomsall atoms
ofs_runningget the symmetry information of the system, gmatries (rotation 3*3 matrixs), gtrans (transfer a collections vector3), etc.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ analyze_magnetic_group()

void Symmetry::analyze_magnetic_group ( const Atom atoms,
const Statistics st,
int &  nrot_out,
int &  nrotk_out 
)
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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checksym()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_optlat()

void ModuleSymmetry::Symmetry::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
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_rotated_atom()

int ModuleSymmetry::Symmetry::get_rotated_atom ( int  isym,
int  iat 
) const
inline
Here is the caller graph for this function:

◆ get_shortest_latvec()

void ModuleSymmetry::Symmetry::get_shortest_latvec ( ModuleBase::Vector3< double > &  a1,
ModuleBase::Vector3< double > &  a2,
ModuleBase::Vector3< double > &  a3 
) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getgroup()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gmatrix_convert()

void ModuleSymmetry::Symmetry::gmatrix_convert ( const ModuleBase::Matrix3 sa,
ModuleBase::Matrix3 sb,
const int  n,
const ModuleBase::Matrix3 a,
const ModuleBase::Matrix3 b 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gmatrix_convert_int()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gmatrix_invmap()

void ModuleSymmetry::Symmetry::gmatrix_invmap ( const ModuleBase::Matrix3 s,
const int  n,
int *  invmap 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gtrans_convert()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hermite_normal_form()

void Symmetry::hermite_normal_form ( const ModuleBase::Matrix3 s,
ModuleBase::Matrix3 H,
ModuleBase::Matrix3 b 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_all_movable()

bool ModuleSymmetry::Symmetry::is_all_movable ( const Atom atoms,
const Statistics st 
) 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.

Here is the caller graph for this function:

◆ lattice_type()

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ magmom_same_check()

bool Symmetry::magmom_same_check ( const Atom atoms) 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pricell()

void Symmetry::pricell ( double *  pos,
const Atom atoms 
)

primitive cell analysis

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rho_symmetry()

void Symmetry::rho_symmetry ( double *  rho,
const int &  nr1,
const int &  nr2,
const int &  nr3 
)

Symmetrize the charge density, the forces, and the stress

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rhog_symmetry()

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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_atom_map()

void ModuleSymmetry::Symmetry::set_atom_map ( const Atom atoms)
private

set atom map for each symmetry operation

Here is the call graph for this function:
Here is the caller graph for this function:

◆ standard_lat()

int Symmetry::standard_lat ( ModuleBase::Vector3< double > &  a,
ModuleBase::Vector3< double > &  b,
ModuleBase::Vector3< double > &  c,
double *  celconst 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ symmetrize_mat3()

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

Here is the caller graph for this function:

◆ symmetrize_vec3_nat()

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

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ a1

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::a1

◆ a2

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::a2

◆ a3

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::a3

◆ all_mbl

bool ModuleSymmetry::Symmetry::all_mbl = true

whether all the atoms are movable in all the directions

◆ cel_const

double ModuleSymmetry::Symmetry::cel_const[6] ={0.0}

◆ gmatrix

ModuleBase::Matrix3 ModuleSymmetry::Symmetry::gmatrix[48]

◆ gtrans

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::gtrans[48]

◆ ilattname

std::string ModuleSymmetry::Symmetry::ilattname

◆ index

int* ModuleSymmetry::Symmetry::index =nullptr

◆ istart

int* ModuleSymmetry::Symmetry::istart =nullptr

◆ isym_rotiat_

std::vector<std::vector<int> > ModuleSymmetry::Symmetry::isym_rotiat_
private

atom-map for each symmetry operation: isym_rotiat[isym][iat]=rotiat

◆ itmin_start

int ModuleSymmetry::Symmetry::itmin_start =0

◆ itmin_type

int ModuleSymmetry::Symmetry::itmin_type =0

◆ kgmatrix

ModuleBase::Matrix3 ModuleSymmetry::Symmetry::kgmatrix[48]

◆ max_nrotk

int ModuleSymmetry::Symmetry::max_nrotk = -1

record the maximum number of symmetry operations during cell-relax

◆ na

int* ModuleSymmetry::Symmetry::na =nullptr

◆ nat

int ModuleSymmetry::Symmetry::nat =0

◆ ncell

int ModuleSymmetry::Symmetry::ncell =1

◆ newpos

double* ModuleSymmetry::Symmetry::newpos =nullptr

◆ nop

int ModuleSymmetry::Symmetry::nop =0

◆ nrot

int ModuleSymmetry::Symmetry::nrot =0

◆ nrotk

int ModuleSymmetry::Symmetry::nrotk = -1

◆ ntype

int ModuleSymmetry::Symmetry::ntype =0

◆ optlat

ModuleBase::Matrix3 ModuleSymmetry::Symmetry::optlat

◆ p1

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::p1

◆ p2

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::p2

◆ p3

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::p3

◆ pbrav

int ModuleSymmetry::Symmetry::pbrav =0

◆ pcel_const

double ModuleSymmetry::Symmetry::pcel_const[6] ={0.0}

◆ pgname

std::string ModuleSymmetry::Symmetry::pgname

◆ pgnumber

int ModuleSymmetry::Symmetry::pgnumber =0

◆ plat

ModuleBase::Matrix3 ModuleSymmetry::Symmetry::plat

◆ plattname

std::string ModuleSymmetry::Symmetry::plattname

◆ pre_const

double ModuleSymmetry::Symmetry::pre_const[6] ={0.0}

◆ pricell_loop

bool ModuleSymmetry::Symmetry::pricell_loop = true
static

whether to loop primitive cell in rhog_symmetry, Only for AFM

◆ ptrans

std::vector<ModuleBase::Vector3<double> > ModuleSymmetry::Symmetry::ptrans

◆ real_brav

int ModuleSymmetry::Symmetry::real_brav =0

◆ rotpos

double* ModuleSymmetry::Symmetry::rotpos =nullptr

◆ s1

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::s1

◆ s2

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::s2

◆ s3

ModuleBase::Vector3<double> ModuleSymmetry::Symmetry::s3

◆ spgname

std::string ModuleSymmetry::Symmetry::spgname

◆ spgnumber

int ModuleSymmetry::Symmetry::spgnumber =0

◆ sym_test

int ModuleSymmetry::Symmetry::sym_test =0

◆ symflag_fft

bool ModuleSymmetry::Symmetry::symflag_fft[48] ={false}

◆ symm_autoclose

bool ModuleSymmetry::Symmetry::symm_autoclose = false
static

◆ symm_flag

int ModuleSymmetry::Symmetry::symm_flag = 0
static

◆ symop

ModuleBase::Matrix3 ModuleSymmetry::Symmetry::symop[48]

The documentation for this class was generated from the following files: