Skip to content

selection: patch cached selections after atom-kind swaps (#179) - #187

Merged
mlund merged 1 commit into
mainfrom
issue-179-selection-patch
Nov 24, 2026
Merged

mlund merged 1 commit into
mainfrom
issue-179-selection-patch

Conversation

@mlund

@mlund mlund commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Closes #179.

  • Backend logs the atoms behind recent kind changes (AtomKindLog, 64 entries); CachedSelection re-evaluates only those, falling back to a full resolve on composition changes or a stale log. Rejected swaps no longer cost a second full resolve.
  • custom_external: 'energy will always be zero' only when no atom kind or fully populated group can match (typos still warn); otherwise an info message.
  • Benchmark (23 atomtype terms, 2070 titrating sites, 200k SpeciationMoves): 446 s → 3.4 s, identical acceptance ratios.
  • Tests: seeded random-walk oracle against the uncached resolver, kind-log unit tests, can_ever_match cases. Regression suite not run.

Log the atoms behind recent kind changes so a CachedSelection re-evaluates
only those instead of the whole system; warn 'always zero' only when no
kind or reservoir can ever match.
@mlund
mlund merged commit edeb35c into main Nov 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CustomExternal: atomtype selections re-resolve on every titration swap; misleading 'matched no atoms' warning

1 participant