[gmx-users] Parsing g_rms binary rmsd comparison matrix

João Henriques joao.henriques.32353 at gmail.com
Tue Mar 4 21:12:54 CET 2014

Hello everyone,

Let me start by saying that I am unsure whether this is a question for the
gmx-users or gmx-developers mailing list, but here it goes:

I have written a Python/NumPy script that parses the rmsd comparison matrix
dumped by g_rms in the .xpm format. However the "nlevels" are not
sufficient to give me the desired detail for posterior calculations.
Therefore I have decided to forget the .xpm and focus on the binary dump
produced by g_rms using the flag -bin. My sole purpose is to fetch the
binary rmsd data and pass it into an array, so that I can then do some
calculations over it.

I am a total newbie in binary file parsing, but I know that I can, for
example, use something like "numpy.fromfile" for that purpose. The problem
is that I have absolutely no idea of what is the structure of the binary
rmsd comparison matrix file. I'm pretty sure that besides the actual data,
there are other stamps and stuff being written to the file, with
potentially different formats as well. I tried looking at gmx_rms.c but I
got lost very quickly.

Is there anyone out there that might be able to help me identify the
correct structure OR is there any Python or C++ routine capable of doing
similar things to what I need? I have no urge in "reinventing the wheel".

P.S.: I know that there is the possibility of modifying g_rms itself, but
that is not what I'm looking for.

Thank you in advance,
Best regards,
João Henriques

More information about the gromacs.org_gmx-users mailing list