@@ -316,16 +316,17 @@ void MD_func::outStress(const ModuleBase::matrix &virial, const ModuleBase::matr
316316 GlobalV::ofs_running<<" Virial Term is " <<virial_scalar*unit_transform<<" Kbar " <<std::endl;
317317 GlobalV::ofs_running<<" Kenetic Term is " <<(stress_scalar-virial_scalar)*unit_transform<<" Kbar " <<std::endl;
318318
319- GlobalV::ofs_running << std::setprecision (6 ) << std::setiosflags (ios::showpos) << std::setiosflags (ios::fixed) << std::endl;
320- ModuleBase::GlobalFunc::NEW_PART (" MD STRESS (KBAR)" );
321- for (int i=0 ; i<3 ; i++)
322- {
323- GlobalV::ofs_running << " " << std::setw (15 ) << stress (i,0 )*unit_transform
324- << std::setw (15 )<< stress (i,1 )*unit_transform
325- << std::setw (15 ) << stress (i,2 )*unit_transform << std::endl;
319+ GlobalV::ofs_running.unsetf (ios::fixed);
320+ GlobalV::ofs_running << std::setprecision (8 ) << std::endl;
321+ ModuleBase::GlobalFunc::NEW_PART (" MD STRESS (KBAR)" );
322+ for (int i=0 ; i<3 ; i++)
323+ {
324+ GlobalV::ofs_running << std::setw (15 ) << stress (i,0 )*unit_transform
325+ << std::setw (15 ) << stress (i,1 )*unit_transform
326+ << std::setw (15 ) << stress (i,2 )*unit_transform << std::endl;
326327
327- }
328- GlobalV::ofs_running << std::setiosflags (ios::left);
328+ }
329+ GlobalV::ofs_running << std::setiosflags (ios::left);
329330}
330331
331332void MD_func::MDdump (const int &step,
@@ -374,8 +375,8 @@ void MD_func::MDdump(const int &step,
374375 {
375376 for (int ia=0 ; ia<unit_in.atoms [it].na ; ++ia)
376377 {
377- ofs << std::setw ( 6 ) << index
378- << std::setw ( 4 ) << unit_in.atom_label [it]
378+ ofs << " " << index
379+ << " " << unit_in.atom_label [it]
379380 << " " << unit_in.atoms [it].tau [ia].x
380381 << " " << unit_in.atoms [it].tau [ia].y
381382 << " " << unit_in.atoms [it].tau [ia].z
0 commit comments