                  DirAx Input - Bisecting Angles or C-Vectors
                  --------------------------------------------

     NOTE: if you prefer C-vector input (see below) you may define your own
     Cartesian XYZ-system to express the C-vectors in, the DirAx results will
     be expressed in  -t-h-a-t-  system. The axes- and orientation matrix is
     applicable to a CAD4 if you did choose the CAD4 XYZ-system (on purpose or
     by accident).
     If you would like to obtain a routine to calculate C-vectors for a special
     apparatus (e.g. from an image-plate) please contact us, we will almost
     certainly fulfil your wishes.

     The bisecting angles theta,phiB,chiB, OR the components Cx,Cy,Cz of the
     C-vector (reflection vector, S(hkl)) can be supplied for input. The
     C-vector option is incorporated for generality: C-vectors can be
     calculated from any 'monochromatic' single-crystal diffraction experiment.
     For a CAD4 (and for DirAx) the relations between the C-vector and the
     bisecting angles are given by:

                2 * sin(theta)/lambda = sqrt(Cx^2 + Cy^2 + Cz^2)
                       sin(phiB) = -Cx/sqrt(Cx^2 + Cy^2)
                       cos(phiB) = +Cy/sqrt(Cx^2 + Cy^2)
                      sin(chiB) = Cz/sqrt(Cx^2+Cy^2+Cz^2),

     with Cartesian laboratory XYZ co-ordinates defined as: X to X-ray source,
     Z to Zenith and Y completing the right-handed sYstem. It follows that +Y =
     (phiB=0), +X = (phiB=-90), +Z = (chiB=90). (At chiB = 90 phiB is
     undetermined, any value may be put in.) Theta is positive at the +Y side
     of the ZX-plane. Finally: -180 < PhiB <= 180, -90 < chiB <= 90.

     The reverse relations are:

                        Cx = -S * cos(chiB) * sin(phiB)
                        Cy = +S * cos(chiB) * cos(phiB)
                            and Cz = S * sin(chiB),
                       with S = C = 2 * sin(theta)/lambda

     As stated above you may define your own Cartesian XYZ-system for the
     C-vectors, the results are given in that system.

     The program recognizes C-vectors input from the fact that for an observed
     reflection theta < 90 and thus:

                    C = sqrt(Cx^2 + Cy^2 + Cz^2) < 2/lambda,

     so confusion with bisecting angles is hardly possible. The complete list
     must represent either bisecting angles or C-vector components, mixed mode
     is not allowed. If C-vector input is detected an attention message is
     shown. (If a complete list of small bisecting angles could be confused
     with a list of C-vector components you have to convert the angles to
     C-vectors.)
     The calculated or supplied bisecting angles from the data are compared
     with those for the lattice found.

     Input example (bisecting angles):

     0.7093 ! Mo radiation - see Comment Option

    10.42      26.50      11.06      984.0
    10.42      29.89      10.38      833.0
    .....      .....      .....      .....
    .....      .....      .....      .....
     9.96     -23.61      10.13     2991.5

     After the first number (the wavelength, between 0.1 and 5.0 Angstrom) at
     least 4 (but with a CAD4 usually 25) valid "reflection lines" must be
     given, consisting of the three Bisecting angles (in degrees) OR the three
     components of the C-vector (reciprocal Angstrom), optionally followed by
     more numbers:

     theta  phiB  chiB  [....]

     OR:

     Cx    Cy    Cz  [....]

     NOTE the sequence phiB chiB !!!
     NOTE: the complete list as bisecting angles OR as C-vectors, no mixed
     mode.
     (From a CAD4 theta,phiB and chiB for reflection nr x (x = 1..25) are
     obtained by the commands 'LG x' and '.B').


                        Rules for Input - Comment Option
                       ----------------------------------

     - All DirAx input files must have the extension .DRX and reside in a (sub)
     directory made known to the program via DIRAX CHANGE DEFAULTS
     - A number must start with a sign or a digit and must be terminated by a
     delimiter: space, comma, tab or by the end of the line. Within a number
     only digits may occur and at most one decimal point (not comma) followed
     by a sensible number of decimals.
     - The reflection lines are read as: theta, phiB, chiB (or as Cx, Cy, Cz,
     as discussed above). If a fourth number is included it is printed as the
     "intensity", but it may actually stand for anything: it is just for the
     record and not used as such. If it is omitted the program prints 0. More
     numbers on the same reflection line are ignored completely.
     - COMMENT OPTION: A line starting with an exclamation mark ('!') is a
     comment line. It is displayed on the screen and ignored. An embedded !
     divides a line into a data part (before the first !) and a comment part
     (the rest of the line). The complete line is displayed and the data part
     is read as data.
     This option is very suitable for comment, of course, but also for
     "switching off" reflections without need to delete them from the .DRX
     file.
     - Up to 50 reflections are read, the rest is ignored.
     - Empty lines, and lines totally consisting of spaces are ignored.
     - Unintelligible lines or lines with Abs(theta) > 90, Abs(phiB) > 180 or
     Abs(chiB) > 90 are echoed preceded by a ? or > sign respectively, with the
     offending numbers highlighted. The line is rejected.


     For a guaranteed and quick response:
     e-mail: DUISENBERG@CHEM.RUU.NL

     15 November 1992 [minor corrections 3 May 1996] (AJMD)
     ------------------------------------------------------------
     (*) Read (C), (TM) and (R).
