Skip to content

Commit

Permalink
Update data_pipeline.py
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead authored Sep 23, 2024
1 parent e249290 commit 057ced5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion alphafold3_pytorch/data/data_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,18 @@ def make_msa_features(

polymer_residue_index = -1

chemtype_constants_cache = {}

for idx, (chemtype, residue_index) in enumerate(
zip(chain_chemtype, chain_residue_index)
):
is_polymer = chemtype < ligand_chemtype_index
is_ligand = not is_polymer

chem_residue_constants = get_residue_constants(res_chem_index=chemtype)
if chemtype not in chemtype_constants_cache:
chemtype_constants_cache[chemtype] = get_residue_constants(res_chem_index=chemtype)

chem_residue_constants = chemtype_constants_cache[chemtype]

# NOTE: For modified polymer residues, we only increment the polymer residue index
# when the current (atomized) modified polymer residue's atom sequence ends.
Expand Down

0 comments on commit 057ced5

Please sign in to comment.