forum@abinit.org
Subject: The ABINIT Users Mailing List ( CLOSED )
List archive
- From: Josef Zwanziger <jzwanzig@gmail.com>
- To: forum@abinit.org
- Subject: Re: [abinit-forum] Reading header of binary file: Fortran code question...
- Date: Tue, 2 Jun 2009 06:59:17 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=wmzQwfv+/qEufb5yM7Keelm9WsDJ8aM17VW0X6ErzOezsjuEn8spOyimR4xPouo+Ib ns0+43aqMNe5qdooQGH3rQQg2gbFXpe/Yyp1jDObi7Lw9VJpnVG0MnCYaYPei/64s7tv m3gScymkex7WKOxI0D3LU9+8g7NtO9FlA3kc4=
This looks correct, although in addition as we've been discussing the
fortran version wil add compiler dependent bytes on disk at the end of
the write statement.
Joe
On 6/2/09, Rob <spamrefuse@yahoo.com> wrote:
>
> Anglade Pierre-Matthieu wrote:
>>
>> A "%" in fortran is more or less equivalent to the "->" operator in C.
>> Moreover, in fortran it is possible to avoid using a do (C for) loop
>> for output by using the shortcut (table(i),i=1,n). Does this make the
>> documentation any clearer ?
>
> Hmm, let me try to convert one fortran snippet into C, and please
> correct me if I'm wrong:
>
> write(unit=unit)(pawrhoij(iatom)%nrhoijsel(1:nspden),iatom=1,natom)
>
> for (iatom = 1; iatom <= natom; ++iatom) {
> for(i = 1; i <= nspden; ++i) {
> printf("%g", pawrhoij [iatom] -> nrhoijsel [i]);
> }
> }
>
> Rob.
>
>
>
>
--
Josef W. Zwanziger
Professor of Chemistry
Canada Research Chair in NMR Studies of Materials
Director, Nuclear Magnetic Resonance Research Resource (NMR-3)
Dalhousie University
Halifax, NS B3H 4J3 Canada
tel: +1 (902) 494-1960
fax: +1 (902) 494-1867
web: http://jwz.chem.dal.ca
jzwanzig@gmail.com, jzwanzig@dal.ca
- [abinit-forum] Re: Reading header of binary file: Fortran code question..., Rob, 06/02/2009
- Re: [abinit-forum] Re: Reading header of binary file: Fortran code question..., Anglade Pierre-Matthieu, 06/02/2009
- Re: [abinit-forum] Reading header of binary file: Fortran code question..., Josef Zwanziger, 06/02/2009
Archive powered by MHonArc 2.6.15.