[Fsatom-comm] FSAtom
Xavier Gonze
fsatom-comm@www.tddft.org
Wed, 05 Feb 2003 08:30:31 +0100
Dear Miguel (and others),
Miguel Marques wrote:
>>Don't reinvent the wheel! Just make a fortran wrapper around existing
>>C-libraries if necessary (or do the I/O in Python).
>
>
> The standard xml library is libxml (comes installed with any linux version
> nowadays). The library homepage is http://xmlsoft.org/ The library is
> fairly simple to use (for what I see, I never tried it), but is heavily
> based on structures and trees. Even though Fortran 90 has structures and
> pointers, I do not think we can easily interface it with F90 (padding in
> structures, etc, is probably not consistent with C). I can do a couple of
> tests to try it out.
>
> I think that is a bad idea to do the I/O in Python. One can not assume
> that people are willing to use Python (after all this is a free world ;))
> and we should decide upon a fairly universal interface (i.e. C, with
> bindings to Fortran)
We have definitely NOT to decide upon an interface, be it in C,
FORTRAN, Python or whatever language !
What we should do is to :
1) choose whether we want the psp files to be in XML or another format
2) define what the markups are, what the mandatory content of a psp file
is, what the optional content of a psp file is ...
The actual reading of the file should be left to the people concerned
with the implementation, in their own code. of course, it would
be nice if we could provide a library of routines from reading
the XML pseudopotential files, but this should be an auxiliary problem.
Even more urgent, one should set up the work group, and not start
the discussion without the concerned people !
Xavier
PS : Simply to show that it is possible to parse XML from a FORTRAN code,
ABINIT has already a primitive XML parser, written in FORTRAN,
to parse CML files (CML = Chemical Markup Language, developed by
Murray-Rust and Rzepa) see
http://www.abinit.org/ABINIT/robodoc_4.0.2/append_cml.f.html#append_cml