Re: Get number of timesteps from DCD via script

From: Bjoern Olausson (
Date: Wed Feb 09 2011 - 08:05:42 CST

On Wednesday 09 February 2011 13:41:06 Joshua D. Moore wrote:
> Just paste what I sent into a file named "read_dcd_header.f90"
> Then compile with
> f90 -o read_dcd_header.exe read_dcd_header.f90
> Then execute with
> ./read_dcd_header.exe
> When it asks you for the name of your dcd file, type in your dcd filename.

Appart from the fact that it does not work for me (and indeed it was the first
thing i tried when you posted the code to compare the output with my script),
it is not an answer to my question.

blub_at_repulsion $ gfortran -o read_dcd_header read_dcd_header.f90
14:59:46 [~/work/python-scrips]
blub_at_repulsion $ ./read_dcd_header
 What is your dcd file name?
At line 15 of file read_dcd_header.f90 (unit = 243, file = '')
Fortran runtime error: File '' does not exist
15:00:08 [~/work/python-scrips]
blub_at_repulsion $

I didn't ask for a program to do the stuff, because I need some of the values
for my program written in python and I don't want to make calls to external

While I am happy with the fact that I can read the timesteps and write
frequency I would like to be able to read the rest of the Information in the
just in case I happen to make use of them and for the sake of completeness.

So a proper header documentation would be great for folks like me, who are not
familiar with Fortran/C and don't want to spend hours figuring out the stuff
from catdcd/vmd/namd source code or struggle on wrong documentation.


Bjoern Olausson
Martin-Luther-Universitšt Halle-Wittenberg 
Fachbereich Biochemie/Biotechnologie
Kurt-Mothes-Str. 3
06120 Halle/Saale
Phone: +49-345-55-24942

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:19:47 CST