feat(domain): per-domain atom partition + libcvc 3.2.1 prebuilt fetch (Phase 4 task 2)#27
Merged
Merged
Conversation
6d8167f to
cf8a182
Compare
… (Phase 4 task 2) Phase 4 task 2: introduce f3dock::domain::DomainPartition turning the receptor's flat atom array into a labelled atom-index -> domain-id map. Construction validates ReceptorDomainConfig against the actual receptor size (rejecting inverted ranges, out-of-range ranges, and overlapping domains); apply() rewrites baseline coordinates by composing each atom's owning world transform looked up in a DomainGraph. Unclaimed atoms ride with the implicit root rigid body unchanged, so receptors without any receptorDomain directive remain bit-for-bit identical. PARAMS_IN now carries the partition and a rest-pose DomainGraph alongside receptorDomains; setParamFromFile builds and validates both after the molecule is loaded so malformed configurations fail at parse time. No runtime use yet -- task 3 will swap per-state world transforms into the graph and feed apply() to the FFT scoring loop. Also bump the libcvc dependency to v3.2.1 (commit 08c15b5). The 3.2.1 release archives are named libcvc-3.2.0-* (project version not bumped before the release build), so the archive filename is now decoupled from the package version via a new LIBCVC_ARCHIVE_VERSION cache var. Unit tests in tests/unit/test_f3dock_domain_partition.cpp cover the build/validate paths and the apply() math; all 73 domain+flex tests pass locally on WSL Ubuntu-24.04 (gcc 13).
cf8a182 to
083a0d7
Compare
This was referenced May 18, 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.
Stacked on top of #26.
Phase 4 task 2 — per-domain atom partition
Introduces
f3dock::domain::DomainPartition(header ininc/f3dock/domain/DomainPartition.h, impl insrc/f3dock-domain/DomainPartition.cpp). It turns the receptor's flat atom array into a dense atom-index -> domain-id map.build(config, total_atoms, &err)validates aReceptorDomainConfigagainst the actual receptor size and rejects inverted ranges, out-of-range ranges, and overlapping domains.apply(graph, x_in, y_in, z_in, x_out, y_out, z_out, &err)rewrites baseline coordinates by composing each atom's owning world transform looked up in aDomainGraph. Output pointers may alias the inputs. Unclaimed atoms are copied through unchanged.PARAMS_INnow carries the partition and a rest-poseDomainGraphalongsidereceptorDomains;setParamFromFilebuilds and validates both immediately after the molecule is loaded so malformed configurations fail at parse time. No runtime use yet — task 3 will swap per-state world transforms into the graph and feedapply()to the FFT scoring loop. Receptors without anyreceptorDomaindirective remain bit-for-bit identical to today's behaviour.libcvc bump to v3.2.1 (commit 08c15b5)
The v3.2.1 release archives are named
libcvc-3.2.0-*(the project version in CMakeLists was not bumped before the release build), and the bundledcvcConfigVersion.cmakereports 3.2.0 too. To consume the v3.2.1 tag without breaking the find_package version check, the archive filename is now decoupled from the package version via a newLIBCVC_ARCHIVE_VERSIONcache var (defaults toLIBCVC_VERSION, overridable per-release).Tests
12 new
DomainPartition.*cases intests/unit/test_f3dock_domain_partition.cppcover the build/validate paths and the apply() math (identity rest pose, hinge-only-rotates-child, aliased output, missing graph node, unclaimed atoms unchanged). All 73domain|flextests pass locally on WSL Ubuntu-24.04 / gcc 13.Migration matrix
doc/F3DOCK_MIGRATION_MATRIX.mdPhase 4 task 2 is now marked landed.