Skip to content

feat(domain): per-domain atom partition + libcvc 3.2.1 prebuilt fetch (Phase 4 task 2)#27

Merged
transfix merged 1 commit into
masterfrom
feature/f3dock-phase4-domain-partition
May 18, 2026
Merged

feat(domain): per-domain atom partition + libcvc 3.2.1 prebuilt fetch (Phase 4 task 2)#27
transfix merged 1 commit into
masterfrom
feature/f3dock-phase4-domain-partition

Conversation

@transfix

Copy link
Copy Markdown
Owner

Stacked on top of #26.

Phase 4 task 2 — per-domain atom partition

Introduces f3dock::domain::DomainPartition (header in inc/f3dock/domain/DomainPartition.h, impl in src/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 a ReceptorDomainConfig against 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 a DomainGraph. Output pointers may alias the inputs. Unclaimed atoms are copied through unchanged.

PARAMS_IN now carries the partition and a rest-pose DomainGraph alongside receptorDomains; setParamFromFile builds 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 feed apply() to the FFT scoring loop. Receptors without any receptorDomain directive 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 bundled cvcConfigVersion.cmake reports 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 new LIBCVC_ARCHIVE_VERSION cache var (defaults to LIBCVC_VERSION, overridable per-release).

Tests

12 new DomainPartition.* cases in tests/unit/test_f3dock_domain_partition.cpp cover the build/validate paths and the apply() math (identity rest pose, hinge-only-rotates-child, aliased output, missing graph node, unclaimed atoms unchanged). All 73 domain|flex tests pass locally on WSL Ubuntu-24.04 / gcc 13.

Migration matrix

doc/F3DOCK_MIGRATION_MATRIX.md Phase 4 task 2 is now marked landed.

@transfix transfix force-pushed the feature/f3dock-phase4-domain-partition branch from 6d8167f to cf8a182 Compare May 18, 2026 20:15
@transfix transfix changed the base branch from feature/f3dock-phase4-domain-spec to master May 18, 2026 21:14
… (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).
@transfix transfix force-pushed the feature/f3dock-phase4-domain-partition branch from cf8a182 to 083a0d7 Compare May 18, 2026 21:20
@transfix transfix merged commit 653ca51 into master May 18, 2026
10 checks passed
@transfix transfix deleted the feature/f3dock-phase4-domain-partition branch May 18, 2026 22:36
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.

1 participant