Skip to Content.
Sympa Menu

forum - [abinit-forum] Re: header format of binary files: documentation out-of-date?

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

[abinit-forum] Re: header format of binary files: documentation out-of-date?


Chronological Thread 
  • From: Rob <spamrefuse@yahoo.com>
  • To: abinit <forum@abinit.org>
  • Subject: [abinit-forum] Re: header format of binary files: documentation out-of-date?
  • Date: Sun, 31 May 2009 05:18:08 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=Cio/FsOsN3fNlCMbvp4jm2A2mM6JxGlE/xdIa9Hbe8gs01/itaxuufjg2KybPO7rnwRb0RmnkCDWsuy3FIKlHjmWKsLz5oGKUi0Eki1SdwCNaV4zrSoyMjwbk/ATf0ZaI49gNrgkQfqlKvtS091MZFOs+qygMULJDvM3bdLnjTM=;


Josef Zwanziger wrote:
>
> The "extra" bytes are due to the Fortran write statements.
> The format of the file is just what the documentation says,
> but it's easier to understand in terms of the Fortran read/write
> statements than byte counts.

I don't agree with this. I have analysed binary files before, either
from Fortran or from C. Moreover, the documentation explains
the header structure in terms of the Fortran write statement !
For example:

write(unit=header) codvsn,headform,fform
write(unit=header) bantot,date,intxc,ixc,natom,ngfft(1:3),&
& nkpt,nspden,nspinor,nsppol,nsym,npsp,ntypat,occopt,pertcase,usepaw,&
& ecut,ecutdg,ecutsm,ecut_eff,qptn(1:3),rprimd(1:3,1:3),stmbias,tphysel,tsmear

The first one, "codvsn", is a 6 byte long string. The rest are
integers; all the integer variables, of course, have the same
byte length (they are all of the same type).

I assume an integer is the usual 4 bytes.
This assumption is kind of confirmed by analysing the
density files from Tutorial 1.3 for the hydrogen molecule.
See my analysis of a "hexdump -C density-file":

http://skku.homeip.net/~lahaye/abinit/DensityFile.jpg

In this analysis, I clearly recognize the 'date' integer, and
therefore before the 'date' variable, there are more integers
than is documented:
where the documentation specifies only two integers
(headform and fform), I see 4 integers (57, 52, 14, and 228).

Hence I think the documentation is incomplete here!

> If you want something more device-independent, you can
> use the netcdf option.

I want to access the binary files directly, without cut3d.

> All the output variables (usepaw etc) are fully documented
> in the "input variables" documentation pages.

I can't find:
headform, fform, bantot, pertcase, ecutdg, ecut_eff


Rob.





  • [abinit-forum] Re: header format of binary files: documentation out-of-date?, Rob, 05/31/2009

Archive powered by MHonArc 2.6.15.

Top of Page