force-h2020 / force-bdss-plugin-gromacs

Gromacs BDSS data sources, as well as a stand-alone wrappers around Gromacs tools.
MIT License
0 stars 0 forks source link

FIX: Implemented numpy.rint in minimum image routine #9

Closed flongford closed 5 years ago

flongford commented 5 years ago

Original implementation of force_gromacs.tools.distances.minimum_image function included user made command to round an array of floats to the nearest integer that relied on floor rounding when converting between data types. This has been replaced by numpy.rint, which does not include this reliance, to improve robustness of code. However, by doing so we need to ensure that all arguments passed into rint are of the same data type.

Subsequent amendments have been made to unit tests to ensure both input arguments to minimum_image are of the same data type .