From de3f7066db9c78d3d76a1e69f06c6020334a7c11 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed <fawzi.mohamed@fhi-berlin.mpg.de> Date: Sun, 28 Jan 2018 00:46:00 +0100 Subject: [PATCH] fix atom/molecules without cell --- normalizer/normalizer-system-type/classify_structure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/normalizer/normalizer-system-type/classify_structure.py b/normalizer/normalizer-system-type/classify_structure.py index 6832ae9..a65587b 100644 --- a/normalizer/normalizer-system-type/classify_structure.py +++ b/normalizer/normalizer-system-type/classify_structure.py @@ -91,7 +91,6 @@ class ClassifyStructure(object): # Transform data into numpy arrays, don't reshape to work with old code using flat arrays atom_labels = np.array(atom_labels["flatData"]).reshape(atom_labels["shape"]) atom_pos = np.array(atom_pos["flatData"]).reshape(atom_pos["shape"]) - cell = np.array(cell["flatData"]).reshape(cell["shape"]) # No further analysis will be done if there is no cell or all periodic_dimensions are False. # The classification will be set to 'Atom' or 'Molecule' depending on the number of atoms. @@ -101,6 +100,7 @@ class ClassifyStructure(object): else: self.classification = 'Molecule / Cluster' else: + cell = np.array(cell["flatData"]).reshape(cell["shape"]) # convert to Angstrom and numpy array atom_pos = self.m_to_ang * atom_pos cell = self.m_to_ang * cell -- GitLab