Skip to content

Implement local langevin thermostat#46

Merged
XzzX merged 10 commits intoXzzX:mainfrom
J-Hizzle:implement-local-langevin-thermostat
Nov 18, 2025
Merged

Implement local langevin thermostat#46
XzzX merged 10 commits intoXzzX:mainfrom
J-Hizzle:implement-local-langevin-thermostat

Conversation

@J-Hizzle
Copy link
Copy Markdown
Contributor

Solves #45

@J-Hizzle
Copy link
Copy Markdown
Contributor Author

This should also be implemented for the velocityVerletLangevinThermostat module.

Comment thread tests/LangevinThermostat/LangevinThermostat.cpp Outdated
@XzzX
Copy link
Copy Markdown
Owner

XzzX commented Oct 29, 2025

This should also be implemented for the velocityVerletLangevinThermostat module.

We can do this once this is resolved in a separate PR.

@XzzX XzzX force-pushed the implement-local-langevin-thermostat branch from 6b2a6cc to 2809fbe Compare November 18, 2025 09:31
@XzzX XzzX self-requested a review November 18, 2025 09:36
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 apply method to call apply_if with a predicate that always returns true
  • Adds template method apply_if that 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.

Comment thread mrmd/action/LangevinThermostat.cpp Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@XzzX XzzX enabled auto-merge November 18, 2025 10:04
@XzzX XzzX merged commit 3bd8844 into XzzX:main Nov 18, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants