MDANSE
MDANSE copied to clipboard
[BUG] DistHistCutoffWidget crashes when no box is defined
Description of the error DistHistCutoffWidget defines the maxium r that can be accessed in a simulation, based on the simulation box dimensions. This causes a crash when the trajectory has no periodic boundary conditions and no box is defined.
Describe the expected result The maximum should be determined based on the span of the atom coordinates in the trajectory.
Describe the actual result A NaN value is calculated.
Suggested fix Add a check for the box being defined.
Additional details PDF calculations can be performed also when there is no box in the trajectory. For this reason we should not disable the calculations altogether, but come up with usable limits instead.