Remove bb z-check on while loop when building neighbor lists

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti 2022-02-01 00:46:12 +01:00
parent e64c3345bc
commit 4a5216a177

View File

@ -247,7 +247,7 @@ void buildNeighbor(Atom *atom, Neighbor *neighbor) {
jbb_zmax = atom->clusters[cj].bbmaxz;
} while(m + 1 < c && (ibb_zmin - jbb_zmax) * (ibb_zmin - jbb_zmax) > cutneighsq);
while(m < c && jbb_zmax - ibb_zmax < cutneighsq) {
while(m < c) {
if((jbb_zmin - ibb_zmax) * (jbb_zmin - ibb_zmax) > cutneighsq) {
break;
}