Merged
Conversation
Contributor
Author
|
This should also be implemented for the |
XzzX
requested changes
Oct 29, 2025
Owner
We can do this once this is resolved in a separate PR. |
6b2a6cc to
2809fbe
Compare
XzzX
approved these changes
Nov 18, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a local Langevin thermostat by adding an apply_if method that accepts a predicate to selectively apply the thermostat to specific atoms. The implementation follows existing patterns in the codebase (e.g., ThermodynamicForce).
- Refactors the existing
applymethod to callapply_ifwith a predicate that always returns true - Adds template method
apply_ifthat accepts a predicate determining which atoms to thermostat - Includes comprehensive unit and integration tests for the new functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mrmd/action/LangevinThermostat.hpp | Adds template apply_if method with predicate support using C++20 concepts, includes <concepts> header |
| mrmd/action/LangevinThermostat.cpp | Refactors apply to delegate to apply_if with always-true lambda predicate |
| mrmd/action/LangevinThermostat.test.cpp | Adds Local test case verifying selective thermostat application using IsInSymmetricSlab predicate |
| tests/LangevinThermostat/LangevinThermostat.cpp | Adds LocalLangevinThermostat integration test, includes whitespace cleanup in copyright header |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves #45