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

Consistent exclusion settings with multiple kspace-like sub-styles in pair hybrid #1759

merged 1 commit into from Nov 6, 2019


Copy link

akohlmey commented Nov 5, 2019


This handles the special case shown in issue #1753 where multiple hybrid substyles would match but the special case for exclusions does not trigger, since Force::pair_match() returns NULL for multiple matches.

Related Issues

Fixes #1753


Axel Kohlmeyer (Temple U)


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

No known issues.

Implementation Notes

Since we cannot know how many multiples of the same sub-style exists, we assume that all hybrid sub-styles are the same. Since we only need to see, if there is a single match, it doesn't matter, that we have lots of missed matches due to looking for multiples that do not exist.

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
@akohlmey akohlmey added the bugfix label Nov 5, 2019
@akohlmey akohlmey requested review from athomps, donatas-surblys and sjplimp Nov 5, 2019
@akohlmey akohlmey self-assigned this Nov 5, 2019
athomps approved these changes Nov 5, 2019
Copy link

athomps left a comment

I approve.

sjplimp approved these changes Nov 6, 2019
Copy link

sjplimp left a comment

thanks for fixing this - I didn't fully understand the issue

Copy link

donatas-surblys left a comment

Thank you for the bugfix. I now get identical results, bar numerical error, between plain pair styles and pair hybrid for both the sample in #1753 and my actual systems.

@akohlmey akohlmey merged commit 2bbf520 into lammps:master Nov 6, 2019
8 checks passed
8 checks passed
lammps/pull-requests/build-docs-pr head run ended
lammps/pull-requests/cmake/cmake-kokkos-cuda-pr head run ended
lammps/pull-requests/cmake/cmake-kokkos-omp-pr head run ended
lammps/pull-requests/cmake/cmake-serial-pr head run ended
lammps/pull-requests/kokkos-omp-pr head run ended
lammps/pull-requests/openmpi-pr head run ended
lammps/pull-requests/serial-pr head run ended
lammps/pull-requests/shlib-pr head run ended
@akohlmey akohlmey deleted the akohlmey:hybrid-exclusion-bugfix branch Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.