The maximum cutoff distance in the compute cluster/atom command when using
a pair potential appears to be the potential force cutoff distance.
Shouldn't that distance be (cutoff+skin) since that is the distance
criteria for building neighbor lists which are used by the cluster/atom
command?
No, I don't think so. No matter how long the skin distance is, only atoms
within the cutoff have contributions to the center atom while atoms outside
the cutoff have no effect. If they have no effect on the center atom, then
compute cluster/atom should not consider them as part of the "cluster".
How can a cluster include atoms that have no effect? Therefore the
original if check should be more reasonable.
To test this I changed the if statement in compute_cluster_atom.cpp from
if (sqrt(cutsq) > force->pair->cutforce) error...
to be
if (sqrt(cutsq) > force->pair->cutforce + neighbor->skin) error...
which seems to produce the right behavior. I just want to make sure I'm
not fooling myself and/or using the command incorrectly.
As long as the cutsq is the same, compute cluster/atom produces the same
results no matter how long the skin distance is (zero or some finite
number).
Ray