********************** LOSH (LOSHFZRF) - User Manual **************************



       Powder-Indexing Program LOSHFZRF - Grid-Search by Dichotomy
       using a basis set Q(A),Q(B),Q(C),Q(F) supplied by the user
         Based on LOSH by Daniel Louer & Robin Shirley (1976-77)
         with refinement & evaluation from ITO v6 by Jan Visser


                            Robin Shirley
                         University of Surrey
                               England


                         User Manual for v6.1b

                           12 October 1999


*******************************************************************************


Introduction (taken from initial comment lines)
-----------------------------------------------

LOSHFZRF - Powder Indexing Program using Grid Search by Successive Dichotomy
Daniel Louer and Robin Shirley (1977-1999)

Based on the CDC 7600 mainframe program of 1976-1977.

This version has been adapted by Robin Shirley to run on
x86-based PCs under DOS and Windows, using MSF77 v5.1 (May 1996),
and to support the CRYSFIRE powder-indexing system (July 1999)

Development log (starting from PC Fortran77 conversion in May 1996):

     Version 6.1b, 16Sep99 at 01.25
       LRECTAN & FMINEQ0 added to card 3 in MAIN and supported there
       and in NORM3, to allow user control of criteria for setting
       zone-angle constants to zero and taking values as equal.
       Storage for solutions increased from 500 to 5000.
       (Arrays specified as $LARGE: ROSTER,E,DD,ALP,BET,CELVOL)

     Version 6.1a, 15Jul99 at 03.30
       Adapted for CRYS2RUN as a targeted program with Log/summary.
       Scans single unique quadrant if Q(F)=0 and raises TOLG to 6 if
       NSPURI=0 (both ex-LZON622g), and handles I20MIN and FOMMIN
       condition properly.  Also various cosmetic improvements.

     Version 6.0, 31May96
       Initial translation of CDC7600 LOSHFZRF version (Oct77)
       Base version of LOSH:  Daniel Louer, 1976


General Description
-------------------

LOSH carries out an exhaustive search of alpha* & beta* in parameter space
by successive dichotomy, for user-specified basis sets.

LOSH is the original user-directed program for which LZON is the automated 
version.  The suffix "FZRF" indicates that an FZRF refinement and evaluation 
stage has been appended (adapted from Vissers ITO6).

Like LZON, LOSHFZRF is semi-exhaustive, searching exhaustively through a 
selected region of solution space.  However, LOSHFZRF searches only a single 
specified plane in solution space where by default LZON searches eight.

The plane that is to be searched must be specified by the user, in the form 
of a "basis set".  This consists of a single powder zone - the "basis zone" 
- specified as Q(A), Q(B) and Q(F), plus the first well-measured line not 
indexed by the zone, which by the Shirley/Ishida&Watanabe heuristic is taken 
as Q(C).

The resulting four powder constants Q(A,B,C,F) form the basis set for the 
search, which now only need cover the 2-dimensional plane in solution space 
defined by Q(D) and Q(E) - i.e. alpha* and beta*.  Such a 2-dimensional search 
is relatively fast - typically under a minute for the default settings with 
NSPURI=0 (no impurity lines expected).

This process can most easily be understood by studying the main output file 
from LZON, where it is set out for each of the basis sets used.  A basis zone 
for LOSHFZRF will usually be obtained by examining the detailed zones listings 
in the main output files of ITO12, FJZN6 or LZON, seeking a promising prospect 
that the original program missed.  This will typically be one with relatively 
large reciprocal area (hence small direct-cell constants) and large coverage 
(few unobserved lines within the zone).

It helps to have experience and training when spotting good powder zones, but 
the judicious human selector can often succeed where the zone-evaluating 
program failed.

As with LZON, all solutions begin as triclinic and are only examined and 
renormalised for higher symmetry by the evaluative FZRF postscript, which 
also refines the cell and infers its Bravais lattice type.  Solutions are 
accepted for logging if I20>15 and M20>7.

It is recommended to use the first 20 well-measured lines, but LOSHFZRF 
is prepared to search with less, although the FZRF stage may not like this: 
in such cases it may be necessary to renormalise and evaluate the solutions 
by hand (with the aid of CRYS).


Files and Channels used (from initialisation section of program)
----------------------------------------------------------------

INP       5     LOSH.DAT    Main input file
IOUT      6     LOSH.OUT    Main output file
ISHT      7        -        (Reserved for short output file, when implemented)

ILOGCH    3     LOSH.LOG    Log file      (from v6.1a, 10Jul99)
ISUMCH    4     LOSH.SUM    Summary file  (from v6.1a, 10Jul99)

ITEMCH    8     LOSH.TMP    Workfile used within LOSH
IREFCH    9     LOSH.REF    Workfile used to pass raw solutions to FZRF
	  

Some General Limits
-------------------

Minimum acceptable number of observed lines for s/r READER to permit
run to proceed (changed from 20 to try to help with high-pressure
phase-diagram work that may give under 20 lines - FJZNv6.21a, 9Jul99).
Note that this merely allows datasets with less than 20 lines to get
into the FZRF postscript without being rejected out of hand.  It
does *not* mean that their evaluation and refinement is necessarily
going to work successfully, nor that meaningful results are likely
with as few as 10 observed lines!  In short, it lets users with very
limited datasets explore the resulting problems themselves.
      NOBSMIN=10

