[lammps-users] adding group-ID to atoms within that group

The way I would do this is to use the molecule ID (assuming you have an atomic
system). The set command will set it to any value you want, which you could
do for each group or region you have defined. Then you can output it per-atom
in a dump file. But it would require you run with an atom_style that
has a molecular
tag. If you are converting your restart file to a data file anyway, it would be
easy to add mol IDs and do the new run with an atom_style like bond, that has
a mol ID.


Dear Steve,

thanks for your help. However, I wanted to clarify if I got it right:

1. go to the converted data-file and add a column with molecule-ID after the
2. change the atom_style to "molecular" in the input-file
3. use set commands to assign the atoms within each group to a corresponding

Is that about right?

Best regards,

- - - - - - - - - -
  Patrick Armstrong, M.Sc.
  Lehrstuhl für Feststoff- und Grenzflächenverfahrenstechnik
  Friedrich-Alexander-Universität Erlangen-Nürnberg
  Cauerstraße 4
  D-91058 Erlangen

  Tel.: +49 (0)9131 / 761-118
  Fax: +49 (0)9131 / 85-294-02
  Email: [email protected]
- - - - - - - - - -

yep - that's the idea