The algorithm finds the two mutually closest atoms, saving the result in case the same call is made afterward from the opposite direction. However, the returned atom from the second call is always incorrect, which is why the feature was commented. As a result, the algorithm is run twice by the code that calls this function, when once should be sufficient.
_Originally posted by @primaryodors in https://github.com/primaryodors/primarydock/pull/388#discussion_r1405332732_
The algorithm finds the two mutually closest atoms, saving the result in case the same call is made afterward from the opposite direction. However, the returned atom from the second call is always incorrect, which is why the feature was commented. As a result, the algorithm is run twice by the code that calls this function, when once should be sufficient.