Hi there,<div><br></div><div>I am trying to retrieve energies calculated by gmx in python code. It sounds that I could use xdrlib if only I could understand how gmx data were packed in the edr file.</div><div><br></div><div>

For example, I am doing this:</div><div><br></div><div>import xdrlib</div><div><br></div><div>In: f = open(&#39;aogAAA.edr&#39;).read()</div><div>In: data = xdrlib.Unpacker(f)</div><div><div>In: repr(data.unpack_string())</div>

<div>Out: &quot;&#39;\\x00\\x00\\x00\\x04Bond\\x00\\x00\\x00\\x05Angle\\x00\\x00\\x00\\x00\\x00\\x00\\x0bProper Dih.\\x00&#39;&quot;</div></div><div># what?</div><div><div>In: repr(data.unpack_string())</div><div>Out: &quot;&#39;Ryckaert-Bell.&#39;&quot;</div>

</div><div># hum, sounds better, but to get the type of data associated?</div><div># a guess</div><div><div>In: data.unpack_float()</div><div>Out: 5.605193857299268e-45</div></div><div># Ok, what that means?</div><div><br>

</div><div>Any help here would be appreciated.</div><div><br></div><div>Many thanks,</div><div><br></div><div>Alan</div><div><br>-- <br>Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate<br>Department of Biochemistry, University of Cambridge. <br>

80 Tennis Court Road, Cambridge CB2 1GA, UK.<br>&gt;&gt;<a href="http://www.bio.cam.ac.uk/~awd28">http://www.bio.cam.ac.uk/~awd28</a>&lt;&lt;<br>
</div>