Skip to content

Default the GCMC region to a sphere around the perturbed atoms - #291

Merged
lohedges merged 1 commit into
develfrom
feature_gcmc_selection
Nov 16, 2026
Merged

lohedges merged 1 commit into
develfrom
feature_gcmc_selection

Conversation

@lohedges

Copy link
Copy Markdown
Contributor

Previously, GCMC moves were attempted within the entire simulation box unless a gcmc_selection was given. This PR makes the defaults auto:

  • gcmc_selection: the perturbed atoms, i.e. those whose element or LJ parameters change between end states (the whole ligand for ABFE). Perturbable waters and single-atom ions are excluded.
  • gcmc_radius: the extent of the selection in either end state plus gcmc_radius_padding (5 Å by default). Positions are imaged across periodic boundaries.
  • gcmc_num_waters: enough ghost waters to fill the free volume of the sphere, i.e. its volume less the waters and heavy atoms already inside (excluding atoms that vanish at either end state), plus a margin.

The resolved values are logged and written to the config file, so the viewer shows the sphere. Whole-box GCMC is still available with gcmc_selection=None. GCMC runs started with the old defaults need gcmc_selection=None, gcmc_radius="4 A" and gcmc_num_waters=20 to restart; runs without GCMC are unaffected.

@lohedges
lohedges force-pushed the feature_gcmc_selection branch from ec48091 to 11f7e0b Compare November 16, 2026 10:41
@lohedges
lohedges merged commit e59c9d0 into devel Nov 16, 2026
4 checks passed
@lohedges
lohedges deleted the feature_gcmc_selection branch November 16, 2026 10:58

This branch was previously deployed

1 inactive deployment
somd2-build — 11f7e0ba Deployed Nov 16, 2026 by lohedges via build (3.12, linux) #152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant