Re: reading a binary restart file

From: Leandro Martínez (
Date: Tue Jan 10 2006 - 16:10:31 CST

Thanks for the response Joshua. No, the size of the x, y, z arrays is not
an issue. The coordinates are read correctly with double precision up to
that atom (I have seen them). I'm
quite sure the .coor is writ en in double precision. I have also written
a program to read dcd files, in those the coordinates are in single
indeed. I have made some other tets and it seems that the number
is not 2241 for all coor files, but it is something like the number of
but I'm not sure. The second line of the coor file may be read, but the
numbers read in single or double precision make no sense.

By the way, could you write a fortran program that is able also to write dcd
files? I was able to read them, but I would like to write them as well, but
I didn't succeed in that.


On 1/10/06, Joshua D. Moore <> wrote:
> This may seem silly, but you do change the value of your ntest value
> right? According to this you only tell the program to read to 2241. Also
> your array for y only has 10,000 spots. Did you mean to type 100,000 when
> you sent this?
> Another problem (which I think might be an issue) might be that x,y,z
> might be REAL and not DOUBLE PRECISION. I had never read a .coor file,
> but I did write a script to read .dcd files in fortran, and I as I recall
> this double precision vs. real issue came up. How do your values for
> x,y,z look? Do they make sense?
> Josh
> On Tue, January 10, 2006 2:09 pm, Leandro Martínez wrote:
> > Hi everybody,
> > I'm trying to read the coordinates from a binary restart file (.coor)
> and
> > I'm having some trouble. I'm trying to do a simple fortran
> > program to do that. I start reading the coordinates as they were
> > double precision, in the following form:
> >
> > double precision x(100000), y(10000), z(100000)
> > open(10,file='restart.coor',form='unformatted')
> > ntest = 2241
> > read(10) (x(i),y(i),z(i),i=1,ntest)
> >
> > All the coordinates are read fine up to the atom 2241, but I'm not able
> > to read the coordinates of the next atom (2242, the system has 53000
> > atoms)
> --------------------------------------------------
> Joshua D. Moore
> Graduate Student
> North Carolina State University
> Department of Chemical and Biomolecular Engineering
> Box 7905 Centennial Campus
> Engineering Building I
> 911 Partners Way
> Raleigh, NC 27695-7905
> Phone: (919) 513-2051
> Fax: (919) 513-2470
> Email:
> --------------------------------------------------

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:41:31 CST