Skip to content

Fix issue #280 - #281

Merged
lohedges merged 1 commit into
develfrom
fix_280
Nov 9, 2026
Merged

lohedges merged 1 commit into
develfrom
fix_280

Conversation

@lohedges

@lohedges lohedges commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Closes #280.

GCMC simulations now run in the NVT ensemble: when gcmc is True, the pressure is ignored, with a log message. The osmotic ensemble, enabled since 2026.1.0, isn't valid for GCMC of solvent water. Water's chemical potential is then almost that of pure water, so the number of waters is barely fixed, and any mismatch between the excess chemical potential and the water model's chemical potential drives the total water count steadily one way. Restricting moves to the GCMC sphere only slows this, since water diffuses between the sphere and the bulk. In a charge-stage ABFE test under NPT, a run with gcmc_tolerance=0.1 gained 46 waters with the box growing about 0.6 nm³ per ns, then ran out of ghost waters. The control lost 1–3 waters per ns with the box slowly shrinking.

This replaces #278, which is fully reverted. It turned off bulk moves under a pressure, which only slowed the drift.

Other changes:

  • The pressure is no longer passed to the GCMC sampler.
  • The check that a perturbed_system shares the reference box (Fix issue #270 #271) now applies to every GCMC run, and no longer suggests setting a pressure.
  • GCMC runs started with a pressure can't be restarted, since the stored pressure no longer matches. The error explains why.

@lohedges lohedges added the bug Something isn't working label Nov 9, 2026
@lohedges
lohedges merged commit e170285 into devel Nov 9, 2026
4 checks passed
@lohedges
lohedges deleted the fix_280 branch November 9, 2026 09:42

This branch was previously deployed

1 inactive deployment
somd2-build — 4ab7c234 Deployed Nov 9, 2026 by lohedges via build (3.12, macos) #143
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.

Run GCMC simulations in the NVT ensemble

1 participant