feat(domain): hinge-state sampler + cross-product scoring loop (Phase 4 task 3)#28
Merged
Merged
Conversation
… 4 task 3) Adds DomainSampler/DomainSamplingConfig that enumerate a cross-product of per-hinge angle sweeps into a vector of DomainStates, and build_graph_with_state() that re-evaluates the receptor DomainGraph for each state. New parameter-file key receptorJointHingeSweep parentId childId minAngleRad stepRad numSteps drives the sweep; an empty config yields a single empty state so rigid receptors are unaffected. runFlexStates now iterates the cross-product n_flex_states * n_domain_states, and the two FlexReceptorGuard blocks apply the active domain state via build_graph_with_state + DomainPartition::apply on top of any flex-state rewrite, so flex and domain states compose cleanly. Adds 11 GoogleTest cases in test_f3dock_domain_sampler covering enumeration, parser, build_graph_with_state validation, and an end-to-end partition-with-sampled-state.
This was referenced May 19, 2026
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.
Summary
Phase 4 task 3 of the F3Dock migration matrix: the FFT scoring loop now consumes a vector of domain transforms per candidate pose instead of a single 6-DoF transform.
Changes
receptorJointHingeSweep parentId childId minAngleRad stepRad numStepskey.src/f3dock-domain/DomainSpec.cpp, declared in DomainSampler.h): re-evaluates the rest-pose DomainGraph with per-state hinge-angle overrides, rejecting overrides that name an unknown or non-hinge joint.unFlexStates now iterates the cross-product
n_flex_states × n_domain_states, setting �ctiveFlexStateIndex / �ctiveDomainStateIndex per iteration. BothFlexReceptorGuard*blocks apply the active domain state via �uild_graph_with_state + DomainPartition::apply() on top of any flex-state rewrite, so flex and domain states compose cleanly.Tests
11 new GoogleTest cases in
tests/unit/test_f3dock_domain_sampler.cppcover the enumerator (empty / disabled / single / cross-product), the parser (round-trip, unknown keys, bad input), �uild_graph_with_state validation, and an end-to-end partition-with-sampled-state. All domain + flex unit tests pass locally under Ubuntu-24.04 / gcc-13.Migration matrix
Task 3 entry in
doc/F3DOCK_MIGRATION_MATRIX.mdupdated to Landed. Tasks 4 (ICP refinement) and 5 (integration test) remain.Stacks on top of #27 (already merged into
master).