Possible bug with dynamic groups and cluster/atom.

Hi everyone.

I may have found a possible bug when using dynamic groups and the compute cluster/atom. I did my best to reproduce the bug with a minimum script (attached). I ran this same script with the (13 May 2014) version of LAMMPS. The potential used is available in http://www.ctcms.nist.gov/potentials/Download/Cu-YM/Cu01.eam.alloy

A small description: I create a crystal and define a dynamic group that contains the atoms in a region inside the crystal. Using this dynamic group I compute the cluster number of each atom in the group. Then I run the simulation dumping all atoms in the dynamic group with its position and cluster number.

The possible bug is that after a certain number of timesteps (800 in my simulation) the cluster number of my atoms become zero (i.e., a flag for “this atom does not belong to the group you want to compute the cluster number”). This does not make sense because I’m only dumping atoms that belong to the group I compute the cluster number.

My guess is that, at some point, one of the atoms of the group is given the cluster ID zero and this ID is spread through that cluster of the group. This is supported by other (more complex) simulations where I have more than one cluster in the group, then all clusters have different numbers but there is always one cluster with ID zero.

Best,

Rodrigo

minimum.lmp (1.11 KB)

Hi,Rodrigo~
The cluster ID is zero means that the cluster is not in the compute dynamic group which you define, as lammps manual said. one question, how can you define a dynamic group which represent a specific growing cluster, so we can do some compute about it, such the cluster size (cluster gyration radius) versus to time or particle numbers in it? thank you in advance!
best wishes
Xuepeng Liu

This was a bug. Compute cluster/atom needs

the group assignments for ghost atoms (not just owned
atoms) to operate correctly, and those weren’t being
updated as needed for a dynamic group.

Will be fixed in a patch later today …

thanks for the good test script,
Steve