Better input set generator and sets for io.lammps#4368
Better input set generator and sets for io.lammps#4368vir-k01 wants to merge 54 commits intomaterialsproject:masterfrom
Conversation
…LammpsInputFile objects as input for the template to make use of all the other io.lammps functions in pmg
update - 12/3
…rd lammps) files with the input set that are prepared independent of the input file
Merge updates - 1/6/2025
Added a new (and probs better?) implementation for generating lammps input sets, with a more expressive MD template. Everything is now based on the template to ensure the atomate2 workflows being written work without the user having to specify too much. Inputs and states have to be enumed.
…LammpsInputFile objects as input for the template to make use of all the other io.lammps functions in pmg
…rd lammps) files with the input set that are prepared independent of the input file
Added a new (and probs better?) implementation for generating lammps input sets, with a more expressive MD template. Everything is now based on the template to ensure the atomate2 workflows being written work without the user having to specify too much. Inputs and states have to be enumed.
…class for storing and validating user defined settings
Changes to be committed: Reworked the way the input set generator generates the input file to be less cumbersome and use fewer if-else clauses, this new approach goes back to the original generator in order to be a lot more flexible (esp for custom lammps jobs). A LammpsSettings object is now present in order to validate the inputs specified by the user prior to actually passing them to lammps. This approach works out for the makers implemented currently (NVT/NPT/NVE/Minimization).
Redid how input sets are validated, in particular how "general" settings can also be stored as attrs of LammpsSettings, and only validate keys from _BASE_LAMMPS_SETTINGS. This way, allows for very flexible inputs from user to also be present in the final taskdoc.inputs. Also used PathLike instead of Path objects.
src/pymatgen/core/periodic_table.py
Outdated
| return self.is_lanthanoid or self.is_actinoid or self.symbol in {"Sc", "Y"} | ||
|
|
||
| @property | ||
| @deprecated( |
There was a problem hiding this comment.
I guess reverting changes to core.periodic_table and io.exciting is not intended?
If so you could revert those changes with (warning, this would drop all changes to that file, make sure this is what you need) git checkout upstream/master -- file_to_revert
There was a problem hiding this comment.
Just behind the master branch, synced up now
…ized json where atoms and velocities are not resolved into dataframes before checking condition. Unsure why that is the case, commenting out for now
…data from system.data
|
@vir-k01 any news about this PR ? |
|
@davidwaroquiers apologies for slacking off on this. After a bit of experimentation, I've added a |
update - 17/9
…nto lammps_sets_templated
…d inputs for the new flows
Bump rexml from 3.3.9 to 3.4.2 in /docs (materialsproject#4499)
…e a custom as_dict and from_dict instead of the rather cumbersome get_dict approach
Sync to main
Signed-off-by: Shyue Ping Ong <shyuep@users.noreply.github.com>
Summary
This PR is part of an effort to include workflows for running LAMMPS via atomate2. A concurrent PR will be opened in atomate2 that has the flows, while this PR aims to update the input set generators to match the inputs required there.
These changes are based on initial work here: https://github.com/Matgenix/atomate2-lammps done by @ml-evs and @gbrunin. Also tagging in @esoteric-ephemera who helped structure the code in this PR, and @davidwaroquiers.
Major changes:
TODO:
- Add tests- I've made most of the design decisions here assuming these sets will be used with solids through the Structure object, but one could also argue including support for Molecules. I'm looking for suggestions on how that can be incorporated without varying too much of the logic (ex : for the default inputs, atom styles, force field parameters)- I'm also looking for suggestions on how to best check/validate user specified force field parameters, which is difficult to do considering the numerous force field formats that exist out there. The existing ForceField object in io.lammps.data is not very intuitive to set-up for a user and does not support lammps integrated MLIPs yet.