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

Ran Friedman r.friedman at bioc.uzh.ch
Thu Apr 10 16:51:39 CEST 2008


One more piece of information:
I replaced xtc_get_current_frame_time of GMX 3.3.3 with that of GMX
3.3.1 and recompiled.

Now xtc_get_last_frame_time does work.

Ran.

Ran Friedman wrote:
> Dear Mark, GMX developers,
>
> Unfortunately this doesn't work. In any case, this part of the code
> returns -1 in any case:
>  }else if(ret == -1){
>     if(gmx_fseek(xdrfiles[fp+1],off,SEEK_SET)) {
>       return -1;
>     }
>     return -1;
>  }
>
> and even if I try to move backwards 2*sizeoff(int) at a time  it doesn't
> get me anywhere.
>
> Ran.
>
>
> Mark Abraham wrote:
>   
>> Ran Friedman wrote:
>>     
>>> 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 :-)
>>>>         
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-developers-request at gromacs.org.
>
>   


-- 
------------------------------------------------------
Ran Friedman
Postdoctoral Fellow
Computational Structural Biology Group (A. Caflisch)
Department of Biochemistry
University of Zurich
Winterthurerstrasse 190
CH-8057 Zurich, Switzerland
Tel. +41-44-6355593
Email: r.friedman at bioc.unizh.ch
Skype: ran.friedman
------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20080410/b2e893ea/attachment.html>


More information about the gromacs.org_gmx-developers mailing list