Neigh_modify exclude dynamically

I’m running a simulation for which I would like to dynamically exclude some atoms from the neighbour list building. It semms that when using a dynamic group the neig_modify command simply ignores it. I found another issue where this problem was commented but no solution was provided for this particular issue.

neigh_modify works perfectly fine with static groups and I checked that my dynamic groups are not empty

Example:

region          ss sphere 50 50 50 100
group           mobile_static region ss
group           mobile_dynamic dynamic all region ss every 1
neigh_modify every 1 exclude group mobile_dynamic

The command excludes properly for static but not for dynamic

When reporting unexpected behavior, please always report which LAMMPS version you are using and what platform you are running on.

This command should create an error since there is only one group given, but you need two.

From looking at the source code that updates the group bitmasks for atoms, I can see that there could be an issue using dynamic groups for neighbor lists, since they are updated after the neighbor list build.

I can confirm that. We are looking into what would be a proper solution for this, but for the time being the only path would be to throw and error when dynamics groups are used for neighbor list exclusions.

1 Like

Yes indeed. I copied the command improperly. With the right command it does not work either. My lammps version is 27 Jun 2024