
        / /   / /    __    \ \  / /
       / /__ / /   / _ \    \ \/ /
      /  ___  /   | |/_/    / /\ \
     / /   / /    \_\      / /  \ \

                 HEX-DWBA

------------
Dependencies
------------

The program is written in C++11 and can be successfully compiled by the
following compilers:

 * GCC 5.2.0 (also MinGW-w64 based on this GCC)
 * LLVM/clang 3.7.1
 
There are several external libraries that are being used for some partial tasks.
Some of them can be avoided if a correct compiler flag is added to CFLAGS in the
Makefile and the library link is removed from LIBRARY variable in Makefile.
Here is the list of the libraries with versions that were used:

 * GSL 1.16
            Needed, obtainable from
                http://www.gnu.org/software/gsl/
            Used for special functions and some others.
 
 * CLN 1.3.4
            Needen, obtainable from
                http://www.ginac.de/CLN/
            Used for arbitrary-precision rational arithmetic in the plane wave method.
            When custom-compiling, on some systems it may be necessary to comment out
            some time-related function declarations, which are already (and incompatibly)
            declared in system headers.

Some or all of the libraries may be present in precompiled form in the repositories
of the Linux distribution used.

-------------
Build and run
-------------

Use Unix-like system (or Cygwin tools on Windows) for compilation.

Once the needed libraries are present in the system include and library paths,
all that is necessary to build the program is running "make" from this directory.

> make

This should create an executable "hex-dwba" in the subdirectory "bin/". A simple
test run can be executed in the following way:

> mkdir test ; cd test                 # create a subdirectory for the test run
> ../bin/hex-dwba 1 0 1 0 4. 0 1000    # run simple computation H(1s)->H(1s) 4Ry

The last line of output will contain the following entries:
 1,2) initial state (ni=1, li=0)
 3,4) final state (nf=1, lf=0)
 5) impact energy (Ei=4 [Ry])
 6) partial wave angular momentum (L=0)
 7) [optional] radial grid length (rmax=1000 [a0])

The output contains
 a) The impact energy Ei
 b) The angular momentum L
 b) The cross sections, which are given in the following order
    For mi = -li, ..., li
    {
      For mf = -lf, ..., lf
      {
        WRITE sigma(mi,mf)
      }
      WRITE Sum[mf] { sigma(mi,mf) }
    }
    WRITE Sum[mi,mf] { sigma(mi,mf) }

For the example run above, the (last) output is the following set of numbers (apart from the SQL file):
4 0 1.57145 1.57145 1.57145

If the libraries are installed in non-standard locations, one needs to edit the
Makefile accordingly.

The HTML documentation can be extracted from the code by the program Doxygen:

> doxygen
