Skip to content

CE-Symm: join models only for multi-model biological assemblies - #1172

Open
josemduarte wants to merge 2 commits into
biojava:masterfrom
josemduarte:claude/nervous-mccarthy-c377d2
Open

josemduarte wants to merge 2 commits into
biojava:masterfrom
josemduarte:claude/nervous-mccarthy-c377d2

Conversation

@josemduarte

Copy link
Copy Markdown
Contributor

Fixes #808.

SymmetryTools.getRepresentativeAtoms(Structure) used only the first model when isNmr() was true and joined every model otherwise. Multi-model entries that aren't NMR, such as X-ray ensemble refinements, had all their conformers joined. That used too much memory and inflated the CE-Symm repeat count. For 4TZ5 (25 models) the method returned 27,425 atoms against 1,097 in the first model.

Now models are joined only when isBiologicalAssembly() is true and there is more than one model. BiologicalAssemblyBuilder drops the original extra models, so a multi-model assembly can only come from multiModel=true. Every other structure uses its first model.

Commits:

  • Integration test (needs network): 4TZ5 now uses its first model; the multi-model 1HHO assembly still joins its models; the chain-expanded 1HHO assembly and NMR 1B4C use their first model. The 4TZ5 case fails before the fix.
  • The fix.

Gaps (both fall back to the first model):

  • StructureImpl.clone() doesn't copy the assembly flag, so a cloned multi-model assembly loses it.
  • Assembly files read from disk with MODEL records aren't flagged.

The SCOP domains mentioned in the issue (d1xmpa_, d2hiyc_, d1kkta_) are single-model, so this change doesn't touch them. On current master, d1kkta_ gives 7 repeats (correct). d1xmpa_ and d2hiyc_ give 4 repeats with 2 C2 axes. That looks like two levels of C2 symmetry counted as repeats, which is a separate issue.

🤖 Generated with Claude Code

josemduarte and others added 2 commits December 4, 2026 18:17
…tries

4TZ5, a multi-model X-ray ensemble refinement, gets all its models joined
(27425 atoms instead of 1097 for the first model). Only biological
assemblies expanded as models should be joined. See biojava#808.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The models were joined for any structure not flagged as NMR, so X-ray
ensembles and other multi-model entries had every conformer fed to
CE-Symm, inflating memory use and the number of repeats. Now only
structures built by BiologicalAssemblyBuilder with multiModel=true
(isBiologicalAssembly() with more than one model) are joined; everything
else uses the first model. Fixes biojava#808.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

CE-Symm assumes models come from BA

1 participant