Skip to content

Commit

Permalink
use box from pdb in correct fashion
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrunewald committed Aug 25, 2023
1 parent e3dff3f commit 8932b99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions polyply/src/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8932b99

Please sign in to comment.