Skip to content

Fix issue #62 - #63

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

lohedges merged 1 commit into
develfrom
fix_62

Conversation

@lohedges

@lohedges lohedges commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Currently loch only samples water, and the osmotic (μpT) ensemble isn't valid for water as the solvent of a dilute system, such as a solvated protein, which is loch's main use. 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. Sampling only within the GCMC sphere doesn't avoid this, since water diffuses between the sphere and the bulk.

The osmotic ensemble is valid for water only when its chemical potential depends strongly on how much is present, e.g. adsorption into a porous solid or water in a non-aqueous solvent. These aren't loch's target use.

Changes:

  • Remove the pressure argument and the per-move box and Adams value updates. A barostat is rejected again, as before osmotic support was added.
  • _compute_adams_values() is called once at construction, using the box from set_box(). The long-range correction reuses that box volume. set_box() no longer accepts an OpenMM State.
  • Remove tests/test_osmotic.py, and restore the README note that GCMC must be performed at constant volume, removing the μpT documentation (including Fix issue #59 #60).

@lohedges lohedges added the bug Something isn't working label Nov 9, 2026
@lohedges
lohedges merged commit d9b651a into devel Nov 9, 2026
4 checks passed
@lohedges
lohedges deleted the fix_62 branch November 9, 2026 09:16
@lohedges lohedges mentioned this pull request Nov 9, 2026

This branch was previously deployed

1 inactive deployment
loch-build — 3cfcfd85 Deployed Nov 9, 2026 by lohedges via build (3.12, linux) #35
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