martiniani-lab / pele

Python energy landscape explorer
Other
5 stars 2 forks source link

When the coordinates are too large, periodic distances fail #14

Open spraharsh opened 1 year ago

spraharsh commented 1 year ago

When the coordinates are $\sim 10^9$ times the box length, finding the periodic distance between two atoms fails because the potential tries to express the cartesian distance as a 32-bit integer times the box length. This is in a piece of code that needs to be fast, so we can't raise an exception always. Ideally, there should be an assertion that needs to be disabled for production runs.