Dirax Commands

You may also visit the explanation of internal commands: aliases, flowcontrol etc. Alphabetical
acl
angletest
anglezero
author
autonowarning
autowarning
axistest
axiszero
cad4file
ccd
ccdsig
cd
cell
compare
compareangle
compareaxis
comparefactor
conditions
correct
correlate
correlateratio
debug
default
denzofile
dmax
example
exit
fastfile
finalcell
go
go2
help
hklc
indexfit
kill
killh
killn
l.s.
lch
lchh
lchi
lchmin
lchn
levelfit
list
lo
loe
loh
lon
longacl
margin
maxcell
maxtrio
output
qvector
qvorder
qvtest
randomize
read
readappend
reference
reind
remove
restore
ri
rifile
save
seed
setdefault
sethklm
shortacl
show
sigma
streak
streakfile
unsethklm
version
voltest
wmat
write
MACROS
ccdtwin
store
twin

By Function
Input files
example read readappend ri rifile
Select Reflections
kill killh killn lch lchh lchi lchmin lchn
Calculations
dmax indexfit go go2 levelfit maxcell maxtrio seed sigma streak
Solutions
acl angletest anglezero autowarning autonowarning axistest axiszero voltest
Screen Output
cell hklc list lo loe loh lon longacl margin shortacl
Output files
cad4file ccd ccdsig denzofile fastfile streakfile wmat write
Comparing Solutions
compare compareangle compareaxis comparefactor correlate correlateratio twin
Saving solutions
remove restore save store
Incommensurate
qvector qvorder qvtest sethklm unsethklm
Expert user
debug finalcell l.s. reind
Miscellaneous
author cd conditions correct default exit help output reference setdefault show version

GETTING STARTED For a minimal run:
  ! comment, do not type
dirax [file_name] ! file_name is either given here OR after READ
read [file_name] ! read data from specified free file
go ! do calculations with default parameters
cell ! show cell parameters
lo ! show reflections
end ! exit dirax
See also the examples.

acl

Select Acceptance Level
Syntax: Note acl auto may be not the solution you are looking for, see Example 5.
Solutions with a questionmark contain a warning (see margin).
Related commands: angletest, axistest, voltest,

angletest

Syntax: angletest r
Default: angletest -1.0
If set to a positive value, the list of solutions given by the acl command is restricted to cell parameters with at least 2 angles close to 90°. The tolerance is given by r. To disable the test, specify a negative value.

anglezero

Syntax: anglezero r
Default: anglezero 0.1
Tolerance for angles (in degrees) to present cell as triclinic, or as monoclinic, orthorhombic, tetragonal, cubic or hexagonal. Is used in combination with axiszero.

author

Show names and adresses of authors.

autowarning

Some solutions in the acl list contain a warning. These solutions have a question mark in the output (see margin). If autowarning is set, the warning is ignored in the selection of the best solution (so the solution that fits most reflections will be selected). See acl and autonowarning.

autonowarning

Some solutions in the acl list contain a warning. These solutions have a question mark in the output (see margin). If autonowarning is set, reflections with a warning are not selected in the automatic solution. See acl and autowarning.

axistest

Syntax: axistest r
Default: axistest -1.0
If set to a positive value, the list of solutions given by the acl command is restricted to cell parameters with all the axes at least r Å. To disable the test, specify a negative value.

axiszero

Syntax: axiszero r
Deafault: axiszero 0.05
Tolerance for axes (in Å) to present cell as triclinic, or as monoclinic, orthorhombic, tetragonal, cubic or hexagonal. Is used in combination with anglezero.

cad4file

Create dirax_Xcode.cat file to transfer dirax results to CAD4 later.
dirax_Xcode.cat is created in the current (possibly not intended!) directory (but see cd). In the file name dirax_Xcode.cat the 'crystal code' Xcode is the same as in the input file Xcode.drx used by dirax.

ccd

Syntax: ccd name
Create name.rmat file to save dirax results.
The default for name is the same as the drx file used for input. If sigma has been called for the current lattice, the standard deviations are also written to the file. If you specify # in name, # will be translated into the current drx filename.

ccdsig

Syntax: ccdsig name
Create name.rmat file to save dirax results.
The default for name is the same as the drx file used for input. Also creates a file name.sigma containing the sigma's of the cell parameters.

ccdtwin

A series of commands (defined in dirax.init). The commands are:

cd

Specifies cad4 number. Syntax: cdn
Default: cd?
The cad4file writes a resulting file in the current directory. If you have specified n, the file will be written in the directory can$data:.

cell

Show cell parameters.
Primitive Bravais cell within tolerances given by anglezero and axiszero

compare

If the cell volumes are equal but the cells are not congruent, or if the larger cell volume is a multiple of the smaller, they are made congruent by a linear transformation.

Syntax: compare N1/C1 N2/C2
N1,N2: acl number or * for latest selected acl
C1,C2: character indicating previous saved solution
Examples
See also save, compareangle and compareaxis. The output is rather self-explanatory:
If necessary A and B are swapped and made congruent first, by transforming the cell B to B'. The transformation is expressed by relations between (a',b',c') and (a,b,c).
The rotation axis connecting A and B' is given as components in XYZ, as HKL (reciprocal space, a*b*c*) and as uvw (direct space, abc), the rotation angle in degrees. The correlation between the index status of the compared cells is also calculated.

Sometimes more solutions are found (particularly from symmetry within the cell), all geometrically possible, and the crystallographer must interpret them and decide. Rotation angles of (almost) 180° may indicate twinning with a common axis, small rotations may originate from two fragments, but from twinning too, and to complicate things: both values may be obtained from the same data. The solution with the smallest rotation is the most interesting, in general.

compareangle

Syntax: compareangle f
Default: compareangle 1.0
Two angles are considered equal if their difference is less than f (in degrees). See compare.

compareaxis

Syntax: compareaxis f
Default: compareaxis 0.5
Two axes are considered equal if their difference is less than f (in Å). See compare.

comparefactor

Syntax: comparefactor f
Default: comparefactor 100
Only compare two matrices if Vol(a)/Vol(b) is less than f. See compare.

conditions

Conditions for use

correlate

Correlates the index status of two possible unit cells. A correlation of 1.0 signals two similar sets, a correlation of -1.0 points to complementary (possible twin) sets. The correlation is only calculated if the ratio of the volumes lies between 1.0/correlateratio and correlateratio. The syntax is similar to the compare command.

Syntax: correlate N1/C1/all/save N2/C2/all/save
N1,N2: acl number or * for latest selected acl
C1,C2: character indicating previous saved solution
Examples

See also save.

correlateratio

Syntax: correlateratio f
Default: correlateratio 10.0
This limits the calculation of correlations between two unit cells.

debug

Syntax: debug reduce/primitive/finalcell/twoview/qv/all/none
Default: debug none
To inspect intermediate results, you may increase the amount of output.

default

Set default values for levelfit, indexfit, dmax, anglezero, axiszero, compareaxis, compareangle, comparefactor and correlateratio.
Use setdefault to save the current values as default values.

denzofile

Create dirax_Xcode.dat file to transfer dirax results to DENZO later. The file is created in the current directory. In the file name dirax_Xcode.dat the 'crystal code' Xcode is the same as in the input file Xcode.drx used by dirax.

dmax

Syntax: dmax r
Default: dmax 80
r should be set to about the expected maximum axis length (in Å). See Remark Page for details.

exit

Exit dirax

example

Syntax: example n
Load one of the 12 examples. Have a look at the example page for a summary and full output of the examples.

fastfile

Create dirax_Xcode.dat file to transfer dirax results to FAST later. dirax_Xcode.cat is created in the current Directory. In the file name dirax_Xcode.cat the 'crystal code' Xcode is the same as in the input file Xcode.drx used by dirax.
Activate MADNESS ENDEX level
ENDEX> use LCH to select reflections. Only 'H' reflections will be used
ENDEX> DIRAXF       ! create endex.drx
ENDEX> $DIRAX       ! start dirax
 
Dirax> read endex   ! read data
 
   do what you think you have to do
 
Dirax> exit         ! go back to ENDEX
 
ENDEX> @DIRAX_ENDEX ! get dirax results

finalcell

Syntax: finalcell
This is an expert command. Normally there is no use for this command. But in special cases it can be helpful (in combination with ri, rifile, l.s. and reind).

go

go2

If the IndexStatus before and after te previous go command did change go2 is similar to go. If IndexStatus remained the same, go2 is idle.

help

Try to display some help about the program. How this is done is explained elsewhere.

hklc

Displays the list of reflections (miller indices h,k,l and the c-vectors)

indexfit

Syntax: indexfit r
Default: indexfit 2.0
indexfit is a factor applied to levelfit for establishing whether a reflection fits (code 'H') or not (code 'n'). A reflection fits if the distance (in reciprocal space) between the observed and calculated reflection position is less than indexfit*levelfit reciprocal Å. See Remark Page for details

kill

Syntax: kill n
Removes one reflection from the list. The reflection is really removed (in contrast to lch where a reflection with index status 'N' may join a lattice later). See killh, killn, lch, lchi and lchn.

killh

Syntax: killh
Removes all reflection with index status H from the list. The reflections are really removed (in contrast to lchi where a reflection with index status 'N' may join a lattice later). See kill, killn, lch, lchi and lchn.

killn

Syntax: killn
Removes all reflection with index status N from the list. The reflections are really removed (in contrast to lch where a reflection with index status 'N' may join a lattice later). See kill, killh, lch, lchi and lchn.

l.s.

Syntax: l.s.
This is an expert command. Normally there is no use for this command. But in special cases it can be helpful (in combination with ri, rifile, finalcell and reind).

lch

Syntax: Can be used to change IndexStatus before a next go. See also lchh, lchn, lchmin and lchi. The remove a reflection from the list use kill, killh or killn.
Example
Dirax> lch
Nfit:10       123456789 123456789 12345
Nonfit:7      HnHHHHnnnHnHHHHHHnnHHHHHH
invert/status ------------nnn----------  >>>entered by you<<<
Nfit:7        123456789 123456789 12345
Nonfit:10     HnHHHHnnnHnHnnnHHnnHHHHHH
To enable a reflection use code H. To disable a reflection use code N. Use any other character to keep the current status

lchh

Set IndexStatus for all reflections to H.

lchi

Inverts the current indexstatus. (Equivalent to lch invert).

lchmin

Syntax: lchmin CHLIST
CHLIST is a string of saved matrices. In the current indexstatus, set H to N for those reflections which have status H in CHLIST. Use this command to disable reflections fitting in more lattices. The remove a reflection from the list use kill, killh or killn.

lchn

Set IndexStatus for all reflections to N. The remove a reflection from the list use kill, killh or killn.

levelfit

Syntax: levelfit n
Default: levelfit 1000
The parameter levelfit is set to 1/n Default n = 1000, so default levelfit = 1/1000 reciprocal Å. It should indicate more or less the experimental precision, but it is not very critical and 1/1000 is adequate for most cases. See Remark Page for details

list

Syntax: list
Show input reflection list. If no list was read no output appears. See also: read

lo

Display index status and indices for all reflections, fitting or not.

loe

Display the error ranges for the fitting and non fitting reflections. The line of output is also printed at the end of a acl listing.

loh

Display indices for fitting (code 'H') reflections only. See also: indexfit

lon

Display indices for not fitting (code 'n') reflections only. See also: indexfit

longacl

Show indexstatus for all acl solutions. Use shortacl to disable indexstatus display.

MACROS

See file dirax.init for examples of macros. Macro commands are ccdtwin, store and twin.
You may also visit the explanation of internal commands: aliases, flowcontrol etc.

margin

Syntax: margin n
Default: margin 1
The program will give WARNINGS if a solution has suspect indices (e.g. all h-indices equal to zero or one).
The program will also issue WARNINGS if e.g. only one reflection has an even index. By changing the value of n you can control these WARNINGS. In the acl solutionlist, solutions with a warning will be presented with a questionmark.

maxcell

Syntax: maxcell n
Default: maxcell 20000
Sets the maximum number of calculations to determine the sigma's of the unit cell. See sigma, ccd and ccdsigma,

maxtrio

Syntax: maxtrio n
Default: maxtrio 2600
The maximum number of triplets used in the cell determination calculation. Every triplet is build from 3 (non-linear) reflections from the input file. If you have a large number of reflections, you may increase the value of maxtrio at the cost of some computing time. If the number of actual triplets exceeds n, a random generator is used the fill the list of triplets. You may set the seed of the random generator with seed or use randomize to calculate a seed The maximum value of n is 100000.

output

Syntax: output filename/screen
Default: output screen
Redirects the (screen) output of the program to filename.

qvector

Syntax: qvector f1 f2 f3
Inputs a q-vector. See also qvtest, qvorder, sethklm and unsethklm.

qvorder

Syntax: qvorder n
Default: qvorder 1
Sets the maximum order of q-vectors. See also qvector, qvtest, sethklm and unsethklm.

qvtest

Syntax: qvtest
Tries to find one of more q-vectors if you think the nonfitting reflections could be part of a incommensurate lattice. See also qvector, qvorder, sethklm and unsethklm.

randomize

Syntax: randomize
If the number of actual triplets exceeds maxtrio, a random generator is used to fill the list of triplets. Also if the number of reflections in an input file exceeds 1000, a random generator is used to read up to 1000 reflections. With the randomize command, you can calculate a seed for the random generator. You can also set the seed with the seed command if you want to reproduce previous runs.

read

Syntax: read Xcode
If no extension is given Xcode.drx is supposed. Read an ASCII file (mostly Xcode.drx).
Format:
wavelength (Å)
5 to 1000 lines with: Theta PhiB ChiB Netint
Note >>>Bisecting<<< angles
or
wavelength (Å)
5 to 1000 lines with: c1 c2 c3 Netint
Note >>>c-vectors<<<

All input in FORTRAN free format (see example in Dirax Page). Netint (for Net Intensity) is just for the record (see list and lo) and it is not used as such, you may fill in any number or 0. Use readappend to add reflections to an existing list. If the number of reflections exceeds 1000, a random generator will be used to read the 1000 reflections. You may set the seed of the random generator with seed or use randomize to calculate a seed.

readappend

Syntax: readappend n filename
Read n reflections from filename and add them to the reflection list. If the total number of reflections exceeds 1000, a random generator will be used to read up to 1000 reflections. You may set the seed of the random generator with seed or use randomize to calculate a seed.

reference

Reference: DirAx is described in: "Indexing in Single-Crystal Diffractometry with an Obstinate List of Reflections", by Albert J.M. Duisenberg, J.Appl.Cryst. (1992). 25, 92-96 (IUCR journal webpage).
NOTE: As a consequence of minor improvements and modifications in the program and machine dissimilarities you may get slightly different results than published here or in the paper.

reind

Syntax: reind
This is an expert command. Normally there is no use for this command. But in special cases it can be helpful (in combination with ri, rifile, finalcell and l.s.).

remove

remove a previous saved matrix
See also save and restore

restore

restore a previous saved matrix
Syntax: restore CH
See also save, compare and correlate.

ri

This is an expert command. The 9 components of the orientation matrix can be input here. You have to use the commands reind, l.s. and/or finalcell to apply the matrix on the reflection list.

rifile

This is an expert command. Read the orientation matrix from an existing .rmat file. You have to use the commands reind, l.s. and/or finalcell to apply the matrix on the reflection list.

save

save one or all matrices for later use in the same dirax session Use remove to clear the list. See also restore, compare and correlate.

seed

Syntax: seed n
n should be a large odd number. If the number of actual triplets exceeds maxtrio, a random generator is used to fill the list of triplets. Also if the number of reflections in an input file exceeds 1000, a random generator is used to read up to 1000 reflections. With the seed command, you can set the seed for the random generator. This can be useful if you want to reproduce previous runs. You can also use randomize to calculate a seed.

setdefault

Save the current values of levelfit, indexfit, dmax, anglezero, axiszero, compareaxis, compareangle, comparefactor and correlateratio.
Use default to restore these values.

sethklm

Syntax: sethklm
Once the q-vector is set (via qvector or qvtest) this command will calculate the the m index for non fitting reflections (upto the maximum order defined by qvorder Use unsethklm to undefine these m-indices.

show

Show actual parameter values.

shortacl

Disable the display of indexstatus for acl solutions. Use longacl to show the index status.

sigma

Calculate standard deviations for the current lattice. Change the value of maxcell to limit the amount of calculation.

store

Equivalent to save *
This macro stores the current matrix.

streak

Check all non-fitting reflections for a common factor. Example:
   h,k,l = 1.13  3.40  -4.50
  The common factor is 1.129
                 calculated  Observed
   1 * 1.129 =      1.129      1.13
   3 * 1.129 =      3.387      3.40
  -4 * 1.129 =     -4.516     -4.50
So this reflection could be a streak of 1 3 -4. The common factor for all non-fitting reflections is displayed.

streakfile

Create a CAD4 readable instructionsfile (dirax_code_streak.cat) to change those non-fitting reflections where the common factor results in a fitting reflection. Those reflections need recentering.

twin

A series of commands (defined in dirax.init). The commands are:

unsethklm

Syntax: unsethklm
Removes q-vector indices from the reflection list after they are set by sethklm.

version

show version number and date of dirax program

voltest

Syntax: voltest f1 f2
Default: voltest 3.6 99999999.9
Limit the number of acl solutions. All resulting volumes should lie within the range of f1 and f2. (actually all calculations are still performed, but the output will be filtered).

wmat

Syntax: wmat filename
Creates a file with the current r-matrix only. If filename is omitted it is set to dirax.mat in the current directory. You may include a path in filename.

write

Syntax: write filename
Creates a file with final results, for print out. If filename is omitted it is set to dirax.out in the current directory. You may include a path in filename.
Go to DirAx Main Page
Go to DirAx Examples
Go to DirAx Course