@@ -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,31 @@ 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+ ofs_running<<" Warning : If the optimal symmetric configuration is not the input configuration, " <<' \n ' ;
172+ ofs_running<<" you have to manually change configurations, ABACUS would only calculate the input structure!" <<' \n ' ;
173+
174+ test_brav = false ; // use the input ibrav to calculate
175+ // ModuleBase::GlobalFunc::OUT(ofs_running,"ibrav",ibrav);
176+ this ->setgroup (this ->symop , this ->nop , this ->ibrav );
177+ // now select all symmetry operations which reproduce the lattice
178+ // to find those symmetry operations which reproduce the entire crystal
179+ this ->getgroup (this ->nrot , this ->nrotk , ofs_running);
180+ // find the name of point group
181+ this ->pointgroup (this ->nrot , this ->pgnumber , this ->pgname , this ->gmatrix , ofs_running);
182+ // ModuleBase::GlobalFunc::OUT(ofs_running,"POINT GROUP", this->pgname);
183+ // write();
174184
175185 delete[] dirpos;
176186 delete[] newpos;
@@ -705,6 +715,7 @@ void Symmetry::lattice_type(
705715// GlobalV::ofs_running << " pre_brav=" << pre_brav << std::endl;
706716// GlobalV::ofs_running << " temp_brav=" << temp_brav << std::endl;
707717
718+
708719 if ( temp_brav < pre_brav)
709720 {
710721 // if the symmetry of the new vectors is higher, store the new ones
@@ -771,7 +782,6 @@ void Symmetry::lattice_type(
771782 }
772783 }
773784 ofs.close ();
774-
775785
776786 }
777787
@@ -811,9 +821,12 @@ void Symmetry::lattice_type(
811821 }
812822 }*/
813823 brav = pre_brav;
814- bravname = get_brav_name (brav);
824+ // brav = temp_brav;
825+ // bravname = get_brav_name(brav);
826+ real_brav = temp_brav; // pengfei Li 15-3-2022
827+ bravname = get_brav_name (real_brav);
815828
816- ModuleBase::GlobalFunc::OUT (GlobalV::ofs_running," BRAVAIS TYPE" ,brav );
829+ ModuleBase::GlobalFunc::OUT (GlobalV::ofs_running," BRAVAIS TYPE" ,real_brav );
817830 ModuleBase::GlobalFunc::OUT (GlobalV::ofs_running," BRAVAIS LATTICE NAME" ,bravname);
818831 return ;
819832}
@@ -1209,8 +1222,12 @@ void Symmetry::getgroup(int &nrot, int &nrotk, std::ofstream &ofs_running)
12091222 // total number of space group operations
12101223 // -----------------------------------------------------
12111224 nrotk += nrot;
1212- ModuleBase::GlobalFunc::OUT (ofs_running," PURE POINT GROUP OPERATIONS" ,nrot);
1213- ModuleBase::GlobalFunc::OUT (ofs_running," SPACE GROUP OPERATIONS" ,nrotk);
1225+
1226+ if (test_brav)
1227+ {
1228+ ModuleBase::GlobalFunc::OUT (ofs_running," PURE POINT GROUP OPERATIONS" ,nrot);
1229+ ModuleBase::GlobalFunc::OUT (ofs_running," SPACE GROUP OPERATIONS" ,nrotk);
1230+ }
12141231
12151232 // -----------------------------------------------------
12161233 // fill the rest of matrices and vectors with zeros
@@ -1775,4 +1792,4 @@ void Symmetry::print_pos(const double* pos, const int &nat)
17751792 }
17761793 return ;
17771794}
1778- }
1795+ }
0 commit comments