HOWTO obtain native Fortran90, C and Python bindings for ABINIT parser
=====

1. Generate a description of the dataset structure.
2. Tune the variables (compiler, macros, paths).
3. Compile the bindings.

1.
==
Normally this first point is done automatically by the Makefile. If not,
here are the details.

There are five generated files in this directory:
- dtset_c.h: contains the C ids of all dtset attributes.
- dtset_c.static.h: contains the types of all dtset attributes.
- dtset_f90.inc: the same for Fortran90.
- dtset_py.h: the same for the python bindings.
- ab_dtset_f90_get.f90: the get routines to read all attributes.
They are generated using the parse_dtset.py Python script that reads a
pickle file generated by abilint. To generate the pickle file from abilint
use from the root of source tree:
*/*/abilint --dump_dtset src/bindings/dtset.pickle . .
This pickle should have been generated automatically by the makemake
script of ABINIT.

2.
==
All sources have been set and tested for Gfortran.
To compile with other compilers, one need to change src/bindings/ab_dtset_c.c
and modify the FC_MOD_NAME macro to the adequat naming scheme of the compiler.
For the Python bindings, one also need to change the FC_FUNC macro of file
src/bindings/ab_dtset_py.c. This will be handled automatically later by the
configure script (volunteers needed).

3.
==
To compile the bindings, currently, one should do:
- configure with gfortran and add the flag -fPIC for 64bits machines.
  To compile with other compilers, see above.
- go to src/bindings and issue 'make'. It will compile
  selected directories of ABINIT and create the dynamic library. To compile
  only the F90/C bindings, issue 'make libabinis.a' or 'make python' for
  the Python bindings only.
- in the same directory, one can also 'make examples'.
  And then run './example-c $ABINIT/tests/v1/Input/t05.in' for instance.
- to test the Python bindings, one need to have ElementTree.py and
  ElementPath.py. Then, issue ./gtkParse.py (read the following warning
  before).

WARNING! With gfortran compiler, the gtk interface does not work.
         It is a bug in gfortran when the locale is not C. So set
         LANG=C before testing gtkParse.py.
