From 02c1c0ac55c86aeb2d134cfdbe41cb482f7e1c79 Mon Sep 17 00:00:00 2001 From: jiebin chen Date: Mon, 8 Jun 2026 05:50:50 +0000 Subject: [PATCH] feat(relax): output final CIF structure after relaxation Add CIF file output for the final relaxed structure. Fixes #7451 --- source/source_relax/relax_driver.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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") {