Fix duplicate-sequence multimer mmCIF chain coordinates#576
Open
taivu1998 wants to merge 1 commit into
Open
Conversation
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
Fixes #525.
This PR fixes
DataPipelineMultimer.process_mmciffor multimer mmCIF examplesthat contain multiple chains with the same sequence. The pipeline already
deduplicates expensive per-sequence feature generation by caching features under
the sequence string, but the mmCIF path was caching a dictionary after
chain-specific structural labels had been added. Duplicate-sequence chains could
therefore reuse the first chain's
all_atom_positionsandall_atom_mask.Root Cause
process_mmcifmixed two feature classes in the same sequence cache:get_mmcif_features.When a later chain had the same sequence, it deep-copied the cached dictionary
and skipped
get_mmcif_featuresfor its own chain ID.Changes
chain.
auth_chain_idon cache hits so copied intermediate features remaininternally consistent.
all_atom_positionsandall_atom_masklengths._process_single_chainonly once;get_mmcif_featuresruns for both chains;Validation
Passed:
Also passed a real fixture smoke test on
tests/test_data/mmcifs/2q2k.cif,confirming duplicate-sequence chains
AandBkeep distinct coordinates inthe merged multimer output.
Attempted broader existing tests, but this local environment is missing optional
runtime pieces unrelated to this patch:
tests.test_data_pipeline: missingattn_core_inplace_cudatests.test_multimer_datamodule: missingpytorch_lightning