MDANSE icon indicating copy to clipboard operation
MDANSE copied to clipboard

[BUG] DistHistCutoffWidget crashes when no box is defined

Open MBartkowiakSTFC opened this issue 1 year ago • 0 comments

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.

MBartkowiakSTFC avatar Jul 23 '24 13:07 MBartkowiakSTFC