From ee384b9b501e491848d809fe6ac9fb0d3ffea668 Mon Sep 17 00:00:00 2001 From: samuelmurail Date: Fri, 5 Jul 2024 11:30:46 +0200 Subject: [PATCH 1/2] Add chain_iptm as output --- colabfold/batch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/colabfold/batch.py b/colabfold/batch.py index 49f925e8..37d55906 100644 --- a/colabfold/batch.py +++ b/colabfold/batch.py @@ -490,6 +490,10 @@ def callback(result, recycles): del pae del plddt json.dump(scores, handle) + + if "chain_iptm" in result: + scores.update({"chain_iptm": np.around(result["chain_iptm"].astype(float), 4).tolist()}) + scores.update({"ptm_matrix": np.around(result["ptm_matrix"].astype(float), 4).tolist()}) del result, unrelaxed_protein From 3f85170f8c5788f1f7dd81e0af2bf7ecffdc802c Mon Sep 17 00:00:00 2001 From: samuelmurail Date: Fri, 5 Jul 2024 11:46:15 +0200 Subject: [PATCH 2/2] Fix bug with iptm_chain save --- colabfold/batch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colabfold/batch.py b/colabfold/batch.py index 37d55906..00f393ed 100644 --- a/colabfold/batch.py +++ b/colabfold/batch.py @@ -489,11 +489,11 @@ def callback(result, recycles): if k in conf[-1]: scores[k] = np.around(conf[-1][k], 2).item() del pae del plddt - json.dump(scores, handle) - + if "chain_iptm" in result: scores.update({"chain_iptm": np.around(result["chain_iptm"].astype(float), 4).tolist()}) scores.update({"ptm_matrix": np.around(result["ptm_matrix"].astype(float), 4).tolist()}) + json.dump(scores, handle) del result, unrelaxed_protein