From b1a69bdfff0fd434c6de92d97c41a68b599c2f6d Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Tue, 8 Nov 2022 22:16:21 +0100
Subject: [PATCH] lDDT: bugfix

---
 modules/mol/alg/pymod/lddt.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/mol/alg/pymod/lddt.py b/modules/mol/alg/pymod/lddt.py
index 77ce6690d..cb5d90ccf 100644
--- a/modules/mol/alg/pymod/lddt.py
+++ b/modules/mol/alg/pymod/lddt.py
@@ -613,6 +613,9 @@ class lDDTScorer:
             if n_exp > 0:
                 score = np.sum(per_res_conserved[idx,:]) / n_exp
                 per_res_lDDT[res_indices[idx]] = score
+            else:
+                per_res_lDDT[res_indices[idx]] = 0.0
+
 
         # do full model score
         if penalize_extra_chains:
-- 
GitLab