-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Collected small fixes and updates #4599
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
base: develop
Are you sure you want to change the base?
Conversation
- plug memory leak - modernize access to computes - tighten checks - modernize and improve error messages - better check for known keywords when processing atom types - support for typelabels
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.
Pull Request Overview
This pull request combines multiple small fixes and updates, including improved error handling for vector-style variable expansion, refactoring of the neighbor/swap fix for clearer errors and modernized C++ usage, and minor documentation improvements.
- Update of error reporting in utils::expand_args() with a descriptive message when a vector variable is missing an upper bound.
- Refactoring of the neighbor/swap fix (both header and source) to modernize code and improve error messaging.
- Revision of unit tests and documentation for consistency with these changes.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
unittest/cplusplus/test_advanced_utils.cpp | Adjusted expected error messages and argument count in tests |
src/utils.cpp | Updated error reporting parameters for consistency |
src/MC/fix_neighbor_swap.h | Minor renaming and removal of unused code/comments |
src/MC/fix_neighbor_swap.cpp | Enhancements to error messages, parameter validation, and swap probability computation using modern C++ patterns |
doc/src/fix_ave_correlate_long.rst | Documentation tweaks to clarify wildcard usage in variable expressions |
Comments suppressed due to low confidence (2)
unittest/cplusplus/test_advanced_utils.cpp:223
- Verify that the updated expected argument count of 14 correctly reflects the intended behavior after the modification in upper-bound error handling.
EXPECT_EQ(narg, 14);
doc/src/fix_ave_correlate_long.rst:85
- [nitpick] Ensure that the updated terminology ('wildcard string') is consistently used throughout the documentation to avoid potential confusion.
evaluation of an equal-style or vector-style variable. The specified indices can include a wildcard string.
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.
@jtavenner-dev I had to do some significant refactoring of your contributed code to modernize some parts and have it better aligned with current programming conventions. Also, a couple minor bugs were fixed and I added support for type labels.
Unfortunately, I could not find an example input in the examples
tree, so this is currently untested. Can you have a closer look and - ideally - provide some small, simple examples so that I can check as well.
Thanks for the code modernization updates and clearer error handling. I have fixed a minor bug unrelated to your changes regarding reading the options. I've also tested some short example scripts. However, I'm not sure how to add to this pull request. I've updated the changes to a branch in sync with this pull, but can't seem to push any changes. Not sure if this is just permissions-related or if I'm missing something else. |
You cannot push because you have no write permission for the LAMMPS repository. |
Sounds good. I was trying to push to one of your forked lammps branches, so permissions make sense. I've synced the changes here and my updates to my lammps fork on the 'develop' branch. |
@jtavenner-dev The changes are now integrated. I also moved and renamed the example folder, trimmed the inputs and make them use a potential that we already have included. |
Looks good to me, thanks. |
Summary
This pull request combines multiple small fixes and corrections.
Related Issue(s)
N/A
Author(s)
Axel Kohlmeyer, Temple U, akohlmey@gmail.com
Jacob Tavenner, NASA Ames Research Center, tavennerjacob@gmail.com
Licensing
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
Backward Compatibility
N/A
Implementation Notes
The following individual changes are included:
utils::expand_args()
stop with a descriptive error message, when a vector-style variable reference is provided with a wildcard without the required upper boundaryfix neighbor/swap
for improved errors and modernized C++ codefix neighbor/swap
fix neighbor/swap
Post Submission Checklist
Further Information, Files, and Links
N/A