From fc163c62c10a3089b1f18b525dd008ffdcb781a0 Mon Sep 17 00:00:00 2001
From: Joana Pereira <joanapereira@4414.bioz.unibas.ch>
Date: Sat, 22 Jul 2023 00:51:13 +0200
Subject: [PATCH] added option to provide directory with pdb files as input

---
 barrOs_library.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/barrOs_library.py b/barrOs_library.py
index deda677..07a1c90 100644
--- a/barrOs_library.py
+++ b/barrOs_library.py
@@ -2374,10 +2374,14 @@ def run_barros(arguments, offset = 1, step = 2, local_angle_threshold = 25, dist
 
                             # calculate the shear number
                             print(" ... ... Computing the shear number")
-                            shear = shear_number(barrel_struct, show_path = False)
-                            if shear is not None:
-                                print(' ... ... ... Shear: {}'.format(shear))
-                            else:
+                            try:
+                                shear = shear_number(barrel_struct, show_path = False)
+                                if shear is not None:
+                                    print(' ... ... ... Shear: {}'.format(shear))
+                                else:
+                                    print(' ... ... ... Error: Not possible to compute the shear number')
+                            except:
+                                shear = None
                                 print(' ... ... ... Error: Not possible to compute the shear number')
 
                             # calculate a (the distance between two adjacent CA assuming they are in the same line defined by the strand)
-- 
GitLab