Fix adapt and dynamic groups

Hello,

Could someone please explain to me why dynamic groups are disabled in fix/adapt?

I've been using them together to reset charge on atoms in a certain region (before dynamic_group_allow was introduced), and they seemed to behave correctly.

Of course, maybe I'm just not seeing the use case where they crash and burn when used together.

Best regards,
Pavel Zun

Hello,

Could someone please explain to me why dynamic groups are disabled in
fix/adapt?

​because they are not explicitly enabled.

dynamic groups have caused some problems in the past with modules in LAMMPS
that were not compatible. with that in mind a flag was introduced to fixes
and computes to signal the compatibility. because of the general nature of
these styles, dynamic groups are by default disabled for fixes and enabled
for computes.​

​this way, developers can better review when new use cases of dynamic
groups appear and review and enable, if compatible.​

I've been using them together to reset charge on atoms in a certain
region (before dynamic_group_allow was introduced), and they seemed to
behave correctly.

​it should work for part of the use cases where per type scale factors are
used, but fail with the atom mode of fix adapt, because the stored original
data cannot be restored if the group definition changes. so this fix would
need some more careful checking of what is supported and what not.

Of course, maybe I'm just not seeing the use case where they crash and
burn when used together.

​it is easy to enable it, by adding​

dynamic_group_allow
​ = 1;​

​to the constructor.​

I enabled dynamic groups with fix adapt. But as Axel says,

you will get an error if you try to use it with an atom attribute.

Will be in next patch,
Steve

I see, thanks!