[gmx-users] number of frames in trajectory

Erik Lindahl lindahl at csb.stanford.edu
Tue Jun 29 19:10:50 CEST 2004


Hi David,

There's no way of doing that without reading to the end - when we write  
the first frame we don't know if the simulation will be stopped with a  
signal or crash for some reason. The user might also have concatenated  
trajectories from several runs, so don't trust the tpr file either...


Theoretically you could imagine back and setting the number of frames  
in a header when the simulation is finished, but that type of random  
file access wouldn't work on a lot of filesystems.

Cheers,

Erik


On Jun 29, 2004, at 5:36 PM, David L. Bostick wrote:

>
> Dear all,
>
> I am writing an analysis code, and I want to know the best way to get  
> the
> number of frames contained in a trajectory file ... preferably w/o  
> reading
> all the frames.  I saw in statutil.h the nframes_read() function, but  
> I'm
> not sure if this is what I need.
>
> Thanks,
> David
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 
> =-=-=-=
> David Bostick					Office: 262 Venable Hall
> Dept. of Physics and Astronomy			Phone:  (919)962-0165
> Program in Molecular and Cellular Biophysics
> UNC-Chapel Hill
> CB #3255 Phillips Hall				dbostick at physics.unc.edu
> Chapel Hill, NC 27599	           		http://www.unc.edu/~dbostick
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 
> =-=-=-
>
> _______________________________________________
> gmx-users mailing list
> gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.




More information about the gromacs.org_gmx-users mailing list