From c01a50533317b9cceb0adf4ffb1a39d84828153e Mon Sep 17 00:00:00 2001 From: Ask Hjorth Larsen <asklarsen@gmail.com> Date: Fri, 18 Nov 2016 17:20:34 +0100 Subject: [PATCH] fix bug where positions would be defined assuming wrong table layout --- parser/parser-molcas/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parser/parser-molcas/main.py b/parser/parser-molcas/main.py index e370d8b..07b012a 100755 --- a/parser/parser-molcas/main.py +++ b/parser/parser-molcas/main.py @@ -234,8 +234,10 @@ class MolcasContext(object): def onClose_section_system(self, backend, gindex, section): matrix = self.data.pop('coordinates') - atom_labels = matrix[:, 1] - coords = matrix[:, 2:5].astype(float) + assert matrix.shape[1] == 4 + atom_labels = matrix[:, 0] + coords = matrix[:, 1:4].astype(float) + assert coords.shape[1] == 3 coords = convert_unit(coords, 'bohr') backend.addArrayValues('atom_labels', atom_labels) -- GitLab