NTREOR

      Program N_TREOR

      This is a Stand-alone version of N-TREOR  (Version November 2001). 

      REFERENCE:
            New techniques for indexing: N-TREOR in EXPO
      J.Appl.Cryst. (2000) 33, 1180-1186
      by  Angela Altomare, Carmelo Giacovazzo, Antonietta Guagliardi,
      Anna Grazia Giuseppina  Moliterni,  Rosanna Rizzi  and Per-Erik
      Werner

      In EXPO N-TREOR is combined with a peak search  procedure and a
      a program set for structure determination.
     
      If you are only interested in the description of how to run the
      stand-alone version of the program go to the headline:
                N_TREOR the stand-alone version of N-TREOR
      
         N-TREOR is an updated version of TREOR90 described below.
      The main changes characterizing N-TREOR with respect to TREOR90
      are:            
      1) Several decisions  normally made by the user of TREOR90 when
         a  default run fails or when a  plausible  solution is found 
         are automatically made by N-TREOR
      a) If a  plausible solution is found, the program will look for 
         a better  solution in a  new trial. This may be  achieved by 
         requiring a higher M20 value or all the first 20 peaks to be        
         indexed. 
      b) If  N-TREOR does not give  satisfactory results in a default
         run it repeats the unit cell search with wider error limits.
      c) If still no solution is found,  with increased error limits,
         the maximum (h,k,l)  Miller indices of the  orthorhombic and
         monoclinic base lines are increased and the error limits are 
         narrowed to 50 per cent of the default values.  ( The reason 
         for narrowing the error limits is that a large number of big
         erroneous unit cells may otherwise be generated in the trial
         phase,  and  correct  solutions  may  be  eliminated  before
         refinement. There is always a need for more accurate data if
         the  unit  cell  is  big.  The  figure-of-merit  tests  will
         otherwise fail.)
      2) The   maximum  cell  volume  and  the  maximum  axis  values
         investigated  by  N-TREOR  are preset to 4000 A**3 and 35 A,
         respectively,  if the  maximum  observed d value is  greater
         than 10 A. If the maximum observed d value is less than 10 A
         the default values are (as shown in the key-word list below)
         2000 A**3 and 25 A, respectively.  
      3) The dominant-zone tests in TREOR90 are improved, and if more
         than the first 6 peaks can be indexed  by a  two-dimensional
         rectangular cell,but no three-dimensional solution is found,
         the  first  non-indexed  peak  is  reported  as  a  possible
         impurity line that may be deleted in a second test. 
      4) Wavelength  dependence of D1 and D2 ( error tolerances,  see
         the key-word list below) has been introduced.
                DX = DXCU*(WAVE/1.560598)**2  where
         DXCU = D1 and D2, respectively for CuK-alpha1 radiation
      5) Monoclinic solutions are checked for  possible  rhombohedral
         symmetry. If  the  symmetry  is  likely to be  rhombohedral, 
         N-TREOR calculates the possible hexagonal axes.  In general, 
         however, the user has to check for geometrical  ambiguities.
         In N_TREOR version  November 2001, the  rhombohedral cell is
         also calculated and refined by PIRUM.
      6) Possible zero shifts in the  2theta Bragg angles are tested.
         This is probably the most serious systematic error in powder 
         diffractometry.  Although  well  known  internal  as well as
         external  standard  techniques  exist,  that  can be used to 
         completely (or almost completely) eliminate such errors, the
         experience from a large number of  indexing  problems  shows
         that zero point errors are frequently present in  data  sets
         used for powder indexing. ( Suprisingly enough  even  modern
         synchrotron data, with exceptionally high RELATIVE accuracy,
         have sometimes been found to have large zero point errors.) 
      7) N-TREOR can suggest more candidate cells. In order to select
         the best one, a modified  de Wolff  figure of merit M'20 has
         been introduced, with
                        M'20 = (7-N-par)*M20    where
         N-par is the number of cell parameters to be determined  ( 6
         for triclinic system, 4 for monoclinic,....), and M20 is the
         original de Wolff figure of merit. Even if M20 is  effective
         as a tool for  assessing  the  reliability  of the cell, the
         heuristic relation (M'20=.....) allows the program to prefer 
         a higher symmetry solution. E.g., of two possible unit cells
         with  similar  M20  values,  one  monoclinic  and  the other
         triclinic, the monoclinic is preferred by M'20.
      8) The program PIRUM,  originally  an  interactive program, has 
         been suitably modified in order to automatically  refine the
         unit cell parameters, without any user intervention. N-TREOR
         performs a statistical study of index parity of the assigned
         reflections in order to detect the presence of doubled  axes
         or of additional lattice points (A, B, C, I, R or F centered
         cell). In these cases the reflection conditions are suitably
         modified and the unit cell  parameters  are  again  refined.
         It  may  be  necessary, however, to  check the  analysis  of
         systematic  extinctions in the  condensed  output  file. The  
         reason is that mutiple indexed reflections are not analysed.
         Additional refinement cycles are  performed by  PIRUM  after
         applying two supplementary origin shifts of +-  one  quarter
         of the shift value selected by N-TREOR according to  point 6
         above. See also the keyword LIMIT.
      9) It is not possible to interrupt the calculations by pressing
         the key...I....This option is not available any more. 
     10) It is still possible to use the key-word system as described
         below. Normally, however, only WAVE, LIMIT, CHOICE and  END*
         are needed.
     11) Last corrections: September 2004
    
   
                N_TREOR the stand-alone version of N-TREOR

      Data input file:

      LINE ONE.          TITLE  Any text in col.2-80


      LINE SET TWO.      One d-value and optionally INTENSITY on each
                         line. (Free format)
                         It is also possible  to  use  other types of 
                         input data. See keyword CHOICE in  the  key-
                         word list below. Note that the default value
                         of CHOICE is 4 in N_TREOR (i.e. d-values).  
                         The data must be  given  in  order, starting
                         with the low order lines.Generally the first
                         20-25 lines should be used.  Remaining lines
                         (if any) may be used in later  final refine-
                         ments. (The dialogue version of PIRUM).

                         INTENSITY data is optional. It is never used
                         by the program. If present, it  will only be
                         transferred to the output  lists as (max.) 4
                         digits integers.


      STOP LINE FOR LINE SET TWO IS A BLANK LINE 

      The program will ask for file names and Theta-shift.
      The normal Theta-shift is the step used in the data collection;
      (Usually =0.01 for Wave=1.5406 A)  i.e. 0.02 deg. in 2theta.


      LINE SET THREE.(See general description of this line set below)
                       
     Below 4 examples of line set three for N_TREOR are given:

     Example 1.
         end*
     Comment:This is the only key-word  needed for a  normal  N_TREOR
     run if  CuK-alpha1  radiation has  been  used  and  d-values are
     given.

     Example 2.
         wave=1.529, end*
     Comment: Error limits are wave-length dependent. It is therefore
     important to give the wave-lenght, although the d-values are not
     wave-lenght dependent. Do not forget the , before next key-word.

      Example 3.
        limit=1, end*
     Comment: LIMIT is a new key-word, not present earlier in  TREOR.
     LIMIT can be any integer between 1 and 10 (default value is 10).
     The parameter LIMIT can be given a value  less than 10 in  order
     to reduce the maximum number of zero shifts tested. ( The number
     of zero shifts applied will be  dependent on the  result  of the
     the calculations and is therefore usually less than 10).   
     If you have good reason to  belive that the zero point error  is
     negligible, you may save a lot of computer time by limit=1

      Example 4.
       choice=0, limit=1, end*
     Comment: Input data are sine square  theta  values  derived from
     an instrument with strictly monochromatic CuK-alpha1  radiation. 
     About limit=1, see example 3 above.

     WARNINGS:
     A) In the present version of the program the  automatic tests of
     index  parity  are  NOT  complete.  See  comments  about  VISUAL
     INSPECTION in the condensed output list. ( May be  improved in a
     later program version.) 
     B) On a PC the  calculations  may be very time consuming. It can
     be recommended to use LIMIT=1 ( see  Example 3 above) in a first
     test run, at least if you have good  reason to  believe that the
     zero point error is negligible.
     C) OBS ! The best solution may be found ANYWHERE in the condesed
     output file. The reason is that the automatic Pirum run may fail
     and give more unindexed lines. It is  recommended to  always use
     a separate Pirum run to check the possible solution/s.     
     
     END OF INSTRUCTIONS FOR THE STAND-ALONE VERSION OF N-TREOR



         TTTTTTT  RRRR     EEEEEE     OOOOO    RRRR       9999    0000   
            T     R   R    E         O     O   R   R     9    9  0    0
            T     R   R    E         O     O   R   R     9    9  0    0
            T     RRRR     EEEEEE    O     O   RRRR       99999  0    0
            T     R   R    E         O     O   R   R          9  0    0
            T     R    R   E         O     O   R    R         9  0    0
            T     R     R  EEEEEE     OOOOO    R     R       9    0000

           This is an autoindexing program and should be used to find a     
           physically plausible solution to an indexing problem.
           It is  not a program  for  final refinement of the unit cell
           dimensions. (c.f. PIRUM or NBS*AIDS83)

           Information for the programmer:

           The TREOR99 version is written in  Microsoft Fortran for PC.

           The interrupt function (..press the letter i) is generally
           not needed and if you want to use other  compilers  and/or
           computers whithout any possibility to sense keyboard oper-
           ations  during the  calculations, you may skip this in the
           following way

           Skip the include 'flib.fi' and 'flib.fd' 
           Replace the original  subroutine  chkkey  by the following
           dummy routine:

           Subroutine chkkey(code)
           integer*2 code
           code=0
           return
           end
   
           End of programmers information

      FEBRUARY 1999
           Two new keywords, ZEROSET and KREDUCT, are introduced. See
           keyword list below.  KREDUCT  may be used in order to save 
           only the best trial solutions.It is presupposed then, that
           input data is very accurate and a cell axis is expected to
           be very long (>20 A)  
           
           In order to avoid run time errors, a large number of small
           changes have been made.
  
           The earlier  program  versions were somewhat  dependent on 
           the wave-length used. The parameters: D1, D2 and SSQTL are 
           now  automatically ( i.e. if SELECT=-1 ,the default value)
           adjusted for  WAVE. As in earlier program versions one can 
           forget  about  WAVE if  CHOICE=4,  i.e. if input  data are
           d-values.
           If correct  WAVE  is given, also the  correct  diffraction
           angles are reported in the output lists.
               
           Monoclinic solutions are checked for possible rhombohedral
           symmetry. If several high symmetry solutions are found, it
           is recommended to decrease the  parameter VOL in  order to  
           find the smallest monoclinic cell (1/6 of the 'true' hexa-
           gonal cell). Then treor will check if the true symmetry is
           likely  to be  rhombohedral  and  calculate  the  possible
           hexagonal axes.
      
      SEPTEMBER 1997
           (Below 1997 is changed to 1999   (changed february 1999)
           Keywords (see below)  may be written in upper or lower case.

           The program will run in 1999 mode if the keyword
           SELECT has the value -1    (default value) 

           The normal TREOR99 run is:

           Title line: Any text in col. 2-80
           Data lines: Less than 99 lines (Normally 20-25 lines).
                       Free format.
                       Only  one value on  each  line is necessary.
                       Optionally an  intensity  may  be given as a 
                       second data on the line.  Intensity  data is
                       not used by the program and only transferred
                       to the output as max. 4 digits integers

           A blank line: 
           choice=4,     (if  D-values were used on the data lines)
                         Do not  forget  the , before next key-word
                         Key-words may be given in  arbitrary order
           end*          and on arbitrary lines but the  end*  must
                         be the last one.

           Usually no other key-words than  CHOICE need to be changed
           from the default values.

           If a  solution is  found the  program  will  automatically
           decrease  NIX or increase  MERIT  and rerun the problem in 
           order to check if a better solution can be found. However,
           triclinic  tests  will only be made if the  first solution
           was triclinic.

           If no  solution is found the  program  will  automatically
           change the parameters  IDIV and the error limits D1 and D2
           i.e. add 0.0001*(Wave/1.5405981)**2)and rerun the problem. 

           Of course the  TREOR99  mode  may take a  minute more on a
           Pentium but it is a strongly recommended, simple, safe and
           powerful procedure. 
           
           Powder indexing depends to 95 per cent on the data quality
           If you are  using a Pentium  processor the  CPU  time will
           probably never exceed 3 minutes.  ( A PC 486 may be almost
           ten times slower.)

           It is possible to run the  program in  TREOR4,  TREOR90 or
           TREOR99 mode

           TREOR4 mode if  VOL=positive value and  SELECT is zero (or
           more.) 
           TREOR90 mode if VOL=negative value and  SELECT is zero (or
           more)
           TREOR99 mode if  SELECT=-1  (Default)  (Normally preferred
           mode)
           If the  TREOR99  mode is used,  you normally  only need to
           choose the correct CHOICE parameter.

           In  all  modes  most  of  the  key-word  parameters may be
           changed from the  default  values ( c.f. the key-word list
           below).
           Do not change default  values  without  good  reasons. For
           example do not change  VOL  from the default value, unless
           you  have  reason  to believe that the unit cell volume is
           more than 2000 A**3 ( You will not reduce CPU time much if
           you are using a VOL that is less than 2000 A**3)

           If  TREOR99  finds a plausible solution ( according to the
           NIX  and  MERIT  parameters) this will be announced on the
           display  and  the  user may ( although  not  recommended )
           interrupt the  calculations  and  look  at  the  condensed
           output list.
           Interrupt...Press the letter   i   on the keyboard.          
           If the  program is running on a Pentium there is no reason
           for doing so.
           (The interrupt function is at present only available in the
           PC version.)

           Problem notes:

           A solution that is very  close to a higher  symmetry may be
           lost in the condensed  output list, although an  acceptable
           lower symmetry  solution may be reported in the long output   
           list. This  may  happen  if two cell  dimensions are almost
           equal.


      JUNE 1995
           Within  this section  JUNE  1995 to  JUNE  1992 a very short   
           description for the lazy user of  TREOR90 (who does not want  
           to read the complete documentation file) is given.

           The normal TREOR90 run is: 

           Title line
           Data lines (20-25 lines, only one d-value, col.1-16, on each 
           line)
           A blank line 
           CHOICE=4,  (if D-values were used on the data lines)
           SELECT=0,  (to avoid the TREOR99 mode)
           VOL=-2000, (note the minus sign. --- a treor90 run)
           END* (stop card)
     
           It is now possible to interrupt the  calculations.  This can 
           be done by the letter  i  on the keyboard. Then the  program
           will stop soon. The reason  for  this  option  is  that  one 
           should never hesitate to give  VOL eq. a negative value i.e.
           the  most  efficient test of all symmetries. One can  always
           stop for  example  triclinic tests from the keyboard.  (This
           option is only available on the PC version of the program)

           If  no  solution is found rerun the problem, but include the
           following keyword line:
           D1=0.0003, D2=0.0005,
           (note the , after each keyword value)
           Another test is to set
           IDIV=0,
           which  means  that the first seven lines will not be changed
           by ( what treor may erronously judge as ) higher order lines 
           The parameters  MERIT  and  NIX  may  also be changed. ( See 
           below.) The first accepted solution may not be the best one. 
           Therefore,  follow  the instructions on the condensed output
           file.
           Do not print the long output file.  Use your editor and look
           for the most promising M-TEST lines. 
       
           This  program  should  be  used to find a physical plausible
           solution of  the  indexing  problem.  The refinement is only
           preliminar ( not Hess weighted).  Especially  lines  at high
           diffraction angles may be unindexed by treor. 
           In  final  refinements all lines, all extinction conditions,
           Hess weights ( i.e. all  diffraction  angles should be given
           equal weights)and all knowledge about intensity distribution
           between overlaps ( if available) should be used.
           From  this  department a  flexible dialouge program,(version
           930101 of PIRUM) may be distributed.  
           Program NBS*AIDS83 is (probably ?) recommended by ICDD.

      JUNE 1992
           It is strongly recommended to run TREOR90 on a PC/AT using a
           486 CPU. Otherwise the VAX version  TREOR90V  may  be  used.
      AUGUST 1990
      OBS. In the PC/AT and VAX versions  the  subroutines  ORTAL, MAEG
           and COUNT are not vectorized. Vectorized versions  of  these
           subroutines are available for CONVEX computers.
           The original TREOR90 has been written for  a  CONVEX  vector
           processor. This should be kept in  mind  when  the  comments
           below are read. The program may be very time-consuming  on a
           PC (unless a 486 processor is used).

      1) Dominant zone test is added for the orthorhombic symmetry.
      2) Dominant zone test is added for the triclinic symmetry.
      3) Higher order lines among the first seven lines ( used  in  the
         base line sets) are  automatically  excluded  from  the  trial
         phase of the calculations.
      4) If a monoclinic or triclinic solution is  found,  the  program 
         will end with a unit cell reduction followed by  a  conversion
         of the reduced cell to a conventional cell  according  to  the
         metric symmetry. The reduction should be valid  unless  syste-
         matic extinctions are found in the trial cell.
      5) If a satisfactory solution is found, only the  condensed  out-
         put file is needed. It contains all relevant  information  and
         only one indexed list.
      6) The general output list  (that is normally not needed,  cf. 5)
         will only list trials where  M20 ( or Mxx if  less  lines  are
         available) is 6 or more and not more than 3  lines  among  the
         first 20 (or xx) lines are unindexed.
      7) If the parameter VOL is given with a negative sign all  symme-
         tries are tested until a final solution is found- if possible.
         OBS. This is the normal procedure for TREOR90
      8) An algoritm for successive reduction of trial-cell volumes  is
         used in monoclinic and  triclinic  tests  if  a  negative  VOL 
         parameter is given. It is  based  on  the  input  cell  volume
         limit and the  number  of  trial  cells  found  with  IQ ( See
         keyword IQ) or more than IQ indexable lines.
      9) It is strongly recommended  to  give  only  the  first  ( well 
         checked and accurately measured ) 25 lines in  the diffraction
         data list (See LINE SET TWO).
     10) It is expected that more than 95 per cent  of  monoclinic  and 
         higher symmetry patterns and probably more than  50  per  cent
         of triclinic patterns will be  indexed  PRESUPPOSED  the  DATA
         QUALITY is high ( i.e. average differences between  calculated
         and observed diffraction angles less than  0.02 deg. and  also
         the weak lines included in the data). The experience  of  tri-
         clinic patterns is limited, however. 
     11) Obs. It is important to check cubic, tetragonal and  hexagonal
         solutions by a second run with KS=0 and  THS=0  ( See key-word 
         list.) Do not trust cubic, tetragonal or  hexagonal  solutions
         without an orthorhombic test.
     12) The reason for testing the symmetries in correct order  ( from
         cubic to triclinic) and to START the  orthrhombic,  monoclinic
         and triclinic tests with dominant zone tests is that  by  this
         procedure false solutions are avoided. 
     13) For a normal TREOR90 run only the keywords

              CHOICE=X, (see key-word list) 
              VOL=-2000, (OBS. The negative sign.)
              END*

         should be given after the  diffraction  data  list.  Computing
         times of more than 1 minute is rare for monoclinic  or  higher
         symmetries on a CONVEX computer. Computing times of more  than
         5 minutes (on a CONVEX) for a triclinic pattern  has  not  yet
         been found. For a VAX (Micro VAX II) computing  times  may  be
         more than 50 times longer. The PC/AT 486 is  faster  than  the 
         Micro Vax II (but slower than CONVEX. The source code for  VAX
         is not exactly the same as for CONVEX. There  are  very  small
         differences between the PC/AT and the  VAX versions,  however.
         The input of file names and OPEN statements  must  be  changed
         if you want to run this program on  a  VAX.  Furthermore,  the     
         VAX version uses a subroutine to measure the CPU-time.
     14) The input format for LINE SET TWO ( See below) is  changed  in
         agreement with the output format of the diffraction data  file
         from  the  Guinier-H{gg  film  scanner  system ( at  Stockholm
         University). The change is mainly of interest  for  output  of
         intensities. 
     15) The original key-word instructions given  below  are  relevant
         as long as a positive VOL parameter is given. 
     16) If VOL is given a negative value (see 13 above) the  following
         key-words are fixed: MONO=135 and MONOSET=7.  Other  key-words
         may be used as in the description below.
     17) On the output lists 
         M-TEST= xx  UNINDEXED IN THE TEST=  y
         usually means that xx is identical with M(20)  and  y  is  the
         number of unindexed lines whithin the  first  20  lines ( i.e.
         used for the MERIT test). If less than 20 lines are  available
         xx and y refer to the number of lines used.
  

      November 1988

      29 11 88

      Trial-and-error program for indexing of unknown powder  patterns.
       
      Cubic, Tetragonal, Hexagonal, Orthorhombic, Monoclinic and 
      Triclinic symmetries.

      Version 2  1/9-75 = Version 26/4 plus

                       DENS,EDENS and MOLW.     See Keyword list below.

      Version 3  8/5-80 New output form

      Version 4  2/10-84 = Version 3 plus

                 The following new options....

                 1. IDIV.          See keyword IDIV below.
                 2. Monoclinic (020)-test
                    Ref: Smith,G.S. and Kahara,E J.Appl.Cryst.
                         8 (1975) 681
                 3. SHORT.         See keyword SHORT below.
                    Short axis test. (Indexing of dominant zones.)
                 4. TRIC.          See keyword TRIC below.
                    Indexing of triclinic patterns.
     
      The source code was modified in order to decrease  the  CPU-times 
      in September 1988. The changes have no influence on input or out-
      put from the program, but CPU-time reductions of 20-50  per  cent
      have been observed.

      Version 5. (=Version November 1988) 29/11 1988

      Dominant zone test introduced  also  for  orthorhombic  symmetry.
       In version 4 high symmetry short axis solutions were only  found
       indirectly from the monoclinic tests.
      Condensed output file.
       A complete list of observed and calculated lines is  only  given
       for the solution (if it is found) i.e. for an indexing where the
       stop limits ( See  keywords  MERIT  and  NIX )  are  fullfilled.    
       Normally only the condensed output file is needed.         
      If the stop limits are fullfilled the unit cell is refined  three
       cycles more. OBS. Final least-squares refinement should be  made
       by a separate program (for example by  PIRUM). The TREOR program
       is written in order to FIND a plausible cell, not to produce the
       ultimate refinement.
      Only the first part of the difference analysis table  is  printed
       if no solution is found. (Usually it is not needed as you should
       rerun the problem after modifications of the input data.)

      If you have any questions, write to....

                         P.-E.Werner
                         Dept. of Structural Chemistry
                         Arrhenius Laboratory
                         Stockholm University
                         S-106 91 Stockholm,
                         SWEDEN



                         TEL: 08 / 16 23 93
                         FAX: 46-8-15 21 87
                         EMAIL: PEW@STRUC.SU.SE


      It is believed, however, that the following documentation  should
      be sufficient for all careful readers.

      GOOD LUCK!



      R E F E R E N C E S


      Basic principles. Werner,P.-E., Z.Kristallogr. 120 (1964) 375-387

      TREOR, a semi-exhaustive trial-and-error powder indexing  program
      for all symmetries. Werner,P.-E.,  Eriksson,L.  and  Westdahl,M.,
      J. Appl. Crystallogr. 18 (1985) 367-370

      Refinement of unit cell. Werner,P.-E.,Arkiv Kemi 31(1969) 513-516

      Figure of merit. De Wolff,P.M.,J.Appl.Crystallogr. 1(1968)108-113

      Geometrical ambiguities. Mighell, A.D. and  Santoro, A., J. Appl.
      Crystallogr. 8 (1975) 372


      G E N E R A L   C O M M E N T S

      This is a general  trial-and-error  indexing  program  for  X-ray
      diffraction powder patterns (i.e. all symmetries included).

      Historical information ---- In order to reduce computing times on
      computers without hardware floating point  processers,  parts  of
      the program have been written for integer calculations.      

      The parameters given as normal values in the keyword  list  below
      should be regarded as an important part of the  program. They are
      based on experience from many successful runs on structures  con-
      firmed by single crystal data.
      The parameters VOL and CEM, however,  may  be  selected  for  the
      actual data set and the symmetry tried.
      ...For a monoclinic trial the parameter MONO  must  be  non-zero.
      ...For a triclinic trial the parameter TRIC must be 1.
      A TREOR99 run (i.e. SELECT=-1) or a TREOR90 run (i.e. VOL= a nega-
      tive number) will automatically check all symmetries.

      Most of the powder patterns used to check the program have  been
      obtained by focusing Guinier-Hagg cameras. The photographs  have
      been measured by....
       1. The method described by Hagg,G., Rev.Sci.Instr.18 (1947) 371
      and Westman,S. and Magneli,A.,  Acta Chem. Scand. 11 (1957) 1587
       2. The method described by Malmros, G. and  Werner, P.-E., Acta
      Chem. Scand. 27 (1973) 493
       3. The film scanner system  SCANPI ( written  for  the  Guinier
      film scanners LS18 and LS20)
      The program has also been tested on a large number  of  NBS-data
      sets. (JCPDS data sets.)

      The accurate data obtained by NBS,National Bureau of  Standards,
      is clearly sufficient for successful indexing (in spite  of  the 
      fact that they are now usually  obtained  by  powder  diffracto-
      meters. Unfortunately, however, many  diffractometer  data  sets
      found in  the  litterature  show  parabolic  deviations  between
      observed and calculated diffraction angles.)

      The following citations, however, should be emphasized....

      'The  paramount  importance  of  resolution  for  indexing  work
       explains the high  success  rate  for  focussing  camera  data,
       especially from Guinier-Hagg instruments, whose resolution  can
       omly be described as  superb. It is  rather  less  common ( and
       considerably more expensive) to obtain as good resolution  with
       diffractometer data.'

      'Powder indexing is not like  structure  analysis,  which  works 
       well on good data, and will usually get by on poor  data  given
       a  little  more  time  and  attention.  Powder  indexing  works
       beautifully on good data, but with poor  data it  will  usually     
       not work at all'


      Ref: Data accuracy for powder indexing.Shirley,R.NBS Spec. Publ.
          567 (1980)  P.370 and P.362 respectively.

      WARNING!
      A zero point error is much more serious than statistical  errors
      of the same magnitude.

      Sigma(Two theta) should be less than 0.02 deg.



                 *******************************************
                 * DO NOT WASTE COMPUTER TIME ON BAD DATA. *
                 *******************************************

      An indexing algorithm cannot be  statet  rigorously  because  of 
      the unpredictable  distribution  of  unobserved  lines  and  the
      errors of  measurements. One (or two) impurity lines  may  cause
      severe problems.More impurity lines may rule out the possibility
      to index the pattern.  Therefore, it is  expected  that  various
      methods may be useful for various powder patterns. For  example,
      a multitude of non-systematic extinctions  may  not  appreciably
      affect the power of trial-and-error methods.   

      The least-squares refinement of the unit cell dimensions  should
      normally not be considered as the ultimate refinement. The  main
      purpose of this program is to FIND the unit  cell.  The  program
      PIRUM (version 930101) may be  used  for  ultimate  refinements. 
      PIRUM (version 930101) is a dialouge version of  the  old  PIRUM
      ( cf. ref. /Refinement of unit cell/ given  above. )  Extinction
      conditions, Hess weights and max.  accepted  deviations  between
      observed and calculated 2theta in degrees are normally  used  in
      version 930101 of PIRUM. In old PIRUM versions, parameters  like
      D1, D2, and SSQTL (See keyword list below) were used.
      (cf. also the NBS*AIDS83 program. PIRUM is designed to  be  more
      user-friendly, however.)
      
      A limited number of nonsense cells may be printed on the  output
      file. You should look for max. De Wolff figure of merit ( not F-
      index) and min. number of unindexed lines.

      WARNING. You should not accept unindexed lines  unless  you  are 
      able to explain them. On the other hand, you should not  put  in
      uncertain (doubtful) lines in this program. They may  be  tested
      later by a refinement program (ex. PIRUM).    




      I N P U T   D A T A


      LINE ONE.          TITLE  Any text in col.2-80


      LINE SET TWO.      One SQ and optionally INTENSITY on each line.
                         (Free format)
                         SQ (=Sine square theta). It is also possible
                         to use other types of input data. See keyword
                         CHOICE
  
                         The SQ data must be given in order,  starting
                         with the low order lines.Generally the  first
                         20-25 lines should be used. Remainging  lines
                         (if any) may be used in later  final  refine-
                         ments. (Program PIRUM).

                         INTENSITY data is optional. It is never  used
                         by the program. If present, it  will  only be
                         transferred to the output  lists  as (max.) 4
                         digits integers.


      STOP LINE FOR LINE SET TWO IS A BLANK LINE (OR A NEGATIVE SQ)


      LINE SET THREE.    GENERAL INSTRUCTIONS.

      All parameters in line set three have preset values.
      A preset value is denoted 'NORMAL VALUE 'below.
      Any 'NORMAL VALUE' may be changed in the following way:

         KEYWORD1=VALUE1, KEYWORD2 = VALUE2,
         KEYWORD3=VALUE3,   .......,    END* 

      1. The keywords are listed below
      2. You must not forget =
      3. The value may be given in  free  format ( integer or real ).
      4. You must not forget ,

      You may use arbitrary positions on the lines.
      All blanks are irrelevant.
      The number of lines is arbitrary. You may give one or more
      key-word(s) on each line.
     
      Line set three must end with the keyword  END*  (OBS. asterisk)



      S T R A T E G Y
      Unless SELECT=-1 (i.e. TREOR99 mode) or VOL=(a negative value)
      (i.e. TREOR90 mode),  the  program will not  differ  much  from
      earlier program versions.  See the  comments on the top of this
      list. Then (if VOL=negative value) only parameters such as NIX,
      MERIT, IDIV and in exeptional cases D1, SSQTL  and/or D2 may be
      changed if indexing is not successful. Usually the main problem, 
      however, is the  quality  of  your  diffraction  data.  
      Therefore, if the  first  run  does  not  give  a  satisfactory
      solution, it may be recommended to increse D1 and D2 to  0.0003
      and 0.0005, respectively.

      If the TREOR99 mode is used (i.e. SELECT=-1) the program  will,
      regardless  a  plausible  solution  is  found or not, rerun the 
      problem and automatically adjust some parameters. Therefore  it
      is generally not  necessary for the  user to change the default 
      values in MERIT, NIX, D1 and/or D2. 
      
      If you are not using the normal TREOR99 procedure (i.e. SELECT=
      -1) or the TREOR90 procedure(i.e. negative VOL) the standard
      procedure is to start with the higher symmetries:
      cubic, tetragonal, hexagonal and orthorhombic ( in one run).
      Next the  monoclinic  symmetry  may be tried. More than one job
      may be needed..successively increasing the number  of base line
      sets, and cell volume (See keywords: VOL, CEM and MONOSET)

      If formula weight and density are known, they may be used. (See
      keywords: DENS, EDENS and MOLW). The CPU-time needed will  then
      usually be strongly reduced. (Unfortunately  they  are  usually
      not known and therefore they have not been used very much.)



      LINE SET THREE EXAMPLES: (TREOR4, not normal TREOR99 or TREOR90
      examples.)
       
      EXAMPLE 1.Next line (except C in col.1) represents a line set 3
      END*

      Cubic, tetragonal, hexagonal and  orthorhombic  symmetries  are
      tried. It may be recommended to try a smaller VOL limit even if
      a solution with acceptable figure of merit has  been  obtained.
      Sometimes it is difficult to find the necessary transformations
      between a high symmetry unit cell of too large  dimensions  and
      the primitive one. 


      EXAMPLE 2. Next two line is a line set 3.
      KS=0,THS=0,OS1=0,
      CEM=20, V O L = 1000 , MONO=130,END*

      This is an example of a first monoclinic  trial. ( See  keyword
      MONO). Note that it is irrelevant if  you  give  'CEM=20.0'  or
      'CEM=20' etc.
  
  
      EXAMPLE 3. Next.....etc.
      KS=0,THS=0,OS1=0,
      CEM=20, VOL=1500, MONO=130, END*

      If example 2 is unsuccessful you may increase the VOL parameter
      to 500


      EXAMPLE 4. Next.....etc.
      KS=0,THS=0,OS1=0,CEM=20,
      MONOSET=7,LIST=1,
      DENS=3.123,EDENS=0.2,MOLW=234,
      END*

      If you have any possibility  to  put  in  density  and  formula
      weight, the CPU-time will be much reduced.  This  may  also  be
      tried if you expect that the lattice contains a  dominant  zone
      i.e. if in a test run you get a large  number  of  trial  cells
      when using the keyword SHORT=1. 



      EXAMPLE 5. Next....etc.
      CEM=20,VOL=700,TRIC=1,MERIT=20,END*

      This is a triclinic test ( OBS. time-consuming) ( See.  keyword
      TRIC). A de Wolff figure merit of 20 may (sometimes) be  needed
      for a triclinic cell
      
      The examples given above illustrate a  step-wise  strategy  for
      indexing. However, the VOL parameter may be estimated from  the
      D-value of the 20th line. (cf. keyword TRIC)


      WARNING. If the unit cell  has  a  small  volume,  for  example     
               250 A**3 and VOL=2000 is used,  the  correct  solution 
               may be lost in the trial process. The reason is that a
               large number of  large  trial  cells  may  erroneously
               index more lines than the correct cell.
               The problem is less severe in TREOR90  as  a  negative 
               VOL parameter will cause the program to test ( for all 
               but the triclinic symmetry) half the maximum volume in   
               a first step.

      WARNING. Estimation of the unit cell volume from the  relations
               VOL(monoclinic cell)= 20*D(20)**3  where D(20)= the D-
               value for line number 20, and VOL(orthorhombic) =
               31*D(20)**3 are much less reliable than the correspon-
               ding relation for the triclinic symmetry.
                          VOL(triclinic)=13.39*D(20)**3
               Triclinic structures have no  systematic  extinctions!
               For structures containing atoms with large differences 
               in scattering  factors ( eg. metal-organic structures)
               the general rule may fail also in a triclinic case.         
               Ref: Smith,G.S. J Appl. Crystallogr. 10 (1977) 252


      It is usually easy to put in a known ( or expected ) cell  edge
      into the program. Example: A monoclinic trial with the restric-
      tion that one cell axis is X.XX A. Add this D-value in line set
      two. Suppose it will be line number 2.  Then  set MH2=1, MK2=1,
      ML2=0 and MS2=1. Then the line will be used as A-axis  or ( the
      unique) B-axis in the monoclinic test.
      Conclusion: It is usually easy to put in  prior  knowledge  and 
      constraints -for  example  density-  into  the  program. ( This
      statement is made because  of  some  misunderstandings  in  the
      literature.)




      H O W    T O   I N T E R P R E T  T H E   O U T P U T.
  
      As in all good detective stories, the solution of  the  problem
      will usually be given on the last page.....
      i.e. the output list will be interrupted  as  soon  as  a  unit
      cell that will satisfy the criteria set  by  the  keywords  NIX
      and MERIT are fullfilled. The main  rule  is  that if  all  the
      first 20 lines are indexed and the De  Wolff  figure  of  merit
      M(20) is greater than  9,  then  the  indexing  problem  is  in
      principle solved. This does not mean that the cell is  reduced,
      that a cell axis may not be double etc.,
      


      UNIT CELLS OBTAINED BY THE PROGRAM SHOULD BE CAREFULLY CHECKED

      A. If M(20) is less than 10 or more than one line is  unindexed
         within the 20 first observed lines the solution is  probably
         meaningless. Is any low-order line wrong ?
      B. Check for common factors in the quadratic forms.
         Example: A teragonal pattern may have H*H + K*K = 5*N
         i.e. the A-axis is 2.3607 ( square root of 5) times  shorter
         than given on the output list.
         Example: If all H, K or L are even, the  corresponding  cell
         axis should be divided by 2.
      C. If the unit cell obtained is centered,  derive  a  primitive
         cell. ( Run program MODCELL or a corresponding NBS  program)
      D. Reduce the primitive cell and derive the conventional  cell.
         (Run program REDUCT or a corresponding NBS program)
      E. Hexagonal and tetragonal  cells  are  sometimes  indexed  as 
         orthorhombic. Example: A=B*1.7321 i.e. a possible  hexagonal
         cell.
      F. Check for geometrical ambiguities. See reference  above.  It
         is also strongly recommended to chech cubic, tetragonal  and
         hexagonal solutions by an orthorhombic test.  Put  KS=0  and
         THS=0 and re-run the problem.
         There are two reasons for this procedure....
         1. It may help you to identify geometrical ambiguities.
         2. It has been found that sometimes very small  orthorhombic
            unit cells can be indexed  in  an  acceptable  way ( i.e.
            fullfill the De Wolff criteria) by a larger unit cell  of
            higher symmetry. Although the unit  cells  are  sometimes
            related to each other, the relations are often  difficult
            to detect, and therefore it is often  convenient  to  let
            the program derive both solutions.
      G. The De Wolff figure of merits are derived from  the  assump-
         tion that no systematic extinctions  are  present  and  that
         all lines are indexed. A high figure of merit has no meaning
         unless all lines are indexed.  The De Wolff figure of  merit
         will increase in the  final  refinement  made  with  program
         PIRUM, where the systematic extinctions can  be  taken  into
         account.
      H. If possible, use the density and  formula  weight  to  check 
         that the unit cell contains an integral  number  of  formula
         units.
      I. If a cell axis is more than 20 A....be suspicious!
         It has been found that the De  Wolff  figure  of  merit  may
         fail in such cases. (Require M(20) > 20)
      J. If one cell edge is much shorter than the others..........be
         suspicious! It may be a dominant zone  problem  and  the  De
         Wolff test may fail. (This problem is usually not severe  in 
         TREOR90, where short  axis  tests  are  made  prior  to  the
         general tests.)
      K. If a table starts with...NOT REFINED UNIT CELL...
         two parameters are probably  almost identical ( the symmetry
         may be higher) and the trial cell  parameters  are  used  to 
         print the list.
      L. If no satisfactory solution is found ( See the keywords  NIX
         and MERIT), the program may end  with  a  small  table  con-
         taining a difference analysis. The program is  described  in
         Z. Kristallogr.120 (1964) p.381-382 (Werner,P.-E.)  where it
         is named I1. The  most  interesting  differences  are  those 
         that have high multiplicities  (on the top of the list)  and 
         are not too small (to the right of the list). In the present
         state of the program, the difference table  is  usually  not
         needed. 
      M. Why not solve the crystal structure from your powder  data ?
         This is the ultimate way to prove the unit cell!







      K E Y W O R D    L I S T

      KEYWORD. NORMAL    COMMENT.
               VALUE.


      KH      =4         Max H for cubic base line.
      KK      =4         Max K for cubic base line.
      KL      =4         Max L for cubic base line.

                         OBS. The program will only generate 
                         H greater than or equal to K and
                         K greater than or equal to L for
                         this line.

      KS      =6         Max H+K+L for this line.

                         OBS. If KS=0 cubic test omitted.

                         OBS. The  cubic base lines are (1) and (2).

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

      THH     =4         Max H for tetragonal and hexagonal base lines.
      THK     =4         Max K for tetragonal and hexagonal base lines.
      THL     =4         Max L for tetragonal and hexagonal base lines.

                         OBS. The program will only generate
                         H greater than or equal to K for these lines.

      THS     =4         Max H+K+L for these lines.

                         OBS. If THS=0 tetragonal and hexagonal tests
                              omitted.

                         OBS. The tetragonal and hexagonal base lines 
                              are (1,2),(1,3) and (2,3)

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

      OH1     =2         Max H for the first orthorhombic base line.
      OK1     =2         Max K for the first orthorhombic base line.
      OL1     =2         Max L for the first orthorhombic base line.

                         OBS. The program will only generate 
                              H greater than or equal to K, and
                              K greater than or equal to L for this line.
                              This is also valid if the SELECT parameter
                              is used. (See below).

      OS1     =3         Max H+K+L for this line.

                         OBS. If OS1=0 orthorhombic test omitted.

      OH2     =2         Max H for the second orthorhombic base line.
      OK2     =2         Max K for the second orthorhombic base line.
      OL2     =2         Max L for the second orthorhombic base line.
      OS2     =4         Max H+K+L for this line.

      OH3     =2         Max H for the third orthorhombic base line.
      OK3     =2         Max K for the third orthorhombic base line.
      OL3     =2         Max L for the third orthorhombic base line.
      OS3     =4         Max H+K+L for this line.

                         OBS. The orthorhombic base lines are
                         (1,2,3) (1,2,4) (1,2,5) (1,3,4) (2,3,4) and (1,2,6)
                         if SELECT0=0 (See SELECT below)

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

      MH1     =2         Max Abs(H) for the first monoclinic base line.
      MK1     =2         Max K for the first monoclinic base line.
      ML1     =2         Max L for the first monoclinic base line.

                         OBS. The program will only generate
                              H greater than or equal to L for this line.
                              EQ. TO L FOR THIS LINE.
                              This is also valid if SELECT is used.
                              (See SELECT below)

      MS1     =2         Max Abs(H)+K+L for this line
                         The normal (and fast) way to test an expected cell
                         axis is to put it in as SQ number one (in card set
                         two) and set MH1=1, MK1=1, ML1=0 and MS1=1    

      MH2     =2         Max Abs(H) for the second monoclinic base line.
      MK2     =2         Max K for the second monoclinic base line.
      ML2     =2         Max L for the second monoclinic base line.
      MS2     =3         Max Abs(H)+K+L for this line.

      MH3     =2         Max Abs(H) for the third monoclinic base line.
      MK3     =2         Max K for the third monoclinic base line.
      ML3     =2         Max L for the third monoclinic base line.
      MS3     =3         Max Abs(H)+K+L for this line.

      MH4     =2         Max Abs(H) for the fourth monoclinic base line.
      MK4     =2         Max K for the fourth monoclinic base line.
      ML4     =2         Max L for the fourth monoclinic base line.
      MS4     =4         Max Abs(H)+K+L for this line.

                         OBS. The monoclinic base lines are
                         (1,2,3,4) (1,2,3,5) and (1,2,4,5)
                         If SELECT is less than 6. (See SELECT below)


      MONOSET =0         This parameter makes it possible to use more than 3
                         base line sets in the monoclinic trials.
                         If MONOSET is:
                         Greater than 3, base line set (1,3,4,5) will be used
                         Greater than 4, base line set (1,2,3,6) will be used
                         Greater than 5, base line set (2,3,4,5) will be used
                         Greater than 6, base line set (1,2,3,7) will be used
                         Thus max 7 base line sets can be used.
                         In N-TREOR (=STREOR), TREOR99 and TREOR90 modes
                         MONOSET is fixed = 7

      MONOGAM=1          The best 5 (in N-TREOR 10) trial parameter sets      
                         stored (See IQ) for each base line set will be
                         refined before next base line set is tested.

                         If MONOGAM=0 all base line sets are tried before
                         any refinement is made.

                         MONOGAM is only used in monoclinic tests.

                         It is recommended to use MONOGAM=1 because a refined
                         cell parameter set is always tested for the stop
                         limits NIX and MERIT. Thus CPU-time may be saved.

      MONO    =0         Max beta angle allowed in a cell.
                         OBS. No monoclinic test if MONO=0
                         (See also SHORT)
                         In N-TREOR (=STREOR), TREOR99 and TREOR90 modes
                         MONO is fixed = 135

      SHORT   =1         Short axis test.
                         The parameter is only used for monoclinic tests.
                         The first six lines are tested for the occurrence
                         of a common zero index in the six first lines.
                         If SHORT=0 no short axis test.
                         If you want to make this test without repeating
                         other monoclinic tests, you may give MONO a
                         negative sign.
                         


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

      USE     =19       -or equal to the number of input lines if there are
                         less than 19 lines,
                        -or equal to the number of lines with sine square
                         thetas less than 0.327
                        -USE is the number of lines used in the trial-indexing
                         part of the calculations.

                         OBS. Max USE=20

                         OBS. If you want to change USE, you should also
                         change IQ. (See IQ).

      IQ      =USE-3     The number of indexable lines required in the trial-
                         indexing procedure if the cell should be stored for
                         ev. least-squares refinement.
                         These reciprocal cell parameters are printed if 
                         LIST=1

      LIST    =0         See IQ above.

      SELECT  =-1        In N-TREOR (=STREOR) and TREOR99  SELECT must be -1 

                         If you want to avoid the TREOR99 mode (but why ?..)
                         set SELECT=0 or...
                       
                         if SELECT is positive the orthorhombic base lines
                         are (SELECT,1,2) (SELECT,1,3) and (SELECT,2,3) or..

                         if SELECT is greater than 5 the monoclinic base lines
                         are (SELECT,1,2,3) (SELECT,1,2,4) and (SELECT,1,3,4)

                         (Positive SELECT can not be used in TREOR99 mode.)


      MERIT   =10        The De Wolff figure of merit required as stop limit.
                         Ref:   De Wolff,P.M.   J. Appl. Crystallogr.
                         1 (1968) 108-113
                         ( For cubic, tetragonal and hexagonal symmetries
                         are the different quadratic forms as given in
                         Int. Tabl. of X-Ray Crystallogr. (1968) Vol.2
                         p.109-145 used in the calculation of the number of
                         theoretical lines.)
         
                         OBS. The figure of merit calculations are not
                         strictly valid unless all 20 first lines are indexed.


      NIX     =1         If a cell after least squares refinemnet has a figure
                         of merit equal to or greater than MERIT and the
                         number of not indexable lines among the USE first
                         lines is less than or equal to NIX, the calculations
                         are stopped.

                         OBS. Otherwise he calculations will end with a
                              difference analysis (Program I1.  Werner,P.-E.
                              Z.Kristallogr. 120 (1964) 375-378)
                              (Now not very useful list. --'historical')

      IDIV    =1         The 7 first lines are adjusted by (eventually
                         occurring) higher order lines.
                         If IDIV=0 no corrections.
                         Usually the default value 1 is o.k. There are
                         exeptions, however.   If indexing is not
                         successful, you may try IDIV=0

      WAVE    =1.5405981 Wave length. (in Angstroem)
                         As a rule one should not change WAVE
                         If D-values are used in the input data file (See
                         CHOICE=4) one can always pretend that WAVE was
                         1.5405981 A. WAVE is then a formal parameter only
                         related to D1, SSQTL and D2 (See below).

      VOL     =2000      Max cell volume (in Angstroem**3)
                         A new option available in TREOR90 is to give a
                         negative value of VOL, ex. VOL=-2000. 
                         See comments number 16 on the top of this list.
                      
      CEM     =25        Max cell edge (in Angstroem)
                         The CPU-time depends on VOL and CEM

      D1      =0.0002    (if WAVE=1.5405981) See D2 below.

      SSQTL   =0.05      (if WAVE=1.5405981)  See D2 below.

      D2      =0.0004    (if WAVE=1.5405981)
                         A line is regarded as indexed if..
                         sine square theta is less than SSQTL and
                         Abs(sine square theta observed minus sine square
                         theta calculated) is less than D1 or...
                         if sine square theta is greater than SSQTL and
                         the corresponding difference is less than D2.
                         D1, SSQTL and D2 are used in the trial indexing
                         part as well as in the least squares refinements
                         If SELECT=-1 are D1, SSQTL and D2 automatically 
                         multiplied by the factor (WAVE/1.5405981)**2
                         (i.e. D1, SSQTL and D2 depend on WAVE)


      CHOICE  =4         Indicator defining SQ on card set two..
                         CHOICE=0   SQ=Sine square theta
                               =1   SQ=1/(D*D)    (D-spaceing in Angstroem)
                               =2   SQ=Theta      (Theta=Bragg angle in deg.)
                               =3   SQ=2*Theta
                               =4   SQ=D
                         OBS next line...
                         Default value in earlier TREOR-versions was 0 


      DENS    =0         Density. (DENS=0 density not used.)
                         If only an integral number of molecules in the unit
                         cell is accepted DENS, EDENS and MOLW may be used.
                         (On your own responsibility)
                         DENS = density in gram per cm**3

      EDENS   =0         Not used unless DENS equals non zero.
                         EDENS= Max deviation in DENS.
                         OBS. DENS and EDENS are used in trial calculations
                         i.e. they are used on non refined unit cells.
                         Therefore, do not use too small EDENS
                         
      MOLW    =0         Not used unless DENS ( and EDENS ) are non zero.
                         Mol. weight in A.U. (OBS. Crystal water included.)
                         It is not recommended to use DENS, EDENS and MOLW


      TRIC     =0        No triclinic test. 
                         If TRIC=1 all higher symmetry tests are omitted and
                         a triclinic test is made.
                         It is presupposed that all higher symmetries have
                         been tried in earlier runs.
                         Although it is in principle possible to index any
                         pattern as triclinic, the indexing algorithm used
                         here is not effective for higher symmetries.
                         OBS. See comment 7 on the top of this list.
                         TRIC is not used in N-TREOR (=STREOR), TREOR99 and
                         TREOR90 modes.


      ZEROSET  =0        This keyword may be given as an integer.
                         ZEROSET*0.005 degrees are added to all theta-
                         values (i.e. ZEROSET*0.01 deg. to all 2theta). 
                         Example: If 2theta-zero at 0.05 deg., then set
                         ZEROSET=-5
                         In N-TREOR different zero point positions are
                         automatically tested as explained under the 
                         key-word LIMIT       

      KREDUCT  =0        If KREDUCT is given, only trial solutions with
                         IQ=USE-(KREDUCT-1) number of lines indexed may 
                         be saved for trial-refinements.        
                         OBS. If KREDUCT=0 (or is not given) IQ=USE-3
                         (See keyword IQ above) 
                         These reciprocal cell parameters are printed if
                         LIST=1
                         Thus, if KREDUCT=1 only trial-solutions where all
                         lines are indexed will be saved for further tests.
                           
      LIMIT    =10       New key-word for program versions STREOR and NTREOR.
                         Max. number of origin shifts.
                         The program will ask for the theta-shift.
                         Normal theta-shift is 0.01 deg. if wave=1.5406 A
                         (i.e. 0.02 deg. in 2 theta)
                         Tests will be made for origin theta-shifts until
                            (LIMIT-1)*(theta-shift)
                         Thus, if LIMIT=1, no origin shift will be tested.
                         If you can expect that zero shift is negligible
                         you may save a lot of computing time if LIMIT=1
                         is used.
                         

      END*               This keyword denotes the end of the parameter list.
                         (i.e. end of card set three)




      C O M M E N T S   F O R   T H E   P R O G R A M M E R


      THE FILES ARE OPENED IN THE MAIN PROGRAM (THE FIRST PROG). 
      
      THE LOGICAL UNITS ARE..
      NUIT=9  THE CONDENSED OUTPUT FILE.
      IIN=8   THE DATA INPUT FILE.
      IOUT=7  THE OUTPUT FILE.
      NDISP=6 OUTPUT (ON DISPLAY) OF TRIAL PARAMETERS IF KEYWORD LIST=1
              (SEE KEYWORDS IQ AND LIST)
      LKEY=5  KEY-BOARD.
      THE LOGICAL UNIT NUMBERS 5,6,7,8 AND 9 ARE GIVEN IN THE MAIN PROGRAM
      AND MAY BE CHANGED FOR YOUR COMPUTER. THEY NEED NOT BE CHANGED IN
      ANY OTHER PLACE OF THE PROGRAM, HOWEVER.


      THE PROGRAM IS MAINLY WRITTEN IN FORTRAN (II) AND (IV), BUT
      FORTRAN 77 HAS BEEN USED TO SOME EXTENT. (SEE FOR EXAMPLE SUBROUTINE
      TWODIM.)-IT IS THE INTENTION, HOWEVER, THAT IT SHOULD NOT BE
      DIFFICULT TO REWRITE THE FORTRAN 77 STATEMENTS IF ONLY FORTRAN(IV)
      IS AVAILABLE.
      It may be recommended to use the WATCOM FORTRAN 77 compiler. 

      VERSION 4 OF THE PROGRAM HAS BEEN DEVELOPED AT
      STOCKHOLM UNIVERSITY USING A VAX 11/750 COMPUTER.
      VERSION 5 WAS DEVELOPED FOR CONVEX 210, VAX 11/750 AND IBM PC/AT.
      VERSION TREOR90 IS WRITTEN FOR CONVEX 210. A NON-VECTORIZED
      VERSION IS ALSO AVAILABLE. TRICLINIC TESTS
      MAY BE VERY TIMECONSUMING ON A VAX, HOWEVER. 

      CALLS FROM THE MAIN PROGRAM ARE TO...
      PWINL.....THE DATA INPUT ROUTINE.
      TREOB.....THE TRIAL MODULE (THE MOST TIME-CONSUMING PART).
      TREOC.....PROG. FOR DIFFERENCE ANALYSIS AND ORGANISATION FOR TREOD.
      TREOD.....LEAST SQUARES REFINEMENTS OF THE BEST TRIAL CELLS.