@@ -108,7 +108,8 @@ void wfc_nao_write2file(const std::string &name, const double* ctot, const int n
108108 ofs << " \n " << wg (ik,i) << " (Occupations)" ;
109109 for (int j=0 ; j<nlocal; j++)
110110 {
111- if (j % 5 == 0 ) ofs << " \n " ;
111+ if (j % 5 == 0 ) { ofs << " \n " ;
112+ }
112113 ofs << ctot[i*nlocal + j] << " " ;
113114 }
114115 }
@@ -173,8 +174,8 @@ void wfc_nao_write2file_complex(const std::string &name, const std::complex<doub
173174 {
174175 ModuleBase::WARNING (" ModuleIO::write_wfc_nao" ," Can't write local orbital wave functions." );
175176 }
176- ofs << std::setprecision (25 );
177- ofs << ik+1 << " (index of k points)" << std::endl;
177+ ofs << std::setprecision (8 );
178+ ofs << ik+1 << " (index of k points)" << std::endl;
178179 ofs << kvec_c.x << " " << kvec_c.y << " " << kvec_c.z << std::endl;
179180 ofs << nbands << " (number of bands)" << std::endl;
180181 ofs << nlocal << " (number of orbitals)" ;
@@ -189,7 +190,8 @@ void wfc_nao_write2file_complex(const std::string &name, const std::complex<doub
189190 ofs << " \n " << wg (ik,i) << " (Occupations)" ;
190191 for (int j=0 ; j<nlocal; j++)
191192 {
192- if (j % 5 == 0 ) ofs << " \n " ;
193+ if (j % 5 == 0 ) { ofs << " \n " ;
194+ }
193195 ofs << ctot[i*nlocal + j].real () << " " << ctot[i*nlocal + j].imag () << " " ;
194196 }
195197 }
0 commit comments