AMBER Archive (2004)

Subject: Re: AMBER: binary files

From: David A. Case (case_at_scripps.edu)
Date: Wed Jun 16 2004 - 09:44:39 CDT


On Wed, Jun 16, 2004, richard dimelow wrote:

> I can read formatted coordinate files and formatted trajectory files from
> amber, and I can also write formatted coordinate and trajectory files that
> amber can understand. But I wish to read and write unformatted files since
> then I can maintain accuracy in the coordiantes and velocity. The f77 code I
> am using is
> read(1)
> read(1) natoms
> read(1) (x(j), y(j), z(j), j=1,natoms)
> and similarly with write commands instead of read.
>
> I don't seem to have any problem reading unformatted files, but sander
> doesn't like the unformatted files that I write. I get the error message 'A
> READ operation tried to read past the end-of-record'. Is it possible to
> write unformatted files that amber is happy with?

You can study the code in getcor.f to see how binary reading is done. There
is nothing obviously wrong with what you have above, but much missing
information: Are x,y,z double precision? What value of ntx are you using?

The easiest way to debug is to have sander write a binary coordinate file
in a test run, and see how it differs from the ones you are creating.

...good luck...dac

-- 

================================================================== David A. Case | e-mail: case_at_scripps.edu Dept. of Molecular Biology, TPC15 | fax: +1-858-784-8896 The Scripps Research Institute | phone: +1-858-784-9768 10550 N. Torrey Pines Rd. | home page: La Jolla CA 92037 USA | http://www.scripps.edu/case ================================================================== ----------------------------------------------------------------------- The AMBER Mail Reflector To post, send mail to amber_at_scripps.edu To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu