@@ -729,39 +729,41 @@ void Force_Stress_LCAO<T>::getForceStress(UnitCell& ucell,
729729 }
730730 }
731731
732+ const bool screen = PARAM.inp .test_stress ;
733+
732734 GlobalV::ofs_running << " \n PARTS OF STRESS: " << std::endl;
733735 GlobalV::ofs_running << std::setiosflags (std::ios::showpos);
734736 GlobalV::ofs_running << std::setiosflags (std::ios::fixed) << std::setprecision (10 ) << std::endl;
735- ModuleIO::print_stress (" OVERLAP STRESS" , soverlap, PARAM. inp . test_stress , ry);
736- ModuleIO::print_stress (" T STRESS" , stvnl_dphi, PARAM. inp . test_stress , ry);
737- ModuleIO::print_stress (" VNL STRESS" , svnl_dbeta, PARAM. inp . test_stress , ry);
738- ModuleIO::print_stress (" T_VNL STRESS" , stvnl, PARAM. inp . test_stress , ry);
739- ModuleIO::print_stress (" VL_dPHI STRESS" , svl_dphi, PARAM. inp . test_stress , ry);
740- ModuleIO::print_stress (" VL_dVL STRESS" , sigmadvl, PARAM. inp . test_stress , ry);
741- ModuleIO::print_stress (" HAR STRESS" , sigmahar, PARAM. inp . test_stress , ry);
742- ModuleIO::print_stress (" EWALD STRESS" , sigmaewa, PARAM. inp . test_stress , ry);
743- ModuleIO::print_stress (" cc STRESS" , sigmacc, PARAM. inp . test_stress , ry);
744- ModuleIO::print_stress (" XC STRESS" , sigmaxc, PARAM. inp . test_stress , ry);
737+ ModuleIO::print_stress (" OVERLAP STRESS" , soverlap, screen , ry, GlobalV::ofs_running );
738+ ModuleIO::print_stress (" T STRESS" , stvnl_dphi, screen , ry, GlobalV::ofs_running );
739+ ModuleIO::print_stress (" VNL STRESS" , svnl_dbeta, screen , ry, GlobalV::ofs_running );
740+ ModuleIO::print_stress (" T_VNL STRESS" , stvnl, screen , ry, GlobalV::ofs_running );
741+ ModuleIO::print_stress (" VL_dPHI STRESS" , svl_dphi, screen , ry, GlobalV::ofs_running );
742+ ModuleIO::print_stress (" VL_dVL STRESS" , sigmadvl, screen , ry, GlobalV::ofs_running );
743+ ModuleIO::print_stress (" HAR STRESS" , sigmahar, screen , ry, GlobalV::ofs_running );
744+ ModuleIO::print_stress (" EWALD STRESS" , sigmaewa, screen , ry, GlobalV::ofs_running );
745+ ModuleIO::print_stress (" cc STRESS" , sigmacc, screen , ry, GlobalV::ofs_running );
746+ ModuleIO::print_stress (" XC STRESS" , sigmaxc, screen , ry, GlobalV::ofs_running );
745747 if (vdw_solver != nullptr )
746748 {
747- ModuleIO::print_stress (" VDW STRESS" , sigmaxc, PARAM. inp . test_stress , ry);
749+ ModuleIO::print_stress (" VDW STRESS" , sigmaxc, screen , ry, GlobalV::ofs_running );
748750 }
749751 if (PARAM.inp .dft_plus_u )
750752 {
751- ModuleIO::print_stress (" DFTU STRESS" , stress_dftu, PARAM. inp . test_stress , ry);
753+ ModuleIO::print_stress (" DFTU STRESS" , stress_dftu, screen , ry, GlobalV::ofs_running );
752754 }
753755 if (PARAM.inp .sc_mag_switch )
754756 {
755- ModuleIO::print_stress (" DeltaSpin STRESS" , stress_dspin, PARAM. inp . test_stress , ry);
757+ ModuleIO::print_stress (" DeltaSpin STRESS" , stress_dspin, screen , ry, GlobalV::ofs_running );
756758 }
757- ModuleIO::print_stress (" TOTAL STRESS" , scs, PARAM. inp . test_stress , ry);
759+ ModuleIO::print_stress (" TOTAL STRESS" , scs, screen , ry, GlobalV::ofs_running );
758760 } // end of test
759761
760762 GlobalV::ofs_running << std::setiosflags (std::ios::left);
761763
762764 // print total stress
763765 bool screen = false ;
764- ModuleIO::print_stress (" TOTAL-STRESS" , scs, screen, ry);
766+ ModuleIO::print_stress (" TOTAL-STRESS" , scs, screen, ry, GlobalV::ofs_running );
765767
766768 double unit_transform = 0.0 ;
767769 unit_transform = ModuleBase::RYDBERG_SI / pow (ModuleBase::BOHR_RADIUS_SI, 3 ) * 1.0e-8 ;
0 commit comments