[gmx-users] trajectory file formats

Broadbent, Richard richard.broadbent09 at imperial.ac.uk
Mon Aug 13 18:23:15 CEST 2012

As these are binary files the formatting can be quite complex I would
suggest using the library available here:


This includes all the functions necessary to read/write these formats and is
licensed under LGPL.


On 13/08/2012 14:48, "Jim Kress" <jimkress_58 at kressworks.org> wrote:

> I have written a unique MD program and want to output a full-precision
> trajectory containing coordinate, velocity, and force information in a .trr
> or a .trj formatted file. 
> Where in the gromacs code can I find a description of the formats of these
> files and an example of how they are written?
> Alternately, I can write .gro files and append the force information in the
> same format as the velocity information.  Will the gromacs utilities ignore
> the extra information in the generated .gro files or will it cause them to
> fail?
> Any advice/ suggestions would be appreciated.
> Thanks.
> Jim

More information about the gromacs.org_gmx-users mailing list