Skip to content

fix: refresh Langevin sigma on friction changes#273

Open
galjos wants to merge 1 commit into
devfrom
fix/langevin-friction-sigma
Open

fix: refresh Langevin sigma on friction changes#273
galjos wants to merge 1 commit into
devfrom
fix/langevin-friction-sigma

Conversation

@galjos

@galjos galjos commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Recompute LangevinThermostat::_sigma inside setFriction().
  • Add a regression test matching the existing target-temperature sigma recomputation test.

Root cause

The Langevin noise amplitude is derived from friction and target temperature. setTargetTemperature() already refreshed _sigma, but setFriction() left the dependent state stale.

Validation

  • cmake --build build-stochastic-rescale-ci --target testThermostat --parallel 4
  • build-stochastic-rescale-ci/tests/src/thermostat/testThermostat

Reference

@galjos galjos requested a review from 97gamjak June 12, 2026 12:55
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.12%. Comparing base (1d02915) to head (4a740c5).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #273   +/-   ##
=======================================
  Coverage   88.12%   88.12%           
=======================================
  Files         283      283           
  Lines       10874    10875    +1     
  Branches     3376     3376           
=======================================
+ Hits         9583     9584    +1     
  Misses       1251     1251           
  Partials       40       40           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pq-perf-bot

pq-perf-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

⚡ Performance (instruction count) — ✅ no regressions

per-benchmark breakdown
benchmark base Ir PR Ir Δ
bondedForces 41.46M 41.46M -0.00%
boxTransforms 10.67M 10.67M +0.00%
constraints 11.38M 11.38M +0.00%
coulombKernel 5.80M 5.80M +0.00%
forceKernel 15.33M 15.33M -0.00%
integrator 32.17M 32.17M +0.00%
kinetics 9.53M 9.53M +0.00%
linearAlgebra 2.08M 2.08M +0.00%
nonCoulombPairs 5.48M 5.48M -0.00%
shiftVector 5.81M 5.81M +0.00%
virial 11.63M 11.63M +0.00%

Deterministic callgrind instruction counts vs the base branch; gated at ±2%. Not wall-clock.

@galjos galjos added the bug Something isn't working label Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant