[lammps-users] Maximum number of groups

       I was wondering if i can create more than 32 groups in a run.
There is a setting in group.cpp which defines that number. But just
redefining it might not help as i found that no matter what the 32nd
group is basically the 'all' group of the system. Any input regarding
modifying the code or workaround is appreciated.



You cannot, unless you are sure of the size of an int on your architecture. Groups are managed through bits by atom->group, which is the size of an int. Generally sizeof(int) = 4, although, depending on architecture, it could be 8 as well. The easiest way to find out is to write a small program printing out sizeof(int), using the same compiler as you use to compile LAMMPS. For size 4 you can only use 32 groups, for size 8 you can bump it up to 64.