Fails with exception when input files have different number of atoms
Created by: jag1g13
Either give a proper error message or allow it on the assumption that the atoms match from the top of both files (some GROMACS tools allow this)
Using GRO: MOL_GMX.gro
Using XTC: md.xtc
Trying FrameReaderSimpleTraj
Trying FrameReaderMDTraj
WARNING: Using MDTraj which renames solvent molecules
Traceback (most recent call last):
File "/home/james/projects/pycgtool/pycgtool/framereader.py", line 34, in get_frame_reader
return readers[name](top, traj, frame_start)
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "../../pycgtool.py", line 65, in <module>
main(args, config)
File "/home/james/projects/pycgtool/pycgtool/pycgtool.py", line 21, in main
frame = Frame(gro=args.gro, xtc=args.xtc, itp=args.itp, frame_start=args.begin)
File "/home/james/projects/pycgtool/pycgtool/frame.py", line 135, in __init__
self._trajreader = get_frame_reader(gro, traj=xtc, frame_start=frame_start)
File "/home/james/projects/pycgtool/pycgtool/framereader.py", line 42, in get_frame_reader
return reader(top, traj, frame_start)
File "/home/james/projects/pycgtool/pycgtool/framereader.py", line 203, in __init__
self._traj = mdtraj.load(trajname, top=topname)
File "/home/james/projects/pycgtool/env/lib/python3.5/site-packages/mdtraj/core/trajectory.py", line 428, in load
value = loader(filename, **kwargs)
File "mdtraj/formats/xtc/xtc.pyx", line 165, in xtc.load_xtc (mdtraj/formats/xtc/xtc.c:2533)
File "mdtraj/formats/xtc/xtc.pyx", line 172, in xtc.load_xtc (mdtraj/formats/xtc/xtc.c:2487)
File "mdtraj/formats/xtc/xtc.pyx", line 343, in xtc.XTCTrajectoryFile.read_as_traj (mdtraj/formats/xtc/xtc.c:4406)
File "/home/james/projects/pycgtool/env/lib/python3.5/site-packages/mdtraj/core/trajectory.py", line 1149, in __init__
self.xyz = xyz
File "/home/james/projects/pycgtool/env/lib/python3.5/site-packages/mdtraj/core/trajectory.py", line 870, in xyz
warn_on_cast=False, add_newaxis_on_deficient_ndim=True)
File "/home/james/projects/pycgtool/env/lib/python3.5/site-packages/mdtraj/utils/validation.py", line 148, in ensure_type
raise error
ValueError: xyz must be shape (Any, 66, 3). You supplied (5001, 3672, 3)