Skip to content

Conversation

@lohedges
Copy link
Contributor

This PR adds selective logging for the REST2 scale factors and selection. These are only logged when there are any non-zero REST2 scale factors. If the selection is None, then the entirety of the perturbable region is used as the selection. This is handled within the Sire layer, so we need to catch this here and log the atom indices too.

Running a command such as:

somd2 system.bss --rest2-scale 2.0 --rest2-selection "molidx 0 and (not atomidx 0,1,2)"

Will give output like:

2025-12-11 14:18:59.821 | INFO     | somd2.runner._base:__init__:122 - somd2 version: 2025.2.0.dev
2025-12-11 14:18:59.822 | INFO     | somd2.runner._base:__init__:123 - sire version: 2025.4.0.dev+ac2408f
2025-12-11 14:18:59.873 | INFO     | somd2.runner._base:__init__:267 - Applying modifications to ghost atom bonded terms
2025-12-11 14:18:59.925 | INFO     | somd2.runner._base:_check_end_state_constraints:797 - Constraints are at not the same at λ = 0 and λ = 1.
2025-12-11 14:18:59.932 | INFO     | somd2.runner._base:__init__:406 - REST2 scaling factors: [1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 1.8, 1.6, 1.4, 1.2, 1.0]
2025-12-11 14:18:59.934 | INFO     | somd2.runner._base:__init__:431 - REST2 selection contains 5 atoms: [3, 4, 5, 6, 7]

@mark-mackey-cresset

@lohedges lohedges merged commit 88a2327 into devel Dec 11, 2025
4 checks passed
@lohedges lohedges deleted the fix_rest2_logging branch December 11, 2025 17:02
lohedges added a commit that referenced this pull request Dec 11, 2025
lohedges added a commit that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cresset Related to work with Cresset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants