Repository navigation
Make GaussianEMRestraint score independent of pair list history - #4
Open
aozalevsky wants to merge 1 commit into
Open
aozalevsky wants to merge 1 commit into
aozalevsky wants to merge 1 commit into
Conversation
The model-density close pair container lists every pair closer than the cutoff, plus other pairs that depend on where the particles were at the last list update. The restraint summed every listed pair, so the same coordinates could score differently depending on the sampling history, and Monte Carlo did not sample a fixed distribution when moves were smaller than the container's slack. Score only pairs whose spheres are closer than the cutoff plus 2A, and build the container with that cutoff so that it holds all such pairs. This is the set of pairs a freshly updated list held before, so scores are unchanged whenever the list was just updated.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the bayesianem part of salilab/imp#1121. A companion salilab/imp PR makes the same change in
IMP.isd.GaussianEMRestraint.Change
The model-density loops in
unprotected_evaluate()anddebug()now score only pairs whose spheres (XYZR) are closer than the cutoff + 2 Å. The container is built with that cutoff, so it always holds every such pair. A freshly updated list held exactly those pairs before (cutoff + 2 × the default 1 Å slack), so scores don't change whenever the list was just updated.Since the score no longer depends on the list's history, the restraint doesn't need
is_custom_reset_(cf. salilab/imp@5c585d2f51) to keepevaluate_moved()andevaluate()consistent.Results
On the rnapolii tutorial system with 1 Å / 0.1 rad rigid-body moves (bayesianem, cutoff 10, weight 5), 1.2-2.3% of Metropolis decisions differed from those with a freshly built list. With this change it's 0 of 5,000, and the score is identical at every step.
Tests
New
test/test_pair_history.py: moving a model Gaussian by 0.9 Å across the list edge gives 21.363 on the old list and 22.537 on a new restraint before this change; now both give the same score. The existing tests pass, built in IMP develop.🤖 Generated with Claude Code