[lammps-users] problem with number of groups exceeding 32

hi all,

I was trying to do MD simulation in which I have 65 groups. I have changed
the variable MAX_GROUP to 256 (earlier it was 32) in group.cpp and recompiled and tried.
It’s accepting the 65 groups as I defined, but the problem is: the count of number of atoms
in each group, printed out during the run is wrong for those groups whose index is greater than 32.

Can somebody tell me if there are any other parameters that I need to modify (apart from MAX_GROUP
in group.cpp) in order to get it right?

I have rechecked the input and data files, there is no error in defining the groups, or the data. The simulation
is running, however.

Part of the output is given here:
.
.
.
.
4 atoms in group 30
4 atoms in group 31
1792 atoms in group 32
256 atoms in group 33
8 atoms in group 34
8 atoms in group 35
.
.

the data and groups defined by me are such that each group has 4 atoms, and the total number of atoms
in the system is 1792 and another group (which was not named numerically) has 256 atoms.

regards,
Gopal

You'll have to change *everything* in the code that involves using
bitmask and its stored values. I wouldn't do that if I were you. Try
using molecules instead of groups if possible.

Zhun-Yong

Zhun-yong is correct. You can't do this. The Q is why
do you need 64 (or more groups). There is probably
a different/better way to do what you want.

Steve

hi Steve and Zhun-Yong. Thanks a lot for the inputs.
I’ve changed my input files and now using molecules
to serve the purpose, and it’s working!

Gopal