Skip to content

Commit 41b79f4

Browse files
committed
some cleanup for load_trajectory
1 parent 2df9112 commit 41b79f4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

paths_cli/commands/load_trajectory.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ def load_trajectory(traj_file, top, append_file, tag):
2828
Trajectories loaded this way will work with engines compatible with
2929
that input (e.g., GROMACS).
3030
"""
31-
import mdtraj as md
3231
from openpathsampling.engines.openmm.tools import ops_load_trajectory
33-
traj = ops_load_trajectory(traj_file, top=top)
32+
if top:
33+
traj = ops_load_trajectory(traj_file, top=top)
34+
else:
35+
traj = ops_load_trajectory(traj_file)
36+
3437
storage = APPEND_FILE.get(append_file)
3538
storage.save(traj)
3639
for tag_name in tag:

0 commit comments

Comments
 (0)