Skip to content

Add ghostly_kwargs option and detect systems already modified by ghostly - #264

Merged
lohedges merged 3 commits into
develfrom
feature_ghostly_kwargs
Oct 26, 2026
Merged

lohedges merged 3 commits into
develfrom
feature_ghostly_kwargs

Conversation

@lohedges

Copy link
Copy Markdown
Contributor

SOMD2 always applies ghost atom modifications with the default ghostly options. This adds a way to tune them, and guards against applying the modifications twice.

  • Add a ghostly_kwargs option that passes options to ghostly.modify. It takes a dictionary from Python or a YAML config, or key=value pairs on the command line, e.g. --ghostly-kwargs k_soft=3 stiffen_rotamers=true. Values are parsed as YAML, and keys and value types are checked against the signature of ghostly.modify, so new ghostly options need no changes here.
  • The options are saved with the config, and changing them on restart raises an error.
  • Systems already modified by ghostly raise an error unless ghost_modifications is disabled, which uses the existing modifications, or force=True is passed in ghostly_kwargs, which applies new modifications on top of them.
  • A warning is logged when ghostly_kwargs is set but ghost modifications aren't applied.
  • Added tests, plus README and CHANGELOG entries.

Requires OpenBioSim/ghostly#20.

@lohedges lohedges added the enhancement New feature or request label Oct 26, 2026
@lohedges
lohedges deployed to somd2-build October 26, 2026 14:48 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build October 26, 2026 14:48 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build October 26, 2026 14:48 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build October 26, 2026 14:48 — with GitHub Actions Active
@lohedges
lohedges merged commit 1950b3c into devel Oct 26, 2026
4 checks passed
@lohedges
lohedges deleted the feature_ghostly_kwargs branch October 26, 2026 15:05

This branch was successfully deployed

1 active deployment
somd2-build — 152fa6dd Deployed Oct 26, 2026 by lohedges via build (3.12, macos) #135
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