ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleSymmetry::Symmetry Class Reference

Symmetry analysis class. More...

#include <symmetry.h>

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

Public Member Functions

 Symmetry ()
 ~Symmetry ()
void analy_sys (const Lattice &lat, Atom *atoms, const int nat, const int ntype, const std::vector< int > &iat2it, const std::vector< int > &iat2ia, const ModuleBase::IntArray &itia2iat, std::ofstream &ofs_running, const double symmetry_prec, const int nspin, const std::string &calculation, const int *cal_symm_repr)
 analyze the symmetry of the system
int standard_lat (ModuleBase::Vector3< double > &a, ModuleBase::Vector3< double > &b, ModuleBase::Vector3< double > &c, double *celconst, const double symmetry_prec) 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, const double symmetry_prec) 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)
 Symmetrize the charge density, the forces, and the stress.
int density_sym_ops (std::vector< ModuleBase::Matrix3 > &kgmatrix_in, std::vector< ModuleBase::Vector3< double > > &gtrans_in, std::vector< double > &trs_inv) const
 Assemble the spatial operations used to symmetrize the density.
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, const bool gamma_only_pw, const ModuleBase::Matrix3 *kgmatrix_in, const ModuleBase::Vector3< double > *gtrans_in, const int nop)
 Symmetrize charge density in reciprocal space.
void rhog_symmetry_nspin4 (std::complex< double > *rhogtot_x, std::complex< double > *rhogtot_y, std::complex< double > *rhogtot_z, const ModuleBase::Matrix3 *wspin, int *ixyz2ipw, const int &nx, const int &ny, const int &nz, const int &fftnx, const int &fftny, const int &fftnz, const double *trs_inv, const ModuleBase::Matrix3 *kgmatrix_in, const ModuleBase::Vector3< double > *gtrans_in, const int nop)
 Symmetrize the nspin=4 (non-collinear/SOC) spin density in reciprocal space.
void symmetrize_vec3_nat (double *v) const
 Symmetrize a vector3 with nat elements.
void symmetrize_mat3 (ModuleBase::matrix &sigma, const Lattice &lat) const
 Symmetrize a 3*3 tensor.
void gmatrix_convert (const ModuleBase::Matrix3 *sa, ModuleBase::Matrix3 *sb, const int n, const ModuleBase::Matrix3 &a, const ModuleBase::Matrix3 &b) const
 Convert n rotation-matrices from basis {a1, a2, a3} to {b1, b2, b3}.
void gmatrix_convert_int (const ModuleBase::Matrix3 *sa, ModuleBase::Matrix3 *sb, const int n, const ModuleBase::Matrix3 &a, const ModuleBase::Matrix3 &b) const
 Convert n integer rotation-matrices from basis {a1, a2, a3} to {b1, b2, b3}.
void gtrans_convert (const ModuleBase::Vector3< double > *va, ModuleBase::Vector3< double > *vb, const int n, const ModuleBase::Matrix3 &a, const ModuleBase::Matrix3 &b) const
 Convert n translation-vectors from basis {a1, a2, a3} to {b1, b2, b3}.
void gmatrix_invmap (const ModuleBase::Matrix3 *s, const int n, int *invmap) const
 Compute inverse mapping of symmetry operations.
void hermite_normal_form (const ModuleBase::Matrix3 &s, ModuleBase::Matrix3 &H, ModuleBase::Matrix3 &b) const
 Compute Hermite normal form.
int get_rotated_atom (int isym, int iat) const
int get_rotated_atom_anti (int j, int iat) const
 atom map for the j-th ANTIUNITARY operation (spatial part gmatrix_anti[j]).
Public Member Functions inherited from ModuleSymmetry::Symmetry_Basic
 Symmetry_Basic ()
 ~Symmetry_Basic ()
bool equal (const double &m, const double &n) const
 Control accuracy - check if two doubles are equal.
void check_boundary (double &x) const
 Check boundary and wrap value to [0,1).
double get_translation_vector (const double &x1, const double &x2) const
 Get translation vector.
void check_translation (double &x, const double &t) const
 Check translation.
double check_diff (const double &x1, const double &x2) const
 Check difference between two values.
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)
 Convert vectors from one basis to another.
void matrigen (ModuleBase::Matrix3 *symgen, const int ngen, ModuleBase::Matrix3 *symop, int &nop) const
 Generate symmetry operations from generators.
void setgroup (ModuleBase::Matrix3 *symop, int &nop, const int &ibrav, const int *cal_symm_repr) const
 Set up symmetry group.
void rotate (ModuleBase::Matrix3 &gmatrix, ModuleBase::Vector3< double > &gtrans, int i, int j, int k, const int, const int, const int, int &, int &, int &)
 Rotate symmetry operation.
void test_atom_ordering (double *posi, const int natom, int *subindex) const
 Test atom ordering.
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
 Find out the greatest subgroup according to the number of operations of certain type.
bool pointgroup (const int &nrot, int &pgnumber, std::string &pgname, const ModuleBase::Matrix3 *gmatrix, std::ofstream &ofs_running, const int *cal_symm_repr) const
 Determine point group.

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
 primitive cell vectors(might be changed during the process of the program)
ModuleBase::Vector3< double > p1
ModuleBase::Vector3< double > p2
ModuleBase::Vector3< double > p3
 primitive cell vectors
int ntype =0
 the number of atomic species
int nat =0
 the number of all atoms
std::vector< int > na
 number of atoms for each species
std::vector< int > istart
 start number of atom
int itmin_type =0
 the type has smallest number of atoms
int itmin_start =0
std::vector< double > newpos
 direct coordinates of atoms
std::vector< double > rotpos
 positions of atoms after rotation
std::vector< ModuleBase::Vector3< double > > ptrans
 the translation vectors of the primitive cell in the input structure
int ncell =1
 the number of primitive cells within one supercell
std::vector< int > index
double cel_const [6] ={0.0}
double pcel_const [6] ={0.0}
 cel_const of primitive cell
double pre_const [6] ={0.0}
 cel_const of input configuration, first 3 is moduli of a1, a2, a3, last 3 is eular angle
bool symflag_fft [48] ={false}
int sym_test =0
int pbrav =0
 ibrav of primitive cell
int real_brav =0
 the real ibrav for the cell (pengfei Li 3-15-2022)
std::string ilattname
 the bravais lattice type of the supercell
std::string plattname
 the bravais lattice type of the primitive cell
ModuleBase::Matrix3 gmatrix [48]
 the rotation matrices for all space group operations
ModuleBase::Matrix3 kgmatrix [48]
 the rotation matrices in reciprocal space
ModuleBase::Vector3< double > gtrans [48]
ModuleBase::Matrix3 gmatrix_anti [48]
ModuleBase::Matrix3 kgmatrix_anti [48]
ModuleBase::Vector3< double > gtrans_anti [48]
int nrotk_anti = 0
bool magnetic_nspin4 = false
ModuleBase::Matrix3 symop [48]
 the rotation matrices for the pure bravais lattice
int nop =0
 the number of point group operations of the pure bravais lattice without basis
int nrot =0
 the number of pure point group rotations
int nrotk = -1
 the number of all space group operations, >0 means the nrotk has been analyzed
int max_nrotk = -1
 record the maximum number of symmetry operations during cell-relax
int pgnumber =0
 the serial number of point group
int spgnumber =0
 the serial number of point group in space group
std::string pgname
 the Schoenflies name of the point group R in {R|0}
std::string spgname
 the Schoenflies name of the point group R in the space group {R|t}
ModuleBase::Matrix3 optlat
 the optimized-symmetry lattice
ModuleBase::Matrix3 plat
 the primitive lattice
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
 symmetry flag for levels: -1 : no symmetry at all, k points would be total nks in KPT 0 : only basic time-reversal symmetry is considered, point k and -k would fold to k 1 : point group symmetry is considered
static bool symm_autoclose = false
 controlled by INPUT
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 std::vector< int > &iat2it, const std::vector< int > &iat2ia) 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 double symmetry_prec) const
bool magmom_same_check (const Atom *atoms) const
void analyze_magnetic_group (const Atom *atoms, const std::vector< int > &iat2it, const std::vector< int > &iat2ia, const ModuleBase::IntArray &itia2iat, int &nrot_out, int &nrotk_out)
void analyze_magnetic_group_nspin4 (const Atom *atoms, const std::vector< int > &iat2it, const std::vector< int > &iat2ia, const ModuleBase::Matrix3 &latvec)

Private Attributes

std::vector< std::vector< int > > isym_rotiat_
 atom-map for each symmetry operation: isym_rotiat[isym][iat]=rotiat
std::vector< std::vector< int > > isym_rotiat_anti_

Additional Inherited Members