Minimum number of indexed lines for accepting solutions for logging
      I20MIN=16

Minimum figure of merit for accepting solutions for logging
      FOMMIN=7.0


Data Input Formats (with explanatory notes)
-------------------------------------------

Line 1:   Title Line (20A4)
          Any ASCII text is acceptable (default - all blank)

Line 2:   Basis Set (4F10.5) expressed in QU. (10000/d-squared), d in Angstroms

          The basis set Q(A,B,C,F) comprises a basis zone hk0 which provides
          Q(A,B,F), plus Q(C) obtained via the Shirley/Ishida&Watanabe method,
          in which Q(C) is taken as the measured Q for the first reliable
          observed line that cannot be indexed by the basis zone.

          cols  1-10  Q(A) = 10000.a*-squared         (no default)
          cols 11-20  Q(B) = 10000.b*-squared         (no default)
          cols 21-30  Q(C) = 10000.c*-squared         (no default)
          cols 31-40  Q(F) = 10000.2a*.b*.cos(gamma*) (no default)

Line 3:   General Control Parameters (4I3,F5.0)

          cols  1- 3  NOBS   I3    Number of observed lines (no default)
          cols  4- 6  LMIN   I3    Minimum value of index L for search
                                   (default 0).  Removing all zero-level
                                   lines (i.e. hk0) from the data and setting
                                   LMIN=1 makes possible a faster search with
                                   hopefully a clearer signal:noise ratio.
          cols  7- 9  NSPURI I3    The maximum number of unindexed lines
                                   permitted in the search (default 0).
                                   Use this with caution as it can give
                                   exponential increases in search time,
                                   and in the number of pseudo-solutions.
          cols 10-12  LRECTAN I3   0 (default): the FZRF postscript will
                                   treat solutions essentially as triclinic
                                   and hence will not try to force angles close
                                   to 90 degrees to become exactly 90 degrees.
                                   1 (or any other non-zero value): angles near
                                   90 degrees (i.e. with powder constants less
                                   than FMINEQ) will be forced to become exactly
                                   90 degrees (even if they were specified in
                                   the basis set as being slightly oblique).
          cols 13-17  FMINEQ F5.0  Threshold (in QU.) used by the FZRF 
                                   postscript for various tests of equality
                                   between powder constants, or whether they
                                   should be forced to zero (default - an
                                   empirical value estimated by the program).
                                   This can be over-ridden by placing a user-
                                   specified value in this field.  The main use
                                   for this is to allow the user to inhibit the
                                   program from being over-zealous when
                                   evaluating large cells (i.e. after finding
                                   that the default value estimated by the
                                   program seemed too large for that dataset).

Line 4:   Angular Search Limits (2F7.2)

          cols  1- 7  ALPMIN F7.2  Minimum value of alpha* (degrees)
                                   (search will be from ALPMIN to 90)
                                   (no default)
          cols  8-14  BETMIN F7.2  Minimum value of beta* (degrees)
                                   (search will be from BETMIN to 180-BETMIN)
                                   (no default)

Lines 5 to NOBS+4:  Observed Powder Lines to be Indexed (2F7.4) x NOBS

          cols  1- 7  D      F7.4  Observed d-spacing in Angstroms
                                   (no default, obviously)
          cols  8-14  EPSIL  F7.4  Maximum error bounds in d for this line
                                   (default: bounds equivalent to +-0.04
                                   degrees 2Theta for CuKalpha 1 radiation)


Note that the defaults listed above are for the LOSHFZRF program itself.

When LOSHFZRF is called from within the CRYSFIRE system, these will be
over-ridden by any relevant QDAT defaults, which will in turn be over-ridden
by any relevant CRYS defaults.

The order of precedence for parameter settings is thus:

   User-specified > CRYS > QDAT > LOSHFZRF

For more details, see the CRYSFIRE user manual.


Overall Indexing Tolerance within FZRF (TOLG)
---------------------------------------------

Lines are accepted a "indexed" within the FZRF evaluation/refinement postscript 
if the calculated Q is within TOLG (QU.) of the observed Q.  TOLG is not under
the LOSHFZRF user's control, but is set adaptively by the program as follows.

The default for TOLG has been set to depend on whether or not spurious lines
have been anticipated (i.e. whether NSPURI=0).  This is necessary to prevent
FZRF conflicting with LOSH when NSPURI>0, through trying to index lines which
were excluded during LOSH's search as not being part of the solution, thus
causing the refined cell to diverge from LOSH's solution, "indexing" additional
line(s) but ending up with a low figure of merit.

Thus the wide tolerance TOLG=6 is used when NSPURI=0, to force any moderately
plausible lines to be included as "indexed" for the purpose of refinement.
This was found to be helpful in persuading subroutine REFPAR in FZRF to lock
on to correct solutions v6.1a (14Jul99).

But narrower bounds TOLG=3 are used when NSPURI>0 so as to have a
better chance of only including those lines which LOSH included during the
main search phase.

If either of these values prove to be unsuitable, the data and solution(s)
should be resubmitted directly to either ITO12 or FJZN6 for a refinement run,
with the desired value of TOLG specified in that program's parameter line.

