What steps will reproduce the problem?
1. Initialize Universe
2. Initialize an XTCWriter instance
3. Try to write to the file using XTCWriter.write_next_timestep(ts)
There are two problems here. Firstly, there seems to be a simple code error in
line 365 of MDAnalysis/coordinates/xdrfile/core.py:
self.xdrfile = libxdrfile.xdr_open(filename, 'w')
xdr_open needs to be changed to xdrfile_open. Presumably xdr_open was an older
function which is now deprecated. Couldn't find any other examples of the code
attempting to call xdr_open, so I don't think there should be any other
problems caused by that.
(I haven't sorted my svn commit issues yet so haven't made the change myself...)
Second problem is with units conversion. The XTCWriter.units is set to None,
rather than being set to the correct units. I can get writing to work correctly
if I set XTCWriter.units manually after initializing the XTCWriter instance,
i.e.
XTCWriter.units={'length': 'nm', 'time': 'ps'}
I think this is supposed to happen within the XTCWriter code, but something has
gone wrong somewhere.
Original issue reported on code.google.com by Danny.Pa...@gmail.com on 3 Aug 2010 at 3:37
Original issue reported on code.google.com by
Danny.Pa...@gmail.com
on 3 Aug 2010 at 3:37