VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Oct 07 2008 - 11:46:41 CDT
- Next message: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Previous message: John Stone: "Re: Vmd on MACOSX awkward msg at startup and error when running Ubq simulation"
- In reply to: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Next in thread: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Reply: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Previous message: John Stone: "Re: Vmd on MACOSX awkward msg at startup and error when running Ubq simulation"
- In reply to: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Next in thread: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Reply: Alexander A. Vakhrushev: "Re: Problems after installation (ubuntu 8.04)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]