22 if (out_app_flag < 0 || out_app_flag > 2)
24 throw std::invalid_argument(
"frame_appends: out_app_flag must be 0, 1 or 2, got "
25 + std::to_string(out_app_flag));
29 throw std::invalid_argument(
"frame_appends: istep must be non-negative, got "
30 + std::to_string(istep));
33 return out_app_flag == 1 && istep > 0;
37inline std::string
stru_frame_filename(
const std::string& directory,
const int out_app_flag,
const int istep)
40 if (out_app_flag == 2)
42 return directory +
"STRU" + std::to_string(istep + 1);
44 return directory +
"STRU";
Internal helpers shared by the R-space sparse text writers. Declared here (instead of duplicated in e...
Definition csr_reader.cpp:8
bool frame_appends(const int out_app_flag, const int istep)
Tell whether an output written for ionic step istep should append.
Definition frame_append.h:20
std::string stru_frame_filename(const std::string &directory, const int out_app_flag, const int istep)
Fixed STRU for overwrite/append modes; numbered STRU for mode 2.
Definition frame_append.h:37