Dirax Commands

You may also visit the explanation of internal commands: aliases, flowcontrol etc.

Alphabetical

abort
acl
angletest
anglezero
author
autonowarning
autowarning
axistest
axiszero
cad4file
ccd
ccdsig
ccdtwin
cd
cell
compare
compareangle
compareaxis
comparefactor
compareminfit
comparesmallest
conditions
correct
correlate
correlateratio
debug
default
denzofile
dict
dictname
dmax
example
exit
extra
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
nhtest
nosigma
output
pymol
qvallow
qvector
qvectorpos
qvfommin
qvforbid
qvorder
qvtest
randomize
read
readappend
readp4p
reference
reind
remove
restore
ri
rifile
rmatrix
save
savelist
seed
setdefault
sethklm
shortacl
show
sigma
sort
store
streak
streakfile
twin
unsethklm
version
voltest
wmat
write
writep4p
MACROS
ccdtwin
store
twin

By Function

Input files
example read readappend readp4p ri rifile
Select Reflections
kill killh killn lch lchh lchi lchmin lchn
Calculations
dmax indexfit go go2 levelfit maxcell maxtrio nosigma
randomize
seed sigma streak
Solutions
acl angletest anglezero autowarning autonowarning axistest axiszero extra nhtest sort voltest
Screen Output
cell hklc list lo loe loh lon longacl margin output shortacl show
Output files
cad4file ccd ccdsig denzofile fastfile pymol output rmatrix streakfile wmat write writep4p
Comparing Solutions
compare compareangle compareaxis comparefactor compareminfit correlate correlateratio twin
Saving solutions
remove restore save savelist store
Incommensurate
qvallow qvector qvectorpos qvfommin qvforbid qvorder qvtest sethklm unsethklm
Expert user
debug dict dictname 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.

abort

Syntax: abort state
Default: abort off.
If set to on, the program will abort when a warning message is given.
If set to off, warnings will be displayed and the program continues.

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).
Solutions with a Q have possible qvectors.

If dict is on, some keyword/value pairs will be printed.
!!dirax-nrefl 25
!!dirax-acl 25
!!dirax-nh 25

Related commands: angletest, axistest, extra, nhtest, sort, 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 addresses of authors.

autowarning

Some solutions in the acl list contain a warning. These solutions have a question mark in the output (see margin). If qvallow is set, the acl list may also contain reflections with a possible qvector. These solutions are flagged with a Q if qvfom > qvfommin. If autowarning is set, the warning and Q-flag are 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 qvallow is set, the acl list may also contain reflections with a possible qvector. These solutions are flagged with a Q if qvfom > qvfommin. If autonowarning is set, reflections with a warning and reflections with a possible qvector (see qvallow) are not selected in the automatic solution. See acl and autowarning.

axistest

Syntax: axistest f1 f2
Default: axistest -1.0 -1.0
If f1 is 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 f1 Å
If f2 is set to a positive value, the list of solutions given by the acl command is restricted to cell parameters with all the axes at most f2 Å
To disable the test, specify two negative values.

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
Creates the rmatfile name.rmat to save dirax results.
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.
savermat is an alias for ccd

ccdsig

Syntax: ccdsig name
Creates the rmatfile name.rmat 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 sequence 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

Syntax: compare N1/C1 N2/C2
Syntax: compare all
Syntax: compare table
Syntax: compare save
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.
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.

compareminfit

Syntax: compareminfit n
Default: compareminfit 10
Sets the minimum number of 'fitting' reflections for the variants of compare working on the list of solutions

comparesmallest

Syntax: comparesmallest state
Default: comparesmallest off
Determines which solution to select when comparing two lattices.

conditions

Conditions for use

correct

Syntax: correct none/normal/full/debug
Default: correct normal
Allows command and option corrections. Commands and options are only corrected if input originates from the keyboard, and output is sent to the screen.

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.
default is implicitly executed by then example command.

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.

dict

Syntax: dict state
Default: dict off
If on, the output of acl will contain a list of keyword/value pairs. The keywords start with dictname.

dictname

Syntax: dictname label
Default: dictname !!dirax-
Sets the leading part of keywords of dictionary output (if dict=on).

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. The example command implicitly executes default to reset all variables to their default values.

extra

Syntax: extra on/off
Default: extra off
If set to on, the listing created by the acl command will contain extra columns

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 ccdsig,

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.

nhtest

Syntax: nhtest f
Default: nhtest -1
Limit the number of acl solutions. The number of fitting reflections should be larger than f*Nrefl (actually all calculations are still performed, but the output will be filtered). To disable the test, specify a negative value.

nosigma

Disable calculation of standard deviations before creating output files with the commands ccd and writep4p. Use sigma to enable the calculation.

output

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

pymol

Syntax: pymol name
Create name.pdb (containing the cvectors) and name.pml. The default for name is the same as the drx file used for input.

qvallow

Allow calculation of possible qvectors. Solutions with a possible qvector are flagged with a Q in the acl-list if their fom (see qvtest) exceeds qvfommin.
Use qvforbid to disable the calculation of possible qvectors.

qvector

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

qvectorpos

Syntax: qvectorpos
Invert the components of the qvector if they are all three negative

qvfommin

Syntax: qvfommin f
Default: qvfommin 0.5
Only active if qvallow is on. Sets a minimum threshold on qvfom (see qvtest). If qvfom > qvfommin, the solution will be flagged with a Q in the acl-list.

qvforbid

Disable the calculation of possible qvectors. Use qvallow to enable calculation of possible qvectors. Solutions with a possible qvector are flagged with a Q in the acl-list.

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. The program will print a list of possible qvectors with the number of reflections that change from nonfit to fit. The printed fom is this number of reflections divided by the total number of nonfitting reflections.
See also qvector, qvfommin, 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.

readp4p

Syntax: readp4p Xcode
If no extension is given Xcode.p4p is supposed. Read a p4p file. The wavelength is extracted from the SOURCE record. Reflections are extracted from records starting with REF. 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.

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, savelist and restore

restore

restore a previous saved matrix
Syntax: restore CH
See also save, savelist, 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 rmatfile. You have to use the commands reind, l.s. and/or finalcell to apply the matrix on the reflection list.

rmatrix

Syntax: rmatrix name
Runs the program rmatrix and creates the rmatfile name.rmat to save dirax results.
The default for name is the same as the drx file used for input.

save

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

savelist

Prints all saved solutions. See also restore, save, compare and correlate.

savermat

Syntax: savermat name
Creates the rmatfile name.rmat 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.
savermat is an alias for ccd

savestore

Syntax: savestore prefix
Create rmatfiles for all stored solutions. The filenames are prefix plus the letter of the store.

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.

shortacl

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

show

Show actual parameter values.

sigma

Calculate standard deviations for the current lattice. Change the value of maxcell to limit the amount of calculation.
The standard deviations are also calculated if output files are created with the ccd and writep4p commands, unless nosigma has been set.

sort

Syntax: sort a/b/c/alpha/beta/gamma/vol/nh/volperh/vwh/wh/nq/tot/none
Default: sort none
Sorts the solution list by the selected variable. Use acl to redisplay the new sorted list.
volperh, vwh, wh, nq, tot will set extra on.

store

Syntax: store CH
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 sequence 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.

writep4p

Syntax: writep4p name
Create namec.p4p to save dirax results.
The file name.p4p must exist. It will be copied to namec.p4p with new CELL, CELLSD, ORT1, ORT2 and ORT3 records. If sigma has been called for the current lattice, the calculated standard deviations are written to the file. If you specify # in name, # will be translated into the current p4p filename.
DirAx
DirAx examples
EVPY Suite Overview