diff --git a/source/source_io/module_hs/cal_pLpR.cpp b/source/source_io/module_hs/cal_pLpR.cpp index 41f1488a28a..a9eb2223762 100644 --- a/source/source_io/module_hs/cal_pLpR.cpp +++ b/source/source_io/module_hs/cal_pLpR.cpp @@ -273,9 +273,9 @@ void ModuleIO::AngularMomentumCalculator::kernel( // il and jl are indexes of the angular momentum, // iz and jz are indexes of the zeta functions // im and jm are indexes of the magnetic quantum numbers. - std::string fmtstr = "%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d"; - fmtstr += "%" + std::to_string(precision*2) + "." + std::to_string(precision) + "e"; - fmtstr += "%" + std::to_string(precision*2) + "." + std::to_string(precision) + "e\n"; + std::string fmtstr = "%4d %4d %4d %4d %4d %4d %4d %4d %4d %4d %4d %4d %4d"; + fmtstr += " %" + std::to_string(precision*2) + "." + std::to_string(precision) + "e"; + fmtstr += " %" + std::to_string(precision*2) + "." + std::to_string(precision) + "e\n"; FmtCore fmt(fmtstr); // placeholders diff --git a/source/source_relax/relax_driver.cpp b/source/source_relax/relax_driver.cpp index ef8c9b62e6f..ef97baf4dd7 100644 --- a/source/source_relax/relax_driver.cpp +++ b/source/source_relax/relax_driver.cpp @@ -172,6 +172,14 @@ void Relax_Driver::relax_driver( ++istep; } // end while (istep <= inp.relax_nmax && !stop) + // output the final relaxed structure in CIF format + if (inp.calculation == "relax" || inp.calculation == "cell-relax") + { + ModuleIO::CifParser::write(PARAM.globalv.global_out_dir + "STRU_FINAL.cif", + ucell, + "# Generated by ABACUS ModuleIO::CifParser", + "data_?"); + } if (inp.calculation == "relax" || inp.calculation == "cell-relax") {