Closed GoogleCodeExporter closed 9 years ago
oops, should have submitted the correct trace (against 0.6.2-dev, already
includes
the deprecation warning)
In [6]: u.trajectory.dcd_header()
/Volumes/Data/oliver/Biop/Library/python/mdanalysis/MDAnalysis/coordinates/DCD.p
y:163: DeprecationWarning:
dcd_header is not part of the trajectory API and will be renamed to _dcd_header
DeprecationWarning)
---------------------------------------------------------------------------
error Traceback (most recent call last)
/Volumes/Data/oliver/Biop/Projects/FABP/I-FABP/1IFC/GMX/WT/<ipython console> in
<module>()
/Volumes/Data/oliver/Biop/Library/python/mdanalysis/MDAnalysis/coordinates/DCD.p
y in
dcd_header(self)
162 warnings.warn('dcd_header is not part of the trajectory API and will
be renamed to _dcd_header',
163 DeprecationWarning)
--> 164 self._dcd_header()
165 def _dcd_header(self):
166 import struct
/Volumes/Data/oliver/Biop/Library/python/mdanalysis/MDAnalysis/coordinates/DCD.p
y in
_dcd_header(self)
166 import struct
167 desc = ['file_desc', 'header_size', 'natoms', 'nsets', 'setsread',
'istart', 'nsavc', 'delta', 'nfixed', 'freeind_ptr', 'fixedcoords_ptr',
'reverse',
'charmm', 'first', 'with_unitcell']
--> 168 return dict(zip(desc,
struct.unpack("iiiiiiidiPPiiii",self._dcd_C_str)))
169 def __len__(self):
170 return self.numframes
error: unpack requires a string argument of length 80
Original comment by orbeckst
on 5 May 2010 at 11:56
oops, should have added a return... but doesn't matter because since 0.7.0 the
function is removed as deprecated
Original comment by orbeckst
on 12 Oct 2010 at 12:11
Er... actually, still a bug:
u.trajectory._dcd_header()
---------------------------------------------------------------------------
error Traceback (most recent call last)
/Users/oliver/<ipython console> in <module>()
/Volumes/Data/oliver/Biop/Library/python/mdanalysis/MDAnalysis/coordinates/DCD.p
yc in _dcd_header(self)
121 import struct
122 desc = ['file_desc', 'header_size', 'natoms', 'nsets', 'setsread', 'istart', 'nsavc', 'delta', 'nfixed', 'freeind_ptr', 'fixedcoords_ptr', 'reverse', 'charmm', 'first', 'with_unitcell']
--> 123 return dict(zip(desc,
struct.unpack("iiiiiiidiPPiiii",self._dcd_C_str)))
124 def __iter__(self):
125 # Reset the trajectory file, read from the start
error: unpack requires a string argument of length 80
Original comment by orbeckst
on 12 Oct 2010 at 7:32
Original comment by orbeckst
on 12 Oct 2010 at 7:33
Fixed in r486 (at least on Mac OS X 10.6).
The function only exists for debugging purposes and might be removed without
notice in the future.
Original comment by orbeckst
on 12 Oct 2010 at 8:21
Original issue reported on code.google.com by
orbeckst
on 5 May 2010 at 11:54