Grouping molecules by their sizes LAMMPS

Thank you for the insights. My approach was to use something like mol/renum where atoms within a distance are considered as part of the same molecule.

Further, if I could then group all molecules using a logical argument (molecule_size > 1), I can then nust restrict my atom swaps to this limited group while a mol/renum like fix keeps dynamically reassigning atoms to the above group.

However, Im unsure if LAMMPS allows one to group molecules by the number of member atoms in the respective mol IDs. Before I get down to actually writing down a fix, I wanted to confirm if there is a way to do all this with existing fixes and computes in LAMMPS.

So, is there a way that I can group all molecules/clusters that are larger than 1.

Thanks and Regards,

Srivastav Ranganathan
IIT Bombay
Mumbai
India

So, is there a way that I can group all molecules/clusters that are larger than 1.

I think Axel already answered this:

not sure if that is the right strategy. there is only a limited number
of groups possible in LAMMPS and most of the time what people need is
some kind of indexing and not grouping. this can be achieved by
partitioning atoms into “chunks”. the above referenced fix has been
likely obsoleted by the “chunk” infrastructure in LAMMPs. you can get
a cluster id and cluster size from a compute and then use either
information (or both) to group atoms into chunks and then operate on
these chunks.

Steve