@@ -127,7 +127,7 @@ void Symmetry::analy_sys(const UnitCell_pseudo &ucell, std::ofstream &ofs_runnin
127127 new_lat.e11 =a1.x ; new_lat.e12 =a1.y ; new_lat.e13 =a1.z ;
128128 new_lat.e21 =a2.x ; new_lat.e22 =a2.y ; new_lat.e23 =a2.z ;
129129 new_lat.e31 =a3.x ; new_lat.e32 =a3.y ; new_lat.e33 =a3.z ;
130- output::printM3 (ofs_running," STANDARD LATTICE VECTORS: (CARTESIAN COORDINATE: IN UNIT OF A0)" ,new_lat);
130+ // output::printM3(ofs_running,"STANDARD LATTICE VECTORS: (CARTESIAN COORDINATE: IN UNIT OF A0)",new_lat);
131131
132132 int iat=0 ;
133133 for (int it=0 ; it<ucell.ntype ; ++it)
@@ -156,21 +156,29 @@ void Symmetry::analy_sys(const UnitCell_pseudo &ucell, std::ofstream &ofs_runnin
156156 }
157157
158158
159- Symm_Other::print1 (ibrav, cel_const, ofs_running);
160-
159+ // Symm_Other::print1(ibrav, cel_const, ofs_running);
160+ Symm_Other::print1 (real_brav, cel_const, ofs_running);
161161 this ->change_lattice ();
162162 // this->pricell(); // pengfei Li 2018-05-14
163163 // for( iat =0 ; iat < ucell.nat ; iat++)
164164// std::cout << " newpos_now = " << newpos[3*iat] << " " << newpos[3*iat+1] << " " << newpos[3*iat+2] << std::endl;
165- ModuleBase::GlobalFunc::OUT (ofs_running," ibrav" ,ibrav);
166- this ->setgroup (this ->symop , this ->nop , this ->ibrav );
167- // now select all symmetry operations which reproduce the lattice
168- // to find those symmetry operations which reproduce the entire crystal
169- this ->getgroup (this ->nrot , this ->nrotk , ofs_running);
170- // find the name of point group
171- this ->pointgroup (this ->nrot , this ->pgnumber , this ->pgname , this ->gmatrix , ofs_running);
172- ModuleBase::GlobalFunc::OUT (ofs_running," POINT GROUP" , this ->pgname );
173- // write();
165+ test_brav = true ; // output the real ibrav and point group
166+ ModuleBase::GlobalFunc::OUT (ofs_running," ibrav" ,real_brav);
167+ this ->setgroup (this ->symop , this ->nop , this ->real_brav );
168+ this ->getgroup (this ->nrot , this ->nrotk , ofs_running);
169+ this ->pointgroup (this ->nrot , this ->pgnumber , this ->pgname , this ->gmatrix , ofs_running);
170+ ModuleBase::GlobalFunc::OUT (ofs_running," POINT GROUP" , this ->pgname );
171+
172+ test_brav = false ; // use the input ibrav to calculate
173+ // ModuleBase::GlobalFunc::OUT(ofs_running,"ibrav",ibrav);
174+ this ->setgroup (this ->symop , this ->nop , this ->ibrav );
175+ // now select all symmetry operations which reproduce the lattice
176+ // to find those symmetry operations which reproduce the entire crystal
177+ this ->getgroup (this ->nrot , this ->nrotk , ofs_running);
178+ // find the name of point group
179+ this ->pointgroup (this ->nrot , this ->pgnumber , this ->pgname , this ->gmatrix , ofs_running);
180+ // ModuleBase::GlobalFunc::OUT(ofs_running,"POINT GROUP", this->pgname);
181+ // write();
174182
175183 delete[] dirpos;
176184 delete[] newpos;
@@ -705,6 +713,7 @@ void Symmetry::lattice_type(
705713// GlobalV::ofs_running << " pre_brav=" << pre_brav << std::endl;
706714// GlobalV::ofs_running << " temp_brav=" << temp_brav << std::endl;
707715
716+
708717 if ( temp_brav < pre_brav)
709718 {
710719 // if the symmetry of the new vectors is higher, store the new ones
@@ -771,7 +780,6 @@ void Symmetry::lattice_type(
771780 }
772781 }
773782 ofs.close ();
774-
775783
776784 }
777785
@@ -811,9 +819,12 @@ void Symmetry::lattice_type(
811819 }
812820 }*/
813821 brav = pre_brav;
814- bravname = get_brav_name (brav);
822+ // brav = temp_brav;
823+ // bravname = get_brav_name(brav);
824+ real_brav = temp_brav; // pengfei Li 15-3-2022
825+ bravname = get_brav_name (real_brav);
815826
816- ModuleBase::GlobalFunc::OUT (GlobalV::ofs_running," BRAVAIS TYPE" ,brav );
827+ ModuleBase::GlobalFunc::OUT (GlobalV::ofs_running," BRAVAIS TYPE" ,real_brav );
817828 ModuleBase::GlobalFunc::OUT (GlobalV::ofs_running," BRAVAIS LATTICE NAME" ,bravname);
818829 return ;
819830}
@@ -1209,8 +1220,12 @@ void Symmetry::getgroup(int &nrot, int &nrotk, std::ofstream &ofs_running)
12091220 // total number of space group operations
12101221 // -----------------------------------------------------
12111222 nrotk += nrot;
1212- ModuleBase::GlobalFunc::OUT (ofs_running," PURE POINT GROUP OPERATIONS" ,nrot);
1213- ModuleBase::GlobalFunc::OUT (ofs_running," SPACE GROUP OPERATIONS" ,nrotk);
1223+
1224+ if (test_brav)
1225+ {
1226+ ModuleBase::GlobalFunc::OUT (ofs_running," PURE POINT GROUP OPERATIONS" ,nrot);
1227+ ModuleBase::GlobalFunc::OUT (ofs_running," SPACE GROUP OPERATIONS" ,nrotk);
1228+ }
12141229
12151230 // -----------------------------------------------------
12161231 // fill the rest of matrices and vectors with zeros
@@ -1775,4 +1790,4 @@ void Symmetry::print_pos(const double* pos, const int &nat)
17751790 }
17761791 return ;
17771792}
1778- }
1793+ }
0 commit comments