- atomate2.common.schemas.defects.sort_pos_dist(list_in, s1, s2, dist)#
Sort a list defined when we can only compute a positive-definite distance.
Sometimes, we can only compute a positive-definite distance between two objects. (E.g., the displacement between two structures). In these cases, standard sorting algorithms will not work. Here, we accept two reference points to give some sense of direction. We then sort the list based on the distance between the reference points. Note: this only works if the list falls on a line of some sort
List[Any] – The sorted list.
List[float] – The signed distances to the reference point (s1).
- Return type: