[gmx-users] How to save the coordinates of all atoms in the 2D-arrays using xdrfile?

Mark Abraham Mark.Abraham at anu.edu.au
Mon Nov 29 12:38:51 CET 2010


On 28/11/2010 12:12 AM, Ó¢ÐÛ²»ÔÙ¼Åį wrote:
> Dear gmxers,
> I am trying to perform an analysis on the trjectory file using xdrfile 
> library. First of all, I want to save the coordinates of all atoms in 
> three 2D-arrays, i.e. xx[step-1][natom-1], yy[step-1][natom-1], 
> zz[step-1][natom-1]. How to do so? Could you give me some hints, 
> please? If you had happened to do so, could you kindly send the code 
> to me? Thanks a lot.
> Yours sincerely,
> Chaofu Wu, Dr.

You probably don't want to do that, because it doesn't scale to large 
numbers of trajectory frames - you will run out of memory eventually. If 
at all possible you should structure your algorithm to deal with one 
frame at a time. There are already GROMACS functions that make that 
easy. Pick a GROMACS trajectory analysis tool that sounds fairly simple 
and vaguely similar to what you want to do, and look at how its code works.

Mark



More information about the gromacs.org_gmx-users mailing list