From a18e69cb4d5568e9cbe7e678a38af7aa737bfcc0 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 18 Nov 2026 12:00:54 +0000 Subject: [PATCH] Log the per-window replica exchange messages at debug level. --- CHANGELOG.md | 2 +- src/somd2/runner/_repex.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81558024..c51698d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,7 @@ Changelog * Take the terminal ring flip angle of a distorted ring from the number of neighbours of its pivot, rather than from RDKit, which assigned 120° to aromatic rings when MDAnalysis wasn't available [#294](https://github.com/OpenBioSim/somd2/pull/294). * Include whole ring systems containing perturbed atoms in the automatic REST2 region, so that the torsions about a perturbed ring's bonds to the rest of the molecule are scaled [#296](https://github.com/OpenBioSim/somd2/pull/296). * Add a `rest2_profile` option. The default, `exponential`, gives a geometric ladder of REST2 scale factors, rather than the previous linear rise, which is still available as `linear`. REST2 runs started before this change must set `rest2_profile` to `linear` to restart [#296](https://github.com/OpenBioSim/somd2/pull/296). -* Add a `cupotential` option to use NVIDIA cuPotential for the PME nonbonded interactions, and its Langevin middle integrator and Monte Carlo barostat with the `langevin_middle` integrator, which requires the CUDA platform, single or mixed precision, and a version of Sire built with cuPotential support. cuPotential chooses its own PME parameters, so PME tuning is skipped and a fixed `pme_tolerance` of 5e-4 is used. Simulations without a periodic space fall back to OpenMM, and GCMC isn't yet supported. +* Log the per-window GCMC, terminal flip and dynamics messages of replica exchange runs at debug level, rather than info, reducing the size of the log by around 30 times. Progress is still logged once per cycle [#298](https://github.com/OpenBioSim/somd2/pull/298). [2026.2.0](https://github.com/openbiosim/somd2/compare/2026.1.0...2026.2.0) - Sep 2026 -------------------------------------------------------------------------------------- diff --git a/src/somd2/runner/_repex.py b/src/somd2/runner/_repex.py index 40b017b5..18951e9e 100644 --- a/src/somd2/runner/_repex.py +++ b/src/somd2/runner/_repex.py @@ -1564,7 +1564,7 @@ def _run_block( if gcmc_sampler is not None and is_gcmc: gcmc_sampler.push() try: - _logger.info(f"Performing GCMC move at {_lam_sym} = {lam:.5f}") + _logger.debug(f"Performing GCMC move at {_lam_sym} = {lam:.5f}") gcmc_sampler.move(dynamics.context()) finally: gcmc_sampler.pop() @@ -1576,7 +1576,9 @@ def _run_block( # Perform a terminal flip move before dynamics if requested. if self._terminal_flip_samplers is not None and is_terminal_flip: - _logger.info(f"Performing terminal flip move at {_lam_sym} = {lam:.5f}") + _logger.debug( + f"Performing terminal flip move at {_lam_sym} = {lam:.5f}" + ) self._terminal_flip_samplers[index].move(dynamics.context()) # Snapshot the context state for crash recovery. The slot was just @@ -1587,7 +1589,7 @@ def _run_block( getPositions=True, getVelocities=True ) - _logger.info(f"Running dynamics at {_lam_sym} = {lam:.5f}") + _logger.debug(f"Running dynamics at {_lam_sym} = {lam:.5f}") # Draw new velocities from the Maxwell-Boltzmann distribution. if self._config.randomise_velocities: