-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
MDTools version
0.0.7.0
Python version
3.8.6
Operating system
CentOS Linux 7 (Core)
Expected behavior
The script should run without raising an IndexError.
Actual behavior
Sometimes, the script raises an IndexError:
Traceback (most recent call last):
File "mdtools/scripts/dynamics/extract_renewal_events.py", line 902, in <module>
data = extract_renewal_events(
File "mdtools/scripts/dynamics/extract_renewal_events.py", line 423, in extract_renewal_events
selix_t0[rix_t0] = selix_t0[rix_t0][0]
IndexError: index 0 is out of bounds for axis 0 with size 0Steps to reproduce
Difficult, sometimes the IndexError is raised, sometimes not.
I suppose that the error happens if in any trajectory frame none of the reference compounds is attached to a selection compound.
Supposed bug location
The IndexError is raised in line 423:
| selix_t0[rix_t0] = selix_t0[rix_t0][0] |
It indicates that there are not any reference compounds that are attached to a selection compound. However, in this case the if clause in line 405 should not have been entered. So, till now I do not really understand why this IndexError happens.
Possible solution
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working