Skip to content

Bug: PDB parsing drops residues from secondary subchains in multi-chain entities #236

Closed

Description

@Wodswos

Description

When a PDB file's COMPND record declares an entity with multiple chains (e.g. CHAIN: A, B), the parser only processes the first subchain.

sc = entity.subchains[0]

PBD Example:

COMPND    MOL_ID: 1;                                                            
COMPND   2 MOLECULE: 3-PHYTASE A;                                               
COMPND   3 CHAIN: A, B;                                                         
COMPND   4 SYNONYM: 3 PHYTASE A, MYO-INOSITOL-HEXAPHOSPHATE 3-PHOSPHOHYDROLASE  
COMPND   5 A, MYO-INOSITOL HEXAKISPHOSPHATE PHOSPHOHYDROLASE A;                 
COMPND   6 EC: 3.1.3.8;                                                         
COMPND   7 ENGINEERED: YES   

Residues in remaining subchains get an empty label_seq_id, which causes is_present to be marked as False.

At CIF serialization after inference, residues with is_present=False are filtered out, so secondary subchains are lost.

Meanwhile feature.pkl still contains all residues from the entity. This creates a residue-count mismatch between the two files, causing failures in downstream stages (inverse fold, etc.) that load both and expect consistent dimensions.

path/to/src/boltzgen/task/predict/data_from_generated.py", line 380, in get_feat
 design_chains = np.unique(asym_id[chain_design_mask])
IndexError: boolean index did not match indexed array along dimension 0; dimension is 438 but corresponding boolean dimension is 882

Is there a reason the parser deliberately handles only the first subchain?

Activity

  1. added a commit that references this issue on Sep 27, 2026
    14e5b50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions