Skip to content

Commit 6ee4702

Browse files
authored
Update inputs.py (#229)
1 parent 4e1e53c commit 6ee4702

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

alphafold3_pytorch/inputs.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,18 +1947,14 @@ def extract_chain_sequences_from_biomolecule_chemical_components(
19471947
mapped_restype = comp_details.id if is_atomized_residue(res_chem_type) else restype
19481948
current_chain_seq.append((mapped_restype, res_chem_type))
19491949

1950-
# reset current_chain_seq if the next residue is either not part of the current chain or is a different (unmodified) molecule type
1951-
1952-
unmod_res_chem_type = get_pdb_input_residue_molecule_type(
1953-
comp_details.type,
1954-
is_modified_polymer_residue=False,
1955-
)
1950+
# reset current_chain_seq if the next residue is either not part of the current chain or is a different chemical type
19561951

19571952
chain_ending = idx + 1 < len(chain_index) and chain_index[idx] != chain_index[idx + 1]
1958-
chem_type_ending = idx + 1 < len(chem_comps) and unmod_res_chem_type != (
1953+
chem_type_ending = idx + 1 < len(chem_comps) and res_chem_type != (
19591954
get_pdb_input_residue_molecule_type(
19601955
chem_comps[idx + 1].type,
1961-
is_modified_polymer_residue=False,
1956+
is_modified_polymer_residue=is_polymer(chem_comps[idx + 1].type)
1957+
and residue_constants.restype_3to1.get(chem_comps[idx + 1].id, "X") == "X",
19621958
)
19631959
)
19641960
if chain_ending or chem_type_ending:

0 commit comments

Comments
 (0)