From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Oct 07 2008 - 12:05:17 CDT

Alexander,
  VMD 1.8.5 didn't support files larger than 2/4GB on Windows, that's why
the behavior has changed. The code I included in my reply is new and was
required in order to support the large files. The old version of the dcdplugin
can be made to work with the new version of VMD, but it won't support
big trajectory files.

Cheers,
  John

On Tue, Oct 07, 2008 at 10:03:16PM +0500, Alexander A. Vakhrushev wrote:
> John,
>
> It seems to me, that there were no such problems in v1.8.5, so I'll
> recheck to find possible solution.
>
> 2008/10/7 John Stone <johns_at_ks.uiuc.edu>:
> >
> > Alexander,
> >
> > On Sat, Oct 04, 2008 at 08:55:52AM +0500, Alexander A. Vakhrushev wrote:
> > [...]
> >> I have the following question: Windows version of VMD does not allow
> >> to load DCD trajectory file while it is being downloaded from remote
> >> host (in other words when file is of incomplete size). When I stop
> >> download even it was not finished everything goes OK. Linux version
> >> does not has such behaviour. Would you suggest any solutions?
> >
> > The Windows version of the DCD plugin uses the Win32 binary file I/O
> > APIs, which have different limitations and semantics than the
> > read/write/seek calls on Unix. I believe the likely source of problems
> > is the code we're forced to use on Windows to determine the size of
> > large files (files larger than 4GB) since the Windows implementation of
> > the normal libc calls is not capable of dealing with such large files:
> >
> > #if defined(_MSC_VER) && defined(FASTIO_NATIVEWIN32)
> > /* the stat() call is not 64-bit savvy on Windows */
> > /* so we have to use the fastio fseek/ftell routines for this */
> > /* until we add a portable filesize routine for this purpose */
> > fio_fseek(dcd->fd, 0, FIO_SEEK_END); /* seek to end of file */
> > filesize = fio_ftell(dcd->fd);
> > fio_fseek(dcd->fd, curpos, FIO_SEEK_SET); /* return to end of header */
> > #else
> > filesize = stbuf.st_size; /* this works ok on Unix machines */
> > #endif
> >
> > You could try writing another piece of code to query the file size
> > that behaves better with files that are in the process of being
> > appended to, but it's really somewhat of a questionable scenario to
> > attempt to load files that are in the process of being updated since
> > OSes handle these things a bit differently.
> >
> > Cheers,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> > --
> > NIH Resource for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >
>
>
>
> --
> Best regards,
>
> Dr. Alexander Vakhrushev
> Institute of Applied Mechanics
> Dep. of Mech. and Phys.-Chem.
> of heterogeneous media
> UB of Russian Academy of Sciences
> 34 T. Baramzinoy St.
> Izhevsk, Russia 426067
> ----------------------------------
> ? ?????????,
> ???????? ????????? ?????????????
>
> ?.?.-?.?., ?.?.?.
> ???????? ?????????? ????????
> ?????????? ?????????
> ?????????? ???????? ????
> 426067, ?. ??????
> ??. ?. ?????????? 34
> +7(3412)21-45-83

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078