Protected Member Functions inherited from ModuleSymmetry::Symmetry_Basic
std::string get_brav_name (const int ibrav) const
 Get Bravais lattice name.
void atom_ordering (double *posi, const int natom, int *subindex)
 Order atoms.
void atom_ordering_new (double *posi, const int natom, int *subindex) const
 Order atoms (new version).

Detailed Description

Symmetry analysis class.

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,
Atom * atoms,
const int nat,
const int ntype,
const std::vector< int > & iat2it,
const std::vector< int > & iat2ia,
const ModuleBase::IntArray & itia2iat,
std::ofstream & ofs_running,
const double symmetry_prec,
const int nspin,
const std::string & calculation,
const int * cal_symm_repr )

analyze the symmetry of the system

Parameters
latstructure of lattice
atomsall atoms
nattotal number of atoms
ntypenumber of atom species
iat2itmap from global atom index iat to its species index it
iat2iamap from global atom index iat to its index ia within the species
itia2iatmap from (it, ia) to the global atom index iat
ofs_running
symmetry_precprecision for symmetry analysis
nspinnumber of spin components
calculationcalculation type (scf, relax, cell-relax, etc.)
cal_symm_reprcontrol for symmetry representation output [0]=flag, [1]=precision get 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 std::vector< int > & iat2it,
const std::vector< int > & iat2ia,
const ModuleBase::IntArray & itia2iat,
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:

◆ analyze_magnetic_group_nspin4()

void Symmetry::analyze_magnetic_group_nspin4 ( const Atom * atoms,
const std::vector< int > & iat2it,
const std::vector< int > & iat2ia,
const ModuleBase::Matrix3 & latvec )
private

(nspin=4 / SOC) Restrict the already-built space group to the unitary magnetic subgroup: keep operation g only if it preserves the magnetization as a pseudovector, W(g) m_i = m_{g(i)} with W(g)=SpinRotation::spin_so3(gmatc). This prevents operations that reverse the moment (which are only symmetries when combined with time reversal) from being applied in k-reduction and density symmetrization. Non-magnetic (m_i=0) keeps all operations.

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:

◆ density_sym_ops()

int Symmetry::density_sym_ops ( std::vector< ModuleBase::Matrix3 > & kgmatrix_in,
std::vector< ModuleBase::Vector3< double > > & gtrans_in,
std::vector< double > & trs_inv ) const

Assemble the spatial operations used to symmetrize the density.

For nspin=4 with a non-zero moment this is the full Shubnikov group: the nrotk unitary operations followed by the nrotk_anti spatial parts of the antiunitary elements Theta*g. Otherwise it just returns the nrotk unitary operations with trs_inv = +1. H (union) A is a group and |H|+|A| <= 48, so the invmap/grouping and the [48] work arrays used by rhog_symmetry* stay valid.

Parameters
kgmatrix_inrotation matrices in reciprocal space of the assembled operations
gtrans_intranslation vectors of the assembled operations
trs_invtime-reversal sign (+1 unitary, -1 antiunitary): the charge is invariant under Theta and ignores it, the magnetization picks it up (m -> -W(g) m)
Returns
the total number of operations
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 double symmetry_prec ) 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_rotated_atom_anti()

int ModuleSymmetry::Symmetry::get_rotated_atom_anti ( int j,
int iat ) const
inline

atom map for the j-th ANTIUNITARY operation (spatial part gmatrix_anti[j]).

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

Convert n rotation-matrices from basis {a1, a2, a3} to {b1, b2, b3}.

Parameters
sasource rotation matrices
sbtarget rotation matrices
nnumber of matrices
asource basis
btarget basis
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

Convert n integer rotation-matrices from basis {a1, a2, a3} to {b1, b2, b3}.

Parameters
sasource rotation matrices
sbtarget rotation matrices
nnumber of matrices
asource basis
btarget basis
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

Compute inverse mapping of symmetry operations.

Parameters
ssymmetry operations
nnumber of operations
invmapinverse mapping
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

Convert n translation-vectors from basis {a1, a2, a3} to {b1, b2, b3}.

Parameters
vasource translation vectors
vbtarget translation vectors
nnumber of vectors
asource basis
btarget basis
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

Compute Hermite normal form.

Parameters
sinput matrix
HHermite normal form
btransformation matrix
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 std::vector< int > & iat2it,
const std::vector< int > & iat2ia ) 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.

Parameters
iat2itmap from global atom index iat to its species index it
iat2iamap from global atom index iat to its index ia within the species
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,
const double symmetry_prec ) 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.

Symmetrize charge density in real space.

Parameters
rhocharge density
nr1number of grid points in x direction
nr2number of grid points in y direction
nr3number of grid points in z direction
Here is the call 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,
const bool gamma_only_pw,
const ModuleBase::Matrix3 * kgmatrix_in,
const ModuleBase::Vector3< double > * gtrans_in,
const int nop )

Symmetrize charge density in reciprocal space.

Parameters
rhogtotcharge density in reciprocal space
ixyz2ipwindex mapping from real to reciprocal space
nxgrid dimension in x
nygrid dimension in y
nzgrid dimension in z
fftnxFFT grid dimension in x
fftnyFFT grid dimension in y
fftnzFFT grid dimension in z
gamma_only_pwwhether to use gamma-only PW
kgmatrix_in,gtrans_in,nopoperation set; pass nullptr/nullptr/-1 for the nrotk unitary members, or the density_sym_ops() list for the full Shubnikov group.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rhog_symmetry_nspin4()

void Symmetry::rhog_symmetry_nspin4 ( std::complex< double > * rhogtot_x,
std::complex< double > * rhogtot_y,
std::complex< double > * rhogtot_z,
const ModuleBase::Matrix3 * wspin,
int * ixyz2ipw,
const int & nx,
const int & ny,
const int & nz,
const int & fftnx,
const int & fftny,
const int & fftnz,
const double * trs_inv,
const ModuleBase::Matrix3 * kgmatrix_in,
const ModuleBase::Vector3< double > * gtrans_in,
const int nop )

Symmetrize the nspin=4 (non-collinear/SOC) spin density in reciprocal space.

The three Pauli spin components (rho^x, rho^y, rho^z) are processed TOGETHER because each symmetry operation g couples the spatial map with a spin rotation W(g): m_sym(G) = (1/|G|) sum_g W(g) * m(g^{-1} G) * phase(g). The spatial bookkeeping (grouping/phase) is identical to rhog_symmetry; the only difference is that the per-g spin rotation W(g) is applied to the 3-vector.

Parameters
rhogtot_xx-component of the spin density in reciprocal space
rhogtot_yy-component of the spin density in reciprocal space
rhogtot_zz-component of the spin density in reciprocal space
wspinprecomputed spin-rotation matrices (size nrotk), with wspin[s] = SpinRotation::spin_so3(direct_to_cartesian(gmatrix[s], latvec)), such that m'^i = sum_j wspin[s]_{ij} m^j under symmetry operation s
ixyz2ipwindex mapping from real to reciprocal space
nxgrid dimension in x
nygrid dimension in y
nzgrid dimension in z
fftnxFFT grid dimension in x
fftnyFFT grid dimension in y
fftnzFFT grid dimension in z
trs_invtime-reversal sign per operation (+1 unitary, -1 antiunitary Theta*g), from density_sym_ops(). Theta flips the magnetization, so the antiunitary elements contribute m -> -W(g) m instead of m -> W(g) m. nullptr means all +1.
kgmatrix_in,gtrans_in,nopoperation set; pass nullptr/nullptr/-1 for the nrotk unitary members
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 double symmetry_prec ) 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.

Can be stress or variation of unitcell in cell-relax.

Parameters
sigmatensor to symmetrize (stress)
latlattice information
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.

Can be forces or variation of atom positions in relax.

Parameters
vvector to symmetrize (forces)
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

primitive cell vectors(might be changed during the process of the program)

◆ 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]

the rotation matrices for all space group operations

◆ gmatrix_anti

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

(nspin=4, magnetic) Spatial parts of the ANTIUNITARY elements of the Shubnikov (magnetic) group: operations g that REVERSE the magnetization, so that g alone is not a symmetry but Theta*g is (Theta = time reversal). Since an operation either preserves or reverses a non-zero moment, this set is a coset of the unitary subgroup and is DISJOINT from gmatrix[0..nrotk); when non-empty it has exactly nrotk elements. Index convention used downstream (k-stars, restore_dm): isym < nrotk -> unitary gmatrix[isym], isym >= nrotk -> antiunitary Theta*gmatrix_anti[isym-nrotk].

◆ gtrans

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

◆ gtrans_anti

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

◆ ilattname

std::string ModuleSymmetry::Symmetry::ilattname

the bravais lattice type of the supercell

