|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Functions | |
| bool | extract_last_frame (const std::string &cumulative_path, const std::string &frame_path) |
| Extract the last MD frame from a fixed-name cumulative STRU file. | |
| bool | extract_frame_by_step (const std::string &cumulative_path, int step, const std::string &frame_path) |
| Extract the MD frame whose marker matches a specific one-based step. | |
| int | last_frame_step (const std::string &cumulative_path) |
| Read the one-based step number of the last frame of a cumulative STRU. | |
| bool stru_frame_io::extract_frame_by_step | ( | const std::string & | cumulative_path, |
| int | step, | ||
| const std::string & | frame_path ) |
Extract the MD frame whose marker matches a specific one-based step.
| cumulative_path | path of the mode-1 "STRU" file holding one frame per output step, each introduced by a "# MD step N" comment line |
| step | one-based step number to match against the marker |
| frame_path | path of the single-frame file to (over)write with the matching frame; the caller passes this path to the structure readers |
Unlike extract_last_frame, this walks the cumulative STRU in full and rejects unrelated frames so a MD restart never mixes geometry from one step with Restart_md.txt metadata from another step. The target frame is copied verbatim, without its "# MD step N" comment line, into frame_path.
| bool stru_frame_io::extract_last_frame | ( | const std::string & | cumulative_path, |
| const std::string & | frame_path ) |
Extract the last MD frame from a fixed-name cumulative STRU file.
| cumulative_path | path of the mode-1 "STRU" file holding one frame per output step, each introduced by a "# MD step N" comment line |
| frame_path | path of the single-frame file to (over)write with the last frame; the caller passes this path to the structure readers |
The last frame is copied verbatim, without its "# MD step N" comment line, into frame_path. The side file is rewritten on every call so repeated restarts always see the most recent frame.
| int stru_frame_io::last_frame_step | ( | const std::string & | cumulative_path | ) |
Read the one-based step number of the last frame of a cumulative STRU.
| cumulative_path | path of the mode-1 "STRU" file |