Compute nearest neighbour distance
yury-lysogorskiy opened this issue · 3 comments
Summary
After commit 299eda8 the following commands to compute nearest neighbour distance (NND):
compute dist all pair/local dist
compute min_dist all reduce min c_dist
results in error:
ERROR: Compute reduce compute dist does not calculate per-atom values (src/compute_reduce.cpp:254)
Last command: compute min_dist all reduce min c_dist
LAMMPS Version and Platform
LAMMPS (21 Nov 2023)
Expected Behavior
The command above should generate NND scalar
Actual Behavior
ERROR: Compute reduce compute dist does not calculate per-atom values (src/compute_reduce.cpp:254)
Last command: compute min_dist all reduce min c_dist
Steps to Reproduce
any simulation with commands above
Further Information, Files, and Links
@yury-lysogorskiy This is documented behavior. Please see the manual and the backward compatibility notices in the release notes for version 21 November 2023. You need to add the "inputs local" keyword to the failing compute reduce command as the "peratom" setting is the default.
https://www.lammps.org/bug.html
https://github.com/lammps/lammps/releases/tag/patch_21Nov2023
https://docs.lammps.org/compute_reduce.html
Dear @akohlmey , thank you for pointing to these pages, I tried that, but unfortunately, it still complains:
compute dist all pair/local dist
compute min_dist all reduce min c_dist inputs local
also results in
ERROR: Compute reduce compute dist does not calculate local values (src/compute_reduce.cpp:264)
Last command: compute min_dist all reduce min c_dist inputs local
@yury-lysogorskiy There is indeed a cut-n-paste bug in the source code. Commit 7dbd649 should resolve this.