The purpose of this program is to extract reflection angles 
from the CAD4 set4 output (from the logfile) to produce
a DirAx input file.

The program Q2C.EXE and the input files xxx.ST4 (the CAD4 
logfile) must be in the same directory.
The output file xxx.DRX for DirAx will be placed in that
directory.
xxx is a name you specify, without the .ST4 extension.
The program asks for the wavelength rLambda.

part of input file:
 2 NN -10.292   61.431   14.348 -180.0    452.5
 2 NH  10.289   61.391 -165.566    0.0    565.3
 2 T  10.287 Q   55.350    4.113   18.936    61.469 10.231   14.479
 3 NH  10.199   63.676 -177.217    0.0   2267.9
 3 NN -10.198   63.698    2.739 -180.0   2372.2
 3 PP  10.186   63.677    2.892    0.0   2280.1

The program looks for lines consisting of 10 items with the
symbol Q as the fourth item, all other lines are ignored.

item 3, here 10.287, is theta
items 8,9,10, here 61.469, 10.231 and 14.479 are the Euler
angles omE, phiE and chiE respectivily

The conversion from Euler angles to C-vectors is as
follows:

s = 2 * SIN(theta) / rLambda
c(1) = s * SIN(theta)    'c() in reflecting position
c(2) = s * COS(theta)
c(3) = 0
RotateVec c(), Zax(), omE, c()   'carry out...
RotateVec c(), Xax(), chiE, c()  '...the reverse Euler...
RotateVec c(), Zax(), phiE, c()  '...rotations

RotateVec c(), Zax(), omE, c() means: rotate vector c()
about the Z axis over an angle omE, result in c(), etc.

You use the program Q2C.EXE at your own risk.
It may, but problably does not, give wrong results.
Suggestions for improvement and error reports are
welcome at a.j.m.duisenberg@chem.uu.nl

