mphowardlab / relentless

Computational materials design, with less code.
https://relentless.readthedocs.io
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Support I/O with both GSD and LAMMPS files #197

Closed mphoward closed 1 year ago

mphoward commented 1 year ago

This PR uses a feature I recently added to lammpsio to convert between GSD and LAMMPS snapshots. InitializeFromFile and WriteTrajectory should now be mostly agnostic to whether the box is HOOMD or LAMMPS.

In the process, I refactored a method for getting a temporary file name to the Directory to reduce code duplication.

Fixes #156

clpetix commented 1 year ago

I reviewed this and it all seems good to me! I'll get the tests written this week!

mphoward commented 1 year ago

I think this is ready for tests and final review!

clpetix commented 1 year ago

I added a test to check that initialization works with both file types for both engines. Let me know if there are any revisions or additions I need to make!

mphoward commented 1 year ago

Thank you! Could you also add tests that WriteTrajectory at least runs for both file type outputs? It would be even better if you could verify the contents, but it's OK if not. I will review all the tests at one time.

clpetix commented 1 year ago

@mphoward this is ready for review. I fixed a few things in the WriteTrajectory conversions and added testing

mphoward commented 1 year ago

Thank you! Could you merge in main and resolve the conflicts before review?

clpetix commented 1 year ago

Thank you! Could you merge in main and resolve the conflicts before review?

Done!

mphoward commented 1 year ago

This is ready for final review!