[gmx-developers] Getting the last frame in an xtc file

Ran Friedman r.friedman at bioc.uzh.ch
Thu Apr 10 14:03:06 CEST 2008


Mark Abraham wrote:
> Roughly speaking, xtc_at_header_start expects to be at the start of a
> frame to read its header, or to fail. The 3.3.1 version of
> xtc_get_frame_number does the test-for-header with explicit code,
> whereas 3.3.3 does it with the call to xtc_at_header_start. When the
> test fails, and xtc_at_header_start fails, the 3.3.3 version should
> probably have
>
>     if(gmx_fseek(xdrfiles[fp+1],off-sizeof(int)*2,SEEK_SET)){
>
> as line 1328, not
>
>     if(gmx_fseek(xdrfiles[fp+1],off,SEEK_SET)){
>
> so that it seeks backwards in the same way as the 3.3.1 code does. Ran
> can probably test this to see if it works :-)
>
Ran will test it and report back to the list :-)
I should look for the code in previous versions next time I guess.

Ran.



More information about the gromacs.org_gmx-developers mailing list