-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add auto restart #292
Add auto restart #292
Conversation
I would not delete the steps ideally one write restart at the same step as printing, I will add maybe a note to that effect is the two are different. let us not defend the users from themselves |
Hopefully there would be a corresponding step, but realistically it's quite wasteful to generate a restart file as often as you'd want to output the statistics, so I'd expect this would happen for most use cases unavoidably. (Unavoidable, and non-trivially fixable being the problem, since the users' choices are reasonable) |
Just to make sure we're on the same page, I'm talking about something like
If the first command fails at step 140, then the When we (auto) restart, it resumes from step 100, so we end up with stats for 110, 120, 130 and 140 again. My issues is (1) I don't think the user should have to set Rather than deleting written data, for stats we could maybe check that the corresponding step doesn't already exist before writing again? If we added a label for traj we could potentially do the same for that? |
e6d6c7c
to
fd52210
Compare
From discussions with @oerc0122, perhaps for now it might be sufficient to add a label to each trajectory image ( Either way, it needs to be clearly documented. |
I will call it time_step or timestep otherwise is perfectly ok... maybe since you are at this add another time= time in fs... |
It turned out we already had an I think the varying frequencies of updating different info keys is still a problem for others e.g. "density" and "real_time", but we can think about that in a separate issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of minor things.
987317a
to
f9b7279
Compare
Co-authored-by: Jacob Wilkins <46597752+oerc0122@users.noreply.github.com>
f9b7279
to
fc01da0
Compare
Resolves #169
Adds auto restart option for MD, which generates
restart_stem
based on inputs (includingfile_prefix
andrestart_stem
), and if restarting simulation, uses the most recent matching file for the input structure.Also includes fixes for:
prefix_override
, which threw errors if given aPath
s (e.g. anything via--restart-stem
)restart_stem
was used, as currently forrestart_stem=stem
, files of the formstem-T300.0-res-1.extxyz
are created, the same as the old usage ofstruct_name
. With these changes, they should now bestem-1.extxyz
Note: the limit after restarting is the effectively the same as before - however far the previous simulation got + the full
steps
input (e.g. forNaCl-nvt-T300.0-res-100.extxyz
, with--steps 1000
, the last step would be 1100.)One thing to consider is that this implementation can (and arguably is likely) to lead to duplicated steps for statistics and/or trajectory file.
E.g. if you were to print statistics every 100 steps, but restart every 1000 steps, then the statistics file may to be written for a while after the last restart file. When we restart, we then append duplicate steps.
Do we want to delete these duplicate steps? This is even harder for the trajectory, since we'd have to calculate which images would be duplicated.