Closed lmyhill closed 5 months ago
@lmyhill @hlclemson
You should be calling get_pairwise_distance()
, not get_pairwise_distances()
.
Calling the second leads to calculating all pairwise distances for a group of positions of size 1, and the distance between that singleton position and itself is 0.
Calling this function on an array
(or tensor
if using torch
) with length 1 now warns a custom WasteWarning
telling the user to call get_pairwise_distance()
instead (commit 7b83c3a).
Using the function get_pairwise_distances within looping structure for individual piece-wise distances, the returned value is always 0.
LINES FROM IMPLEMENTATION
TERMINAL OUTPUT
[[3.2 3.2 0. ]] <---- print(first_postion-second_position) [[0.]] <----print(dist) [[4.8 1.6 1.6]] [[0.]] [[3.2 0. 0. ]] [[0.]] [[1.6 1.6 1.6]] [[0.]] ...
INCLUDED FILE Results of analysis where the first column is the piece-wise distance reported between atoms and the other columns contain computed stress correlations correlationData.txt