[Bug]: The script extract_renewal_events.py
fails if no renewal events occur
#213
Labels
bug
Something isn't working
MDTools version
0.0.7.0
Python version
3.8.6
Operating system
CentOS Linux 7 (Core)
Expected behavior
If no renewal event occurs, the script should still work and generate an output file.
The script might raise a warning but not an exception.
Actual behavior
If no renewal event occurs, the script raises an exception by construction:
Steps to reproduce
Run the script on a trajectory without renewal events (or choose the atom groups or the cutoff such that no renewal events occur).
Supposed bug location
Turn the exception in line 921 into a warning:
mdtools/scripts/dynamics/extract_renewal_events.py
Line 921 in 9afb244
This requires changes in the following code, because if no renewal events occur, the array
data
cannot be indexed as done in the script.Possible solution
A possible solution might be to initiate
data
as an array of NaN's of the appropriate shape if no renewal events occur.Additional context
No response
The text was updated successfully, but these errors were encountered: