======================= XOP DEVELOPER GUIDE ================================



HOW TO CUSTOMIZE THE XOP MAIN WINDOW
====================================
You should edit the xop_menu.dat file in the ifc directory of the XOP
distribution.
MSR/99/03/18

HOW XOP SELECTS THE CURRENT (WORKING) DIRECTORY
===============================================
In UNIX, when XOP is started (usually from the command line) the default
working directory is the current directory. In Windows, one usually
starts XOP by double clicking on an icon or by selecting an entry in the
"start" bar. The current directory is undefined and XOP will change
directory to %XOP_HOME%\tmp (by default).

Note that the user can change directory to any other location by using
the Tools/Change Working Directory... option in the main xop window.

It is also possible to change the default by setting the XOP_WD
environment variable (either by hand or by modifying the initialization
scripts xop and xop.bat) before starting xop.
MSR/97/11/25


HOW TO RUN A MODIFIED APPLICATION
=================================
Sometimes, for experimental or development purposes, it is needed to 
run a modified version of an XOP application code. For such a purpose, a
mechanism is suggested:
1) Copy the source code and the Makefile to the to a new directory
   (e.g., the current directory)
2) Recompile (using gmake) the source code (or the modified source).
   The executable file is sitting in the current dorectory
3) Change the environment variable XOP_BINARIES to point to your
   new directory using the Xop/Show/Edit environment option in the main
   XOP window. 
6) Call the application. Note that the binaries of any other application
   will not be found unless you copy them to the new directory.
MSR/99/03/18


HOW TO PROGRAM XOP EXTENSIONS
=============================
XOP (also in its embedded form) allows to include extensions. Extensions
are either patches on existing XOP applications or entirely new XOP 
applications. 
To include an XOP extension, one should compile the idl code to create
an "save" file (e.g., ext_1.sav). The save file should contain only the 
idl code modified or new to XOP. This "save" file must be placed in the
$XOP_HOME/extensions directory. In such a directory, a file called 
"xop_extensions.lis" must exist and contains the extensions list to be
LOADED WHEN XOP IS INITIALIZED. (note that it is not necessary to
include the extension name in this file, only if you want to load it at
initialization time. See below.). Each line of xop_extensions.lis is a save 
file to be loaded.
A comment after the save file name is permitted preceded by the column (:). 
It is also possible to include idl saved applications (*.sav files)
in this extensions directory. These files are not listed in 
xop_extensions.lis. They are only loaded at run time (first time they are 
called) and not at initialization time. It will be also possible to include 
applications that are not called from the main XOP window, but are called 
with the command "xop application".

Limitations: XOP extension must not modify the common blocks of the 
  existing XOP routines. Extensions must use the idl library files
including in the embedding. Otherwise the idl library files must be
included in the .sav file.

MSR/97/11/17|97/12/11

HOW TO CUSTOMIZE DABAX FILES
============================
You can customize DABAX files, for instance to add a new crystal 
structure in the file CrystalStructures.dat:

1) Copy the original CrystalStructures.dat file to you working 
   (or any other directory) 
2) Modify it and delete the CrystalStructures.HIdl (if exists)
3) Define the envitonment variable 
   setenv DABAX_PATH .:/your_path_here/xop/data/dabax
4) Restart xop
   At this moment, your modified CrystalStructures.dat should be loaded
   because it is found first in the DABAX_PATH


Note: The DABAX_PATH cannot be extended in XOP for Windows95/NT. In
these cases one should modify directly the file 
c:/xop/data/dabax/CrystalStructures.dat

MSR 98/04/18

HOW TO ADD DATA FILES TO DABAX
==============================
The files in the DABAX directory can be taken from the DABAX data base
and the user may add and remove files. A minimum number of files is 
needed, which are:
   dabax.lis: This file contains a list of the files in the xop/data/dabax
     directory, excluding itself. This is optional under Unix. 
     If it exists, the applications that may accept several DABAX 
     files (i.e.  f1f2_Chantler.dat and f1f2_Henke.dat) took the first 
     in the list as a default, otherwise it sorts them by alphabetical 
     order.
   AtomicConstants.dat 
   Compounds.dat 
   CrystalCell.dat 
   CrystalStructures.dat 
   one file with f0_* data, for example:
     f0_WaasKirf.dat (recommended, distributed)
   one file with f1f2_* data, for example:
     f1f2_WIndt.dat 
   one file with CrossSec_*
     CrossSec_XCOM.dat 

Alternative DABAX files and other DABAX files than  required with XOP can be 
obtained from:
http://www.esrf.fr/computing/scientific/xop (DABAX entry)

NOTE: When transfering files between Unix and Windos machines, be
careful to use ASCII or BINARY modes if original files are ascii or
binary, respectively.  
NOTE 2: If you modify a .dat file, before restarting XOP you must delete
the .HIdl file with the same name. The .HIdl file contains a indexing of
the .dat file and will be created automatically the first time that the
new file is used. The user must have writting permission to the
$XOP_HOME/data/dabax directory.


MSR 00/07/12

