Fixing an off by one indexing error when slicing trajectories. #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is to fix errors when the slicing of trajectories occurs (MDAnalysis uses the end variable and then goes to frame end-1).
Changes
Adapting the end parameter to account for the whole trajectory as the default, but to give the expected frames and frame count when end is set to a positive integer.
Impact
This should give the correct results. In particular, it will avoid the problem of the dihedral angle appearing as 0 when there was a mismatch between the frames MDAnalysis included in the timesteps loop and the expected number of frames reducing the number of incorrect peaks in the histograms for the conformational entropy.