-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add create_atoms function to LAMMPS.jl #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, this looks great!
One thing I'm not quite sure about, is the handling of datatypes not supported directly by lammps. Up until now we've just restricted the wrapper functions to be called with the correct datatype.
I understand that it would be convenient for the user if we'd just handle the type conversion where needed but I also don't think that it would be too much to ask to have the user do this themselves.
If we ultimately decide on handling the type conversion on our end, we'd have to make this consistent across our other methods as well. I also think that we shouldn't issue warnings in case of a type mismatch but rather just document this behavior in our docstrings.
@vchuravy what's your opinion on this?
Yeah I would rather check the DType and then error |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
===========================================
+ Coverage 54.56% 72.33% +17.76%
===========================================
Files 2 2
Lines 449 459 +10
===========================================
+ Hits 245 332 +87
+ Misses 204 127 -77 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vchuravy could you take a quick look at this before I merge it?
Co-authored-by: Valentin Churavy <[email protected]>
Co-authored-by: Joroks <[email protected]>
Co-authored-by: Joroks <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be a bit more thorough when revising your PR.
Testing that your code is working by typing ] test
in your REPL is allways a good idea too.
Co-authored-by: Joroks <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should now be good to go.
It is useful (at least for me) to be able to load atoms directly from Julia to LAMMPS. This pull request provides a wrapper around
lammps_create_atoms
to easily do this, similar to the create_atoms function in the python interface to LAMMPS.