Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding group support #32

Closed
JPchico opened this issue Nov 10, 2021 · 2 comments · Fixed by #35
Closed

Adding group support #32

JPchico opened this issue Nov 10, 2021 · 2 comments · Fixed by #35
Assignees

Comments

@JPchico
Copy link
Collaborator

JPchico commented Nov 10, 2021

One nice feature of LAMMPS is the capability of treating different atoms in a different way via the definitions of groups.

Currently this is not possible in aiida-lammps. Adding groups would be a very good addition to bring more flexibility to the kind of calculations that can be done.

Part of this is addressed by the flexibilization of the input #27 . However, one would need to be able to pass which atoms belong to which group, one way would be via the kind_names in the StructureData where one could encode if an atom belongs to a given group or to another. One could also pass this as a separate Dict, or ArrayData.

The capability of having groups also means that fixes and computes need to be passed by group, meaning that this is something that also has to be dealt with in #27.

@JPchico JPchico self-assigned this Nov 10, 2021
@JPchico
Copy link
Collaborator Author

JPchico commented Nov 10, 2021

Looking at what is available in the lammps documentation about the read_data it does not seem possible to specify the group type directly in the file that is being read, one can only place all the atoms in that file in a given group.

It would seem that the "simplest" option is to allow the user to pass which atom types/ids belong to a given group as explained here. This could be done in the structure block.

The user could pass a dictionary such as

structure_options = {
    'groups':{
        'name': 'foo', 'args':  ['id', 10, 25],
        'name': 'bar', 'args': ['type', 4],
        'name': 'foobar', 'args': ['id', '100:10000:10']
    }
}

The names of the groups would be stored in the input generator so that when setting fixes and/or computes the existence of the group is checked against.

Using the types and/or ids would give quite a bit of flexibility to the users, and avoid the issue of having to deal with changes to the way in which the lammps structure file is written and/or coming up with some complex derived structure type.

@JPchico JPchico linked a pull request Feb 14, 2022 that will close this issue
JPchico pushed a commit to JPchico/aiida-lammps that referenced this issue Sep 28, 2022
@JPchico
Copy link
Collaborator Author

JPchico commented Feb 21, 2023

Closed via #50

@JPchico JPchico closed this as completed Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant