[gmx-users] Format of .trr file

Matthew Zwier mczwier at gmail.com
Sun Mar 24 02:18:54 CET 2013


The TRR format is based heavily on Unix-y C routines for
architecture-independent encoding, so it's not so simple to explain how to
read it in plain Fortran (you'd be calling out to system libraries, or
potentially manually swapping the endianness of data). Your best bet is
probably to wrap the xdrfile library (available via the GROMACS web site),
which does all of this behind the scenes for you. It's C, but C/Fortran
interoperability is pretty good nowadays.

Failing that, I suppose there are ways to convince trjconv to convert TRR
to some format more amenable to Fortran unformatted reads (the VMD
libraries come to mind). You could also consider getting MDAnalysis (
https://code.google.com/p/mdanalysis/) and writing a few-line Python script
to do the conversion for you; it should run at near C speed since it wraps
C libraries for dealing with large trajectories. I'm not an expert at
either approach, though, so if that's how you decide to go, perhaps someone
else lurking on the appropriate mailing list can get you started.

Cheers,
Matt Z.


On Sat, Mar 23, 2013 at 7:50 PM, sudipta sinha <sudipta.mml at gmail.com>wrote:

> Hi Everyone,
>
> I want to read the .trr file using fortran for analyzing the trajectories.
> However, I didn't find the file format of it in the gromacs website. I had
> searched a lot in google but I didn't succedd. There is some indirect
> approach for doing that by using gromacs tool such as trjconv etc (i,e
> converting binary to ascii).  However, I want to read those files by
> fortran because the size of my file is very big (5GB) and I can't handle by
> that way. Can anyone share the format or some small fortran script for
> doing this. That information will be great help for me and also for other
> people. This is because, I have seen several archives of this topic in
> mailing list but there are no answers.  Please help me out in this regard.
>
> Thanks in advance
> Sudipta   --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> * Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>



More information about the gromacs.org_gmx-users mailing list