Finding minimum and maximum coordinates of a group

Dear LAMMPS community,

This question is related to the stable version of 29 Aug 2024.

I’m trying to automate finding the minimum and maximum coordinates of a particular group in my simulations, in a fixed boundary system.

I’ve tried looping with variable command through the atom IDs of this particular group, however, since atom-ids of this groups are not sorted and grouped within a range, I could not make the loop to work only within only the group in concern.

Any help is much appreciated and sorry if I’m missing something obvious in the manual!

Hi @marcelbalcik,

This is what compute reduce is made for.

1 Like

Hi,
You can use the group function “bound()”.

https://docs.lammps.org/variable.html#group-and-region-functions

1 Like

Wow, how did I miss that! Thank you very much!