Apply Fix Momentum to a dynamic group

Dear Users,

Is there is any way to apply fix momentum command to a dynamic group.

I am getting the following error message
ERROR: Fix mom does not allow use of dynamic group (…/modify.cpp:228)

Any help would be appreciated.

Dear Users,

Is there is any way to apply *fix momentum* command to a dynamic group.

I am getting the following error message
ERROR: Fix mom does not allow use of dynamic group (../modify.cpp:228)

​this test is controlled​ by the flag dynamic_group_allow. if you set it
to 1 in the constructor of the fix in question, dynamic groups will be
allowed.
by default, this is set to 0, because many fixes need a proper code review
to determine, whether they can support dynamic groups.
in the case of fix momentum, there is for example the check for groups
without atoms. with static groups, the existing test in the constructor is
sufficient.
to support dynamic groups properly in fix momentum, some additional coding
is required.

axel.

Dear Sir,

Thank You for your reply. Has anyone did the mentioned additional codes?

I don’t know much about the C++ coding. Any help would be appreciated.

Dear Sir,

Thank You for your reply. Has anyone did the mentioned additional codes?

i don't understand this question. if somebody had made the changes, they
would be included in LAMMPS.

I don't know much about the C++ coding. Any help would be appreciated.

​i'll have a look. perhaps the required changes are small.

axel.​