westpa
westpa copied to clipboard
Inconsistent 'west_current_iteration' and iterations.
Prerequisites
- [x] Can you reproduce the problem in safe mode?
- [x] Are you running the latest version?
- [x] Are you reporting to the correct repository?
- [x] Did you perform a cursory search?
For more information, see the CONTRIBUTING
guide.
Describe the bug. A clear and concise description of what the bug is.
Depending on how the simulation is stopped (or truncated), the 'west_current_iteration' attribute can be n or n+1. This affects tools such as w_assign
, w_multi_west
when dealing with auxdata.
This is likely due to the fact that while the 'pcoord' group is always created when an iteration is prepared, auxdata is only generated after the walkers are run, leading to missing auxdata dataset(s) that may crash the corresponding tool.
To Reproduce. Steps to reproduce the behavior:
- Run any simulation with a max_total_iterations = n and let it stop on its own at n.
- 'west_current_iteration' would be n+1 after it ends. There will also be iteration n+1 in 'iterations' in the h5 'iterations', with a 'pcoord' dataset but no auxdata.
- Run
w_truncate -n n+1
on the west.h5 - 'west_current_iteration' will now be n.
Expected behavior. A clear and concise description of what you expected to happen.
It would be great if it could be consistent such that auxdata and pcoord are generated at the same time in data_manager.prepare_iteration
, preventing tools from breaking. Or do not create the next iteration if it's going to end at n, just so it's consistent for tools.
Actual behavior. A clear and concise description of what actually happens.
max_total_iterations = n ends with iteration n+1 present, without auxdata datasets.
WESTPA version and platform. Which version you're running, on what OS, and how it was built (e.g. conda, system libraries, manually installed dependencies)
2.0, but should be reproducible in 1.0.
Additional context. Add any other context about the problem here. If necessary config files are required to reproduce the bug, attach the files here here.