-
Notifications
You must be signed in to change notification settings - Fork 9
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 MD progress bar with class #444
base: main
Are you sure you want to change the base?
Conversation
28628d2
to
b7a6376
Compare
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.
I'm not sure this is quite working as expected to, e.g. if I run
janus md --ensemble nvt --temp-time 20 --temp-start 0 --temp-end 20 --temp-step 10 --traj-every 1 --stats-every 1 --struct tests/data/NaCl.cif --steps 50
This pauses at 40/110 and seems to end at 90/110.
Ah, this is probably a quirk of how we treat a ramp starting at 0K, so not a general issue, but still something to handle.
I do also wonder if we ought to separate out heating and MD, and maybe even different stages of heating?
Ah thanks, I had missed that 0K steps were skipped. This should be handled properly now.
I felt like there should be an overall progress bar so that a user can get an estimate of the remaining total simulation time. I've added a second progress bar that tracks the current temperature step if applicable. Let me know what you think, I'm happy to adjust it of course.
Also, I never managed to reproduce anything like this. Let me know if you're still seeing it and I can have another look. |
ce7b4b1
to
938447d
Compare
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.
Looks good!
In terms of the specific format of the bars, perhaps we should discuss it tomorrow. My inclination would be a new bar for each stage, rather than a total bar and a current bar that changes what it's referring to, which is what I think it currently does.
Also, I never managed to reproduce anything like this. Let me know if you're still seeing it and I can have another look.
Ah, so I think the pause was the switch from the heat ramp to the MD, which was correctly as step 40, and then the 50 MD steps took it to 90, so it was just the total that was wrong, as it included 20 steps at 0K.
This will need rebasing and checking once #453 is merged. I'm happy to do that, even if it's sometime next week. |
bc0725e
to
73910d0
Compare
73910d0
to
45bb06d
Compare
I'm not sure this quite works for a simulation that is only heating.
initially shows 0/400, and 0/200 correctly, but doesn't update, then finally updates to 400/400 and 0/0. Another fun issue: if we cool to 0K, we have the same problem that it includes steps. We probably ought to test:
|
Resolves #405
Reworks the progress bar approach to extend
rich.progress.Progress
, just providing default formatting. This way, we can access all of the features of the progress bar, rather than just the iterator mode. Previous progress bars for phonons and single-point calculations still work in essentially the same way.The MD progress bar reads the number of completed steps each time it is updated, ensuring it remains accurate. The iterator mode with
Progress.track
was unstable in the case of e.g. an MD run of length 0. The frequency of updates of the progress bar can be chosen with theprogress_bar_update_every
argument.e.g. 30 steps of temperature ramp, 7 steps of MD:
