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

Lammps converter fix #430

Merged
merged 13 commits into from
May 3, 2024
Merged

Lammps converter fix #430

merged 13 commits into from
May 3, 2024

Conversation

MBartkowiakSTFC
Copy link
Collaborator

@MBartkowiakSTFC MBartkowiakSTFC commented Apr 30, 2024

Description of work
The existing LAMMPS converter works correctly only for a small number of specific cases. LAMMPS gives the user multiple options of the physical unit system output file format.

The converter has been extended to allow the user to pick the unit system, and supports three trajectory formats: LAMMPS custom format (this has been considered to be the ".lammps" format so far), XYZ and LAMMPS implementation of H5MD.

In principle, another change will be necessary in the future to account for different atom_style options, which will change the format of the structure file (known in MDANSE as the 'config' file).

closes #421

Fixes
Added multiple readers to the LAMMPS converter.
Added the unit system selector.
Included additional trajectories for unit testing, together with the input files used to generate them.
Added new unit tests for the LAMMPS converter.

To test
All tests must pass.
Also, please try to convert a LAMMPS trajectory using the protos branch and again using this branch. The results should be the same.
Optionally, please try to manually convert the new trajectory files from unit test data and check that they all result in the same output.

@ChiCheng45
Copy link
Collaborator

Looks good. How do we convert lammps h5md and other files from the GUI? or is this not supported?

@MBartkowiakSTFC
Copy link
Collaborator Author

I just used the combo box in the converter panel to specify that the input file is h5md or xyz. You are right that we should probably change the filters in the file dialogs. For some reason my LAMMPS files never have the extensions that the converter expects, so I always have to switch to all files (*.*) anyway, even when using the LAMMPS custom trajectory.

I will check if there is any official LAMMPS convention for file name extensions. Maybe I have been naming my files wrong, and MDANSE converter is right.

@MBartkowiakSTFC
Copy link
Collaborator Author

Looking at the examples in the LAMMPS documentation:
https://docs.lammps.org/dump.html
https://docs.lammps.org/read_data.html
I would say that there is no conventional file name extension for neither trajectory nor structure files. Unless it's an H5MD trajectory (.h5).

Copy link
Collaborator

@ChiCheng45 ChiCheng45 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@ChiCheng45 ChiCheng45 merged commit 37eac8e into protos May 3, 2024
84 checks passed
@MBartkowiakSTFC MBartkowiakSTFC deleted the lammps-converter-fix branch July 9, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] LAMMPS converter unit specification
2 participants