cutoff distance in compute/cluster command

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?

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.

For what it’s worth I’m using the 4Jun14 version of LAMMPS in linux.

Thanks.

  • Jesse

Bechtel Marine Propulsion Corporation and Bechtel Plant Machinery, Inc., wholly owned subsidiaries of Bechtel National Inc., are Prime Contractors for the United States Naval Nuclear Propulsion Program.

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

Your logic makes perfect sense, but (I should have mentioned earlier) I am looking at interstitial and vacancy clustering in a lattice.

When the lattice atoms are filtered out, the defects are close enough that they should still be within (cutoff+skin) of each other and hence in each other’s neighbor lists, though not necessarily within the force cutoff, and should be available to the compute cluster/atom command.

Bechtel Marine Propulsion Corporation and Bechtel Plant Machinery, Inc., wholly owned subsidiaries of Bechtel National Inc., are Prime Contractors for the United States Naval Nuclear Propulsion Program.

There is no guarantee that all atoms currently within cutoff+skin

will be in the neighbor list. That is only true on the timestep
the neighbor list was built. At a later timestep a new atom
may have moved close enough to be within cutoff+skin.

All the neighbor list guarantees is that all atoms within cutoff

are in the list (assuming it is updated frequently enough).

Steve