How to compile and install RESTRAX (ver. 4.8.2)
==============================================================
THIS FILE CAN BE OBSOLETE. READ doc/howtoINSTALL.html INSTEAD.
==============================================================

Requirements:
--------------

Source files with RESTRAX are available at
http://omega.ujf.cas.cz/restrax
 
For compilation, Fortran 90 (or F77 with extensions) is required. The
GNU g77 compiler can be used to compile the EXCI library, but not the
rest of the package. Configuration files with appropriate options are
available for Absoft Fortran 95 on PC/Linux and Digital Fortran on
Alpha/OSF1. Contact authors (JS) for help with porting to other systems.
 
Installed PGPLOT library (libpgplot.so) is required to compile and run
RESTRAX (see http://astro.caltech.edu/~tjp/pgplot).

Compiling
-------------

Unzip the distribution, e.g.

% gunzip < restrax-4.8.0.tar.gz | tar -xf -

The distribution will be placed in a new subdirectory:
restrax-4.8.0

Make the distribution root your current directory and use following
commands to compile RESTRAX

% configure <sys> -all
% make

and compile also EXCI libraries:

% make excilib

<sys> defines the configuration file './config/config.<sys>' with system
dependent linker and compiler options. There should be config.<sys>
files available for following systems/compilers:
 - Linux/Absoft Fortran 95 (Absoft)
 - OSF1/Digital Fortran 90 (DEC)
 
Use one of these files as a template for porting to other systems.

You can test the program now - make the distribution root your current
directory and start RESTRAX by calling the starting script:

% start

Follow the steps described in the section "Test the program ..." below.

Installation:
---------------- 

Call "Install <dir>" with the <dir> argument specifying installation
directory, e.g.

% Install /usr/local/restax

NOTE: the installation directory must already exist and you need write
permissions to it.

Running:
--------

1) Start RESTRAX using the script "start" in the installation directory.
It should provide a choice from several scattering models and instrument
configurations. The script can be called from any directory. To permit
access for all system users, make a link e.g. to /usr/local/bin,

% ln -sf <installation directory>/start /usr/local/bin/restrax
% chmod 755 /usr/local/bin/restrax

and start restrax from any directory:

% restrax

2) You may edit the "start" script to add/modify paths to instrument
configurations and EXCI libraries.


"restrax.ini" file 
------------------
The "restrax.ini" file is read on the start-up from current directory or
from the directory with instrument configuration. It contains default
input values required when you start RESTRAX (configuration file, path
to data files, data filename etc..). You can also specify a job file to be 
executeed on startup (JOB=filename).

Environment variables
----------------------
Environment variables for PGPLOT and shared library loader are defined
in the starting script "start" or "restrax_run". You can edit these
scripts to set the environment according to your requirements.

The shared library with EXCI subroutine is searched by default in the
current directory. If not found, it is searched according to the paths
defined in the starting script (LD_LIBRARY_PATH).


Test the program using demo job file
-------------------------------------
Start restrax from any directory if the program is already
installed on the system (see the section "Running"), e.g.

% restrax

From the following menus, select "Damped oscillators" (1) and one of 
the offered demo sessions, e.g. "data fitting" (2) and accept
the default answers on initial prompts (press ENTER). The demo session
should start from a job file - just read comments and press ENTER when asked for.
You can interupt the execution of a job file by typing <Q><ENTER> and continue
working with RESTRAX. You may play with the configurations and try other
commands (type ? for hints or look in the ./demo/demo.job file to
learn how to run simulations and data fitting), or quit the program,

ResTrax> exff

Starting scripts
--------------------
The "restrax_run" file is an example of the starting scripts, which
can be called either directly (with appropriate options, see comments
in it) or from the menu in the script "start". You may use these
files as a template for your own start-up configuration.
Starting RESTRAX from a script permits to set environment variables and
starting options according to your requirements. 

  
  
   