◆ index

std::vector<int> ModuleSymmetry::Symmetry::index

◆ istart

std::vector<int> ModuleSymmetry::Symmetry::istart

start number of atom

◆ isym_rotiat_

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

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

◆ isym_rotiat_anti_

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

atom-map for each ANTIUNITARY operation: isym_rotiat_anti_[j][iat]=rotiat. Captured in analyze_magnetic_group_nspin4 before the unitary arrays are compacted.

◆ itmin_start

int ModuleSymmetry::Symmetry::itmin_start =0

◆ itmin_type

int ModuleSymmetry::Symmetry::itmin_type =0

the type has smallest number of atoms

◆ kgmatrix

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

the rotation matrices in reciprocal space

◆ kgmatrix_anti

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

◆ magnetic_nspin4

bool ModuleSymmetry::Symmetry::magnetic_nspin4 = false

nspin=4 with at least one non-zero local moment. Deliberately independent of lspinorb: without SOC the spinor Hamiltonian is still complex whenever the moment has a y-component (H^{up,dn} = B_x - i B_y), so plain conjugation K is not a symmetry there either and the antiunitary operation must be the full Theta = -i*sigma_y*K. Treating the noncollinear no-SOC case with the Shubnikov group is therefore correct (though conservative: the exact symmetry there is the larger spin space group, where spin and space rotations decouple).

◆ max_nrotk

int ModuleSymmetry::Symmetry::max_nrotk = -1

record the maximum number of symmetry operations during cell-relax

◆ na

std::vector<int> ModuleSymmetry::Symmetry::na

number of atoms for each species

◆ nat

int ModuleSymmetry::Symmetry::nat =0

the number of all atoms

◆ ncell

int ModuleSymmetry::Symmetry::ncell =1

the number of primitive cells within one supercell

◆ newpos

std::vector<double> ModuleSymmetry::Symmetry::newpos

direct coordinates of atoms

◆ nop

int ModuleSymmetry::Symmetry::nop =0

the number of point group operations of the pure bravais lattice without basis

◆ nrot

int ModuleSymmetry::Symmetry::nrot =0

the number of pure point group rotations

◆ nrotk

int ModuleSymmetry::Symmetry::nrotk = -1

the number of all space group operations, >0 means the nrotk has been analyzed

◆ nrotk_anti

int ModuleSymmetry::Symmetry::nrotk_anti = 0

number of antiunitary elements; 0 = none (or non-magnetic)

◆ ntype

int ModuleSymmetry::Symmetry::ntype =0

the number of atomic species

◆ optlat

ModuleBase::Matrix3 ModuleSymmetry::Symmetry::optlat

the optimized-symmetry lattice

◆ p1

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

◆ p2

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

◆ p3

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

primitive cell vectors

◆ pbrav

int ModuleSymmetry::Symmetry::pbrav =0

ibrav of primitive cell

◆ pcel_const

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

cel_const of primitive cell

◆ pgname

std::string ModuleSymmetry::Symmetry::pgname

the Schoenflies name of the point group R in {R|0}

◆ pgnumber

int ModuleSymmetry::Symmetry::pgnumber =0

the serial number of point group

◆ plat

ModuleBase::Matrix3 ModuleSymmetry::Symmetry::plat

the primitive lattice

◆ plattname

std::string ModuleSymmetry::Symmetry::plattname

the bravais lattice type of the primitive cell

◆ pre_const

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

cel_const of input configuration, first 3 is moduli of a1, a2, a3, last 3 is eular angle

◆ 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

the translation vectors of the primitive cell in the input structure

◆ real_brav

int ModuleSymmetry::Symmetry::real_brav =0

the real ibrav for the cell (pengfei Li 3-15-2022)

◆ rotpos

std::vector<double> ModuleSymmetry::Symmetry::rotpos

positions of atoms after rotation

◆ 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

the Schoenflies name of the point group R in the space group {R|t}

◆ spgnumber

int ModuleSymmetry::Symmetry::spgnumber =0

the serial number of point group in space group

◆ 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

controlled by INPUT

◆ symm_flag

int ModuleSymmetry::Symmetry::symm_flag = 0
static

symmetry flag for levels: -1 : no symmetry at all, k points would be total nks in KPT 0 : only basic time-reversal symmetry is considered, point k and -k would fold to k 1 : point group symmetry is considered

◆ symop

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

the rotation matrices for the pure bravais lattice


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