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:
Traceback (most recent call last):
File "mdtools/scripts/dynamics/extract_renewal_events.py", line 921, in <module>
raise ValueError("Could not detect any renewal event")
ValueError: Could not detect any renewal event
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:
|
raise ValueError("Could not detect any renewal event") |
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
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
datacannot be indexed as done in the script.Possible solution
A possible solution might be to initiate
dataas an array of NaN's of the appropriate shape if no renewal events occur.Additional context
No response