ID of Atoms in a Group

I’m trying to get the average distance of atoms in different slices of a nanotube from the center of mass to use as a radius for future calculations.

The only option I plan to use based on doc review so far is to use a dump.

Is there another way to get the group IDs?

I’m trying to avoid having to run each time I need to get this information.



10-2-cnt.lmp (4.21 KB)

I'm not sure what you want to do. The variable
command can compute the COM of a group of atoms,
and calculate a distance of each atom from that COM.

To do slices, you could use the fix ave/spatial command
with that variable to calc the average distance of atoms
in a slice from the COM.