Closed hejamu closed 2 years ago
Good idea of changing these. Would you be able to do it? The lines are here:
We ran through a test to check the units and maybe the function
will breaks. An additional test for None would be sufficient I guess.
Closed by #99
If one is using an AnalysisClass on a trajectory with only one frame, the AnalysisBaseClass from MDA will happily do exactly that. This is because at initialization ( https://github.com/MDAnalysis/mdanalysis/blob/3769ee29e5907221527ff0ec88a8c5acf9f86dee/package/MDAnalysis/analysis/base.py#L247 ), if
start
,stop
andstep
areNone
, and the trajectory is ONE frame long, it sets them to 0, 1 and 1 respectively.mdacli however sets the default values to
start = 0
,stop = -1
andstep = 1
. This does not result in the same behaviour, since for array of length 1:This difference in behaviour finally matters at this point: https://github.com/MDAnalysis/mdanalysis/blob/3769ee29e5907221527ff0ec88a8c5acf9f86dee/package/MDAnalysis/analysis/base.py#L296
Maybe setting the defaults to
None
would be an option?