Skip to content

IOError: Error reading frame from DCD file #319

@hainm

Description

@hainm

hi,

I had a wrapper for Universe object in pytraj (named TrajectoryMDAnalysisIterator). I've tried AMBER, GROMACS files and everythings works fine. But got above error with DCD file. Below is full error log. Any idea why? thanks

ERROR: test_1 (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/haichit/anaconda3/envs/python2/lib/python2.7/site-packages/pytraj/decorators.py", line 80, in _no_test
    return func(*args, **kwd)
  File "test_MDAnalysisIterator.py", line 76, in test_1
    aa_eq(t[:2].xyz, traj[:2].xyz)
  File "/home/haichit/anaconda3/envs/python2/lib/python2.7/site-packages/pytraj/trajs/TrajectoryMDAnalysisIterator.py", line 53, in __getitem__
    with self:
  File "/home/haichit/anaconda3/envs/python2/lib/python2.7/site-packages/pytraj/trajs/TrajectoryMDAnalysisIterator.py", line 77, in __enter__
    self._traj_holder.rewind()
  File "/home/haichit/anaconda3/envs/python2/lib/python2.7/site-packages/MDAnalysis-0.11.0.dev0-py2.7-linux-x86_64.egg/MDAnalysis/coordinates/base.py", line 626, in rewind
    self.next()
  File "/home/haichit/anaconda3/envs/python2/lib/python2.7/site-packages/MDAnalysis-0.11.0.dev0-py2.7-linux-x86_64.egg/MDAnalysis/coordinates/base.py", line 621, in next
    return self._read_next_timestep()
  File "/home/haichit/anaconda3/envs/python2/lib/python2.7/site-packages/MDAnalysis-0.11.0.dev0-py2.7-linux-x86_64.egg/MDAnalysis/coordinates/DCD.py", line 471, in _read_next_timestep
    ts.frame = self._read_next_frame(ts._x, ts._y, ts._z, ts._unitcell, self.skip)
IOError: Error reading frame from DCD file

The test script is here
https://github.com/pytraj/pytraj/blob/master/tests/test_MDAnalysisIterator.py#L64

and this is wrapper code for Universer in pytraj (if anyone is interested)
https://github.com/pytraj/pytraj/blob/master/pytraj/trajs/TrajectoryMDAnalysisIterator.py#L36

cheers
Hai

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions