From 8932b99faa33460ed49ef77ca8035def6d81c1cf Mon Sep 17 00:00:00 2001 From: "f.grunewald" Date: Fri, 25 Aug 2023 10:31:53 +0200 Subject: [PATCH] use box from pdb in correct fashion --- polyply/src/topology.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/polyply/src/topology.py b/polyply/src/topology.py index bf2f1f1d..c895f417 100644 --- a/polyply/src/topology.py +++ b/polyply/src/topology.py @@ -40,16 +40,14 @@ def _coord_parser(path, extension): reader = COORD_PARSERS[extension] molecules = reader(path, exclude=()) - box = None if extension == "pdb": - if hasattr(reader, "cryst"): - box = np.array([reader.cryst[item] for item in ['a', 'b', 'c', 'alpha', 'beta', 'gamma']]) molecule = molecules[0] for new_mol in molecules[1:]: molecule.merge_molecule(new_mol) else: molecule = molecules - box = molecule.box + + box = molecule.box positions = np.array(list(nx.get_node_attributes(molecule, "position").values())) return positions, box