

| NONIUS
CAD4/MACH3
User manual |
![]() |
![]() |
CAD4/MACH3 Linux software & Argus |
The CAD4-UNIX version was developed to run a CAD4 or MACH3 on a UNIX platform. Originally Nonius B.V. supported a VAX/VMS version (CAD4 express, CAD4 version 5.1) and a PC MSDOS version based on the CAD4 version 5.0 software. For the Unix version parts of both versions were used. The parts of the automatic measuring procedure, strategy and display are based on the VAX/VMS program system ARGUS developed at the University Utrecht.
At the moment the Unix version of the CAD4/MACH3 software is supported to run on PC's under Linux and on Silicon Graphics workstations.
LINUX (Intel based processors)
First a top directory has to be created, in which the .tar file should
be extracted, e.g. /home/cad4.
Mount the floppy by:
mount -t msdos /dev/fd0 /mnt
Copy the two files, instal.lin and c4_lin.tgz to the top directory:
cp /mnt/* /home/cad4
Go to the home directory and run the script instal.lin:
cd /home/cad4
./instal.lin
The gzip compressed .tar.gz file is now uncompressed and the .tar file
will
be extracted, so that the subdirectories and files will be created.
IRIX (Silicon Graphics computers)
First a top directory has to be created, e.g. /usr/people/cad4, in which the .tar file should be extracted. Then use the tar program to extract the two files, instal.sgi and c4_sgi.tar.Z from the tape into the top directory.
Go to the home directory and do instal.sgi:
cd /usr/people/cad4
./instal.sgi
The compressed .tar file is now uncompressed and the .tar file will be extracted, so that the subdirectories and files will be created.
The work_directory is the system subdirectory. In this directory the links are also made during the extraction of the .tar file. Optionally the file make_links in the top directory can be used.
In the work_directory are all programs used by the CAD4 system and the handlers (.tsk) files for the interfaces (Falcon, Falcon+ and LSI).
Data will come in subdirectories of the root, for example in data0/
for your first CAD4, in data1/ for your second CAD4. The other
data directories (until data7) will not change or can be used
for simulation (see also the file start.doc). In the work_directory
these data directories are linked to ca0_data,
ca1_data
etc.
Other directories of the root are jobs/ (linked in the work directory to cad4_jobs), used by the CAD4 command 'NEWCMP' to create the .cat files for the automatic procedure (see also start.doc) and global/ (linked to cad4_global in the work_directory), which contains files with general CAD4 values and parameters important for the automatic procedure.
Values and parameters important for a specific CAD4 are in files of the data subdirectories config/ (linked in the work_directory to ca0_config, ca1_config etc.).
Some files in ca"n"_config should be mentioned here:
| rs232_port.xxxx | If xxxx = "simula" (in the distribution version for "n" = 1 to 7) the simulation version of the program will run. Otherwise the program assumes that xxxx is the device name of the serial(RS232) line. For instance cua1 for linux, ttyd2 for sgi. |
| lambda.xx | In the distribution xx is mo (Molybdenum radiation). For copper radiation rename this file to lambda.cu. This is important for the automatic measurement procedure (see also auto.doc). |
| temperature.xxx | In the distribution version xxx is lnt, which means that low (liquid
nitrogen) temperature is assumed. In that case during the automatic procedure data collection is not always done at psi = 0. If you rename the file so that xxx is something else (max. 3 characters) room temperature is assumed and reflections are normally measured at psi = 0 in bisecting mode. |
| kv.xxx | In the distribution version xxx is 60, which means that for the generator 60 kV is assumed. This will come in text of the data-collection file, also if using the automatic procedure. If you use for instance 40 kV, rename this file to kv.40. |
| ma.xxx | In the distribution version xxx is 50, which means that for the generator 50 mA is assumed. This will come in the text of the data-collection file, also if using the automatic procedure. If you use for instance 40mA, rename this file to ma.40. |
| filter.xxx | In the distribution version xxx is mon, which means that a monochromator is assumed. This will come in the text of the data-collection file, also if using the automatic procedure. You can rename filter.mon so that xxx is something else. |
Files necessary for the X-window version of the argus program are in the data subdirectories master/ (linked in the work_directory to ca0_master, ca1_master etc.). For a good working program system it is important that the files and links in all directories mentioned above are not changed, deleted or renamed (except for the files mentioned).
Starting and Finishing the CAD4 program.
Starting the programs
All programs are started from the work_directory cad4_system. To start the CAD4 program type:
"cad4" or "cad4 n"
in which "n" is the cad4 number. If "n" is not given the program will ask for the cad4 number.
The input and output of the cad4 process is piped to another process (canoper) and you can switch to another terminal channel by giving "quit", while the program is running. The connection later is done again by "cad4 n". It is also possible to run the cad4 program directly so that the cad4 process is all the time connected to your terminal channel. In that case it is not possible to give input to and observe output from the cad4 process on another terminal then you started the program. To start the direct version type:
"cad4_direct" or "cad4_direct n".
To display relevant information from the cad4 process the argus process can be started. This should be done in an X-window environment. So, in case you use linux, startx has been done before. If this is done another process (master) is started and will all the time update relevant information coming from the cad4 logfile. This information will be in constantly updated files in the ca"n"_master directory and will be displayed by the xargus program. One can also start this by typing: "argus" or "argus n".
Finishing the programs
The cad4 (and cad4_direct) process can be stopped by typing the command EXITXX. The cad4_run and canoper process will be finished then. The argus process can be stopped by the Quit button in the main menu of xargus. The master and xargus process will be finished then. All running processes can also be stopped by "abort_cad4 n" in case of emergency (see also Using the CAD4, Abortion).
After the startup of the program you can use the CAD4 as described in the Nonius CAD4 manual. The only difference is the way to abort a CAD4 movement and to give a value to the switch register, which mainly determines the way output will be given during the different procedures.
An overview of the standard CAD4 commands with a short description and with references to the CAD4 manual and some new commands, not described in the Nonius CAD4 manual, are listed at the end of this section. CAD4 commands can be entered lowercase or uppercase. In the documentation CAD4 commands are listed uppercase.
Aborting CAD4 actions
If you want to abort a CAD4 movement directly use Ctrl-\ (so type simultaneously on Control and Backslash) and <CR>. The computer will send a message to the interface to stop and will set the first bit of the switch register and a dialogue ,to continue or not, is started.
To abort the CAD4 process in the regular way enter the command EXITXX.
If, by some reason no command can be given, all CAD4 processes can still
be finished by abort_cad4 "n". In fact one should always do this if the
cad4 process is not finished by EXITXX to be sure that no (hidden) processes
are
runnning in the background and that configuration files are treated
in the right way.
Switch register
The value of the switch register can be read on the command line by the command SHOWSW. An other value can be entered by the command SETSW xxxx (see below). During a procedure (i.e. SEARCH and DATCOL) it is possible to change the switch register by Ctrl-c (so type simultaneously on Control and c) and <CR>. The program will prompt for:
CA"n" Enter switch option:
You can give an octal value of four digits. For the meaning of each bit see the switch register codes below.
List of new CAD4 commands:
| ! text | for comment in log file |
| ECHO file_name | to log a part of the output |
| NOECHO | to stop the (extra) logging |
| FILES | overview of used files |
| NEWCRY file_name | connection to new .cry file |
| NEWDAT file_name | connection to new .dat file |
| NEWHKL file_name | connection to new .hkl file |
| OLDCRY file_name | connection to old .cry file |
| OLDDAT file_name | connection to old .dat file |
| OLDHKL file_name | connection to old .hkl file |
| SHOWSW | reading and explanation switch register |
| SETSW xxxx | setting new switch register |
| RUN file_name | to run one of the stand_alone programs in the directory cad4_system |
| DISTRB xxxxxx | save all data of compound xxxxxx in a subdirectory of ca"n"_data. |
| NEWCMP xxxxxx | start with a new compound xxxxxx |
| GO | start the automatic procedure |
| TIME | give day and time |
| VERSION | give version |
| EXITXX | to leave the program instead of exit. |
Display of the CAD4 process by xargus
The display program xargus is started in an X-window environment by:
argus n, in which "n" is the cad4 number. To display the information of
the files in ca"n"_master. These files are created and updated during the
cad4 run by the master process.
The main window contains information of the compound (cell, index status,
logfile) and in case of the automatic measurement procedure the status
of the process (which job is busy).
There are subwindows, which give information about the number of measu-
rements (Counters), statistics during data collection (Theta), datcol input
parameters (Crystal), division in shells (Shells), intensity control reflections
(Icr), reflection rate (Rate) and the reflections in the .cry file (Refdump).
In
the last case the angles (theta, phi etc.) can be displayed in four
ways: bisecting, eulerian or kappa geometry or as c-vectors.
Automatic measurement procedure
The commands NEWCMP, GO and DISTRB are used in the automatic measurement procedure.
NEWCMP
With NEWCMP xxxxxx a new compound is started; xxxxxx is the code of
the new compound (6 characters). All files have names starting with this
code. The NEWCMP command generates a sequence of jobnnnn.cat files in the
ca"n"_data directory (nnnn is a sequence number). These job files are
files containing the CAD4 script necessary to conduct an automatic
measurement.
GO
After the mounting and centering the crystal the automatic procedure
can be started by typing GO. The job files will be executed sequentially.
The jobnnnn.cat file with the lowest sequence number will be executed first.
When completed each jobnnnn.cat file is deleted and the next jobnnnn.cat
file
is executed. Apart from standard CAD4 commands, the jobnnnn.cat files
also contain
commands "RUN image", in which image is a stand-alone program (see
below).
DISTRB
When GO has succesfully completed the data collection, the command DISTRB xxxxxx saves all the files related to compound xxxxxx in a subdirectory xxxxxx of ca"n"_data.
The command: RUN image
With RUN an image is started as a subprocess.
Optional parameters are passed through to the subprocess. The image
will create a file jobxxxx.cat in the ca"n"_data directory. With the command
&jobxxxx.cat (abbrev. &job* or simply &) that file is executed
and deleted.
Files related to the RUN command:
| 'image'.inp | input file for image, created by cad4 process and deleted after termination of the subprocess |
| 'image'.out | output file of image, displayed and deleted by cad4 process after subprocess termination |
| jobxxxx.cat | indirect command file created by subprocess |
| holy.data | ascii file containing constants for all programs. First this file is searched for in the directory ca"n"_config. If not found then cad4_global is tried. If not found at all an error is generated. |
The subprocess terminates with an status number.
1: status ok.
2: some error occurred.
The programs used during the automatic procedure are:
| 1) | show_cell | Show cell parameters |
| 2) | set_swoma | Increase SWOMA (which determines the scan angle, see Setang scan parameters) if necessary |
| 3) | set_psi | Set Psi for Liquid Nitrogen Temperature or ANIVEC |
| 4) | check_index | Continue if enough reflections have status H. |
| 5) | absents | Set absent conditions |
| 6) | check_absent | If absent a sphere like data-collection (see below) is started. The output can be examined. |
| 7) | seldom | Select a reflection and do some scans to get a good value for DOMA (which determines the the scan angle, see "Data collection control parameters") . Usually followed by the program a_seldom. |
| 8) | a_seldom | Read data prepared by seldom and set DOMA |
| 9) | selsap | Select a reflection and do some scans to get a good value for APTA (which determines the horizontal width of the variable aperture, see Data collection control parameters). Usually followed by the program a_selsap. |
| 10) | a_selsap | Read data prepared by selsap and set APTA. |
| 11) | omthplot | Select a strong reflection fo omega/theta scans |
| 12) | sphere | Do data-collection on three wafers with one reflection fixed. Used by selicr (see below) |
| 13) | nonequal | |
| 14) | selocr | Select 3 reflections from current refl. list; create new cryst file with these reflections and their Friedel pairs as orient control (OOORRR). |
| 15) | check_o | Check H status of orient reflection |
| 16) | selicr | Select 3 ICR reflections from sphere data. |
| 17) | check_h [string] | If H-status for all reflections which are flagged in the string are also H, a continuation job will be created. Otherwise an abortjob is created. Default string: HHHHHH |
| 18) | prelim | Do a DATCOL on an empty HKLfile. Scan information for ICR refl. and a starting value for the orientation matrix will be obtained. |
| 19) | hkl_limits | Set appropriate hkl limits. |
| 20) | shells_file | Do data-collection on one or more theta-shells in FILE mode. |
| 21) | psi_scan | Do a Psi scan on suitable reflections. |
Description of all steps during the automatic procedure for sample xxxxxx.
| 1) Search | |
| job0100.cat | Initializing before search. |
| job0200.cat | Search for reflections 1-8. |
| job0300.cat | Search for reflections 9-16. |
| job0400.cat | Search for reflections 17-25 and find orientation (INDEX). |
| job0500.cat | Show index flag of list reflections and store search results in xxxxxx_search.cry. |
| 2) Setang | |
| job0600.cat | RUN set_swoma to calculate the best SWOMA value. |
| job0700.cat | RUN set_psi to see if list reflections should be measured at other psi value. |
| job0800.cat | Set flags for SETANG by LCA. |
| job0900.cat | Optimize angles by SETANG (twice), INDEX again and RUN show_cell. |
| job1000.cat | Store Setang results in xxxxxx_setang.cry. |
| 3) Set4 | |
| job1100.cat | RUN set_swoma to calculate new SWOMA value. |
| job1200.cat | Do SET4, store results in xxxxxx_set4.cry and RUN set_swoma again. |
| 4) Index | |
| job1300.cat | INDEX, Least Squares and RUN show_cell. |
| 5) Check_index | |
| job1400.cat | RUN check_index to see if there are enough reflections with index status H. |
| 6) Trans | |
| job1500.cat | Switch to new file xxxxxx_trans.cry, do TRANS, calculate with TH number of reflections and calculate bisecting positions of axis reflections. Store this and other information in xxxxxx_trans.lis and RUN show_cell. |
| job1600.cat | RUN absents to set absent conditions. |
| 7) Chk_abs | |
| job1700.cat | RUN check_absents (if absents are present) to check the absents in a small data-collection. |
| 8) Seldom | |
| job1800.cat | RUN seldom to generate scans with different scan angles for a selected reflection. |
| job1900.cat | RUN a_seldom to analyze seldom results and setting optimal DOMA |
| 9) Selsap | |
| job2000.cat | RUN selsap to generate scans with different apertures for a selected reflection. |
| job2100.cat | RUN a_selsap to analyze selsap results and setting optimal APTA. |
| 10) Omthplot | |
| job2200.cat | RUN omthplot to generate omage/theta scans for a selected reflection. |
| 11) Sphere | |
| job2300.cat | Switch to new files xxxxxx_sphere.cry and xxxxxx_sphere.dat, RUN sphere and store the information from sphere in xxxxxx_sphere.lis. |
| job2400.cat | RUN nonequal |
| job2500.cat | Switch to old cry and dat file. |
| 12) Selocr | |
| job2600.cat | Switch to xxxxxx_trans.cry and RUN selocr. |
| 13) Selicr | |
| job2700.cat | Switch to xxxxxx_meas.cry (created in job2600 by selocr) and RUN selicr. |
| 14) Prelim | |
| job2800.cat | Switch to file xxxxxx_prelim.cry and RUN prelim. |
| job2900.cat | Switch to file xxxxxx_datcol.cry. |
| 15) HklLimits | |
| job3000.cat | RUN show_cell. |
| job3100.cat | RUN hkl_limits (auto). |
| 16) Shells_file | |
| job3200.cat | RUN shells_file |
| 17) Psi_scan | |
| job3300.cat | Switch to xxxxxx_psi.cry and RUN check_h. |
| job3400.cat | RUN psi_scan. |
Now the data collection on the unique part of the Ewald sphere is finished.
Next jobs are there to prevent the CAD4 from being idle. They serve to
conduct the collection on redundant data. So from here the measurement
can be interrupted at any time, without influencing the data completeness.
| 18) HklLimits2 | |
| job3500.cat | RUN show_cell. |
| job3600.cat | RUN hkl_limits (auto2) |
| 19) Shells2_file | |
| job3700.cat | RUN shells_file. |
| 20) Finish | |
| job9000.cat | Finish and go to view position. |
This work is based on the program system used at the Utrecht University and developed by Ab Duisenberg and Toine Schreurs. Further parts of the VAX/VMS version, developed by Nonius BV, Delft, were used as well as the MS-DOS version initaiated by Martin Kretchmar. For the communication with the CAD4-interface routines of John Skinner of Brookhaven National Laboratory were used.
The majority of this work was done by Conrad Kiers at the crystallography department of the Utrecht University. Anneke Sicherer Roetman and Toine Schreurs should be mentioned for their help and advice and especially Ton Spek, not only for the use of his CAD4 equipment, but also for his advice and interest.
We also thank Paul Boyle from North Carolina State University as one of the first users of this program. We are very grateful for his advice and the suggestions for improvements.