pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
42 stars 15 forks source link

[Lammps] Include concept of `group` in pyiron #1371

Open samwaseda opened 5 months ago

samwaseda commented 5 months ago

I would like to suggest to include the concept of group inside pyiron, by allowing the user to have a tag like group in structure.arrays (which is an ASE attribute), which can look like:

structure.arrays["group_A"] = [0, 0, 1, 1, 1, 1, 0, 0]  # maybe has to be numpy array
structure.arrays["group_B"] = [1, 0, 0, 1, 1, 2, 0, 0]  # maybe has to be numpy array

where the numbers 0 and 1 refer to the group ids. This should be translated inside the Lammps script into

group A_0 id 1 2 7 8
group A_1 id 3 4 5 6
group B_0 id 2 3 7 8
group B_1 id 1 4 5
group B_2 id 6