From aeae909a364bc21f56170749a7a347924f0d4ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sun, 16 Feb 2020 15:13:53 +0100 Subject: [PATCH] Fix a subtablesindex bug that skip last molecule of COLUMN and TBE format --- tools/lib/data.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/data.py b/tools/lib/data.py index 02089afd..543fbd80 100644 --- a/tools/lib/data.py +++ b/tools/lib/data.py @@ -102,6 +102,7 @@ class dataFileBase(object): if str(table[i,0])!="": subtablesindex.append((firstindex,i-1)) firstindex=i + subtablesindex.append((firstindex,np.size(table,0))) for first, last in subtablesindex: for col in range(2,np.size(table,1)): datacls=dict() @@ -133,6 +134,7 @@ class dataFileBase(object): if str(table[i,0])!="": subtablesindex.append((firstindex,i-1)) firstindex=i + subtablesindex.append((firstindex,np.size(table,0))) for first, last in subtablesindex: datacls=dict() mymolecule=str(table[first,0])