Hi, Thank you very much for your reply. I appreciate your answer. However, if I wish to read that file using C/Fortran interface then which C routine should be convenient. There are several options. I found another tool*gmxdump * which basically read the .trr file and gives the output. Can I link that executable with fortran? If so how to do that? I have seen the source code but there are several header files and several routines. I read that C program very carefully but it is difficult to figure it out which portion is important. Can you guide me in this regard?
Thanks in advance Sudipta On Sat, Mar 23, 2013 at 9:18 PM, Matthew Zwier <[email protected]> wrote: > 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 <[email protected] > >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 [email protected] > > 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 [email protected]. > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > > > -- > gmx-users mailing list [email protected] > 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 [email protected]. > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > -- gmx-users mailing list [email protected] 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 [email protected]. * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

