Skip to content

Commit d7726ea

Browse files
author
ntnn19
committed
Fixed bug in PR sokrypton#633
1 parent 800bd5f commit d7726ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

colabfold/batch.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
from __future__ import annotations
23

34
import os
@@ -373,6 +374,9 @@ def predict_structure(
373374
# TODO: add pad_input_mulitmer()
374375
input_features = feature_dict
375376
input_features["asym_id"] = input_features["asym_id"] - input_features["asym_id"][...,0]
377+
input_features['chain_num'] = input_features["asym_id"].max() + 1
378+
model_runner.chain_num = input_features['chain_num']
379+
376380
else:
377381
if model_num == 0:
378382
input_features = model_runner.process_features(feature_dict, random_seed=seed)
@@ -489,6 +493,10 @@ def callback(result, recycles):
489493
if k in conf[-1]: scores[k] = np.around(conf[-1][k], 2).item()
490494
del pae
491495
del plddt
496+
497+
if "chain_iptm" in result:
498+
scores.update({"chain_iptm": np.around(result["chain_iptm"].astype(float), 4).tolist()})
499+
scores.update({"ptm_matrix": np.around(result["ptm_matrix"].astype(float), 4).tolist()})
492500
json.dump(scores, handle)
493501

494502
del result, unrelaxed_protein

0 commit comments

Comments
 (0)