diff --git a/source/module_esolver/esolver_dp.cpp b/source/module_esolver/esolver_dp.cpp index de33811fae..e1c83b367d 100644 --- a/source/module_esolver/esolver_dp.cpp +++ b/source/module_esolver/esolver_dp.cpp @@ -136,6 +136,8 @@ void ESolver_DP::cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) { stress = dp_virial; + ModuleIO::print_stress("TOTAL-STRESS", stress, true, false); + // external stress double unit_transform = ModuleBase::RYDBERG_SI / pow(ModuleBase::BOHR_RADIUS_SI, 3) * 1.0e-8; double external_stress[3] = {PARAM.inp.press1, PARAM.inp.press2, PARAM.inp.press3}; @@ -143,8 +145,6 @@ void ESolver_DP::cal_stress(UnitCell& ucell, ModuleBase::matrix& stress) { stress(i, i) -= external_stress[i] / unit_transform; } - - ModuleIO::print_stress("TOTAL-STRESS", stress, true, false); } void ESolver_DP::after_all_runners(UnitCell& ucell) diff --git a/source/module_esolver/esolver_gets.cpp b/source/module_esolver/esolver_gets.cpp index 842b0340e1..e402cbc082 100644 --- a/source/module_esolver/esolver_gets.cpp +++ b/source/module_esolver/esolver_gets.cpp @@ -72,12 +72,6 @@ void ESolver_GetS::before_all_runners(UnitCell& ucell, const Input_para& inp) two_center_bundle_, orb_); - // 4) initialize the density matrix - // DensityMatrix is allocated here, DMK is also initialized here - // DMR is not initialized here, it will be constructed in each before_scf - dynamic_cast>*>(this->pelec) - ->init_DM(&this->kv, &(this->pv), inp.nspin); - ModuleBase::timer::tick("ESolver_GetS", "before_all_runners"); } diff --git a/source/module_esolver/esolver_lj.cpp b/source/module_esolver/esolver_lj.cpp index 54db4ba3ac..f4ea687517 100644 --- a/source/module_esolver/esolver_lj.cpp +++ b/source/module_esolver/esolver_lj.cpp @@ -104,6 +104,8 @@ void ESolver_LJ::runner(UnitCell& ucell, const int istep) { stress = lj_virial; + ModuleIO::print_stress("TOTAL-STRESS", stress, true, false); + // external stress double unit_transform = ModuleBase::RYDBERG_SI / pow(ModuleBase::BOHR_RADIUS_SI, 3) * 1.0e-8; double external_stress[3] = {PARAM.inp.press1, PARAM.inp.press2, PARAM.inp.press3}; @@ -111,8 +113,6 @@ void ESolver_LJ::runner(UnitCell& ucell, const int istep) { stress(i, i) -= external_stress[i] / unit_transform; } - - ModuleIO::print_stress("TOTAL-STRESS", stress, true, false); } void ESolver_LJ::after_all_runners(UnitCell& ucell)