-
Notifications
You must be signed in to change notification settings - Fork 599
Labels
Description
Summary
If LAMMPS restarts, model_devi.out should be appended to instead of creating a new file.
Detailed Description
How to implement:
- set
restartinfoto 1 (default)
See: https://github.com/lammps/lammps/blob/9da49d9c6f521eed62ca0752297c9057d34d39db/src/pair.cpp#L61 - add
read_restarttopair, where open the file usingstd::ofstream::appmode
See:
https://github.com/lammps/lammps/blob/9da49d9c6f521eed62ca0752297c9057d34d39db/src/pair.cpp#L725-L729
http://www.cplusplus.com/reference/fstream/ofstream/open/ - add a condition to skip opening a new file and adding headers if restart
See:deepmd-kit/source/lmp/pair_deepmd.cpp
Lines 838 to 850 in f70437f
if (numb_models > 1 && out_freq > 0){ fp.open (out_file); fp << scientific; fp << "#" << setw(12-1) << "step" << setw(18+1) << "max_devi_v" << setw(18+1) << "min_devi_v" << setw(18+1) << "avg_devi_v" << setw(18+1) << "max_devi_f" << setw(18+1) << "min_devi_f" << setw(18+1) << "avg_devi_f" << endl; }
Potential problems: Since we don't save restart files every timestep, there may be some duplicated data before and after restart.
Reactions are currently unavailable