From 33026e5fd3b641e37a801ee989aaee261a7116da Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Feb 2025 18:41:08 -0500 Subject: [PATCH] correctly compute cutneighmin when multiple requests with different cutoff exist --- src/neighbor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index e12713094e..a288a489f4 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -865,6 +865,13 @@ int Neighbor::init_pair() } } + // update cutneighmin based on individual neighbor list requests + + for (i = 0; i < nrequest; ++i) { + if (requests[i]->cut) cutneighmin = MIN(cutneighmin, requests[i]->cutoff + + (requests[i]->occasional ? 0.0 : skin)); + } + // morph requests in various ways // purpose is to avoid duplicate or inefficient builds // also sort requests by cutoff distance for trimming