From: John Stone (johns_at_ks.uiuc.edu)
Date: Sat Apr 05 2008 - 13:43:21 CDT

Yi,
  If you're writing your own Fortran code, you might try using
the VMD plugin code via the Fortran bindings that Axel Kohlmeyer
previously contributed. There's some documentation on this here:
  http://www.ks.uiuc.edu/Research/vmd/plugins/doxygen/callmolfileplugins.html#callmolfileplugins

The molfile plugins are open source, so you can use them in your own
software...

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sat, Apr 05, 2008 at 02:21:53PM -0400, Yinglong Miao wrote:
> Hi,
>
> I have a question about reading big binary DCD files in FORTRAN. In my
> simulations with NAMD, there are cycles in which I want to read two frames
> at the end of the DCD output trajectory for analysis and go back to NAMD to
> continue. The problem is that the size of the DCD file keeps increasing as
> the simulation goes on, and so does the time needed for reading. I am
> wondering whether their are ways to read the last several frames of a DCD
> file directly without going through the big file from the beginning in
> FORTRAN.
>
> I have tried to open the DCD file with position put at the end of the file
> (append for position) and use "backspace" to read the lines I want, but it
> turned out that the backspace doesn't work for unformatted files. I also
> tried reading DCD lines using "direct access", but it seemed that only 1
> record can be accessed. So my question is whether the DCD file supports
> "direct access" reading. Or are there any other ways you know for my
> purpose? I will appreciate it if you can share your experiences with me.
>
> Thanks,
> Long
>
> --
> Yinglong Miao
> Ph.D. Candidate
> Center for Cell and Virus Theory
> Chemistry Department, Indiana University
> 800 E Kirkwood Ave Room C203A, Bloomington, IN 47405
> Tel: 1-812-856-0981

-- 
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