Skip to content

Commit eb4ddf7

Browse files
authored
feat(relax): output final CIF structure after relaxation (#7452)
Add CIF file output for the final relaxed structure. Fixes #7451
1 parent c4939c7 commit eb4ddf7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

source/source_relax/relax_driver.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ void Relax_Driver::relax_driver(
172172
++istep;
173173
} // end while (istep <= inp.relax_nmax && !stop)
174174

175+
// output the final relaxed structure in CIF format
176+
if (inp.calculation == "relax" || inp.calculation == "cell-relax")
177+
{
178+
ModuleIO::CifParser::write(PARAM.globalv.global_out_dir + "STRU_FINAL.cif",
179+
ucell,
180+
"# Generated by ABACUS ModuleIO::CifParser",
181+
"data_?");
182+
}
175183

176184
if (inp.calculation == "relax" || inp.calculation == "cell-relax")
177185
{

0 commit comments

Comments
 (0)