The following keywords are available
TITLE ROCK BEAM MOSAICITY SDFAC REFINE CONSTRAINT FIX FREE DELAY REJECT RESOLUTION PRINT DEBUG REFMEAN REFSUM REFALL WAVELENGTH CELL MISSET SCALE OUTPUT INSCALE BATCH CRYSTAL END
ISOTROPIC is equivalent to
FREE ET FIX DH DV DL CDANISOTROPIC is equivalent to
FREE DH DV FIX ET DL CD
For the tanh profile, the TANH keyword may be followed by the keyword WTANH (alias LIMIT) and a value for the truncation limit WTANH ( = w in section following expression (c) above) which is used to make the tanh function into a bounded curve; and the keyword QTANH (alias SCALE) may be followed by a scale factor for the argument of the tanh function ( = q in expression (c) above): the refined value of the reflection width or divergence will be dependent on the value of w/q, since as w is increased, more of the tail of the profile is included in the reflection width. The default value of w = WTANH = 2.7 ( tanh(2.7) = 0.991 ), which means that the curve is truncated at Pcal = 0.0045 and Pcal = 0.9955. The default value of q = QTANH = 2.0
If the keyword FILE is given, the beam parameters and mosaicity will be picked up from the input file (from OSCGEN and ABSCALE) (this the default).
A*, B*, C* cell edges AA, BA, GA cell angles WL wavelength ZM, ZD mean and difference of epsilon-z YM, YD mean and difference of epsilon-y ET mosaicity (eta) DH, DV horizontal, vertical beam divergence DL dispersion, delta lambda/lambda (leave fixed) CD correlated dispersion (leave fixed)The keywords FIX or FREE may be mixed with parameter labels to specify the status of subsequent parameters given on the card.
Defaults: cell parameters normally default to the flags given in the orientation block, but if any cell parameter label is given here, all the cell parameters will default to free. The cell flags in the file also indicate constraints tying cell edges together (eg a* = b* ): these constraints are not affected by FIX or FREE cards. Other parameters are by default fixed except for ZM, YM and ET (or DH & DV if the divergence is anisotropic: a ROCK ... ANISOTROPIC card sets DH & DV free and fixes ET). If WL is free, the cell edges A*, B* and C* are automatically fixed. You would be ill-advised (probably) to refine beam parameters other than ET or DH+DV.
CONVRG is a convergence limit (default = 0.02); the refinement has converged if the change of SIG = Sqrt ( Sum ( w del**2 ) ) / (Nobs - Npar) is less than CONVRG.
FLTLIM, FLTSTT, FLTDEC. The filter-level is the amount added to all eigenvalues to speed convergence: it has the effect of damping shifts in the directions corresponding to small eigenvalues. The filter level starts at FLTSTT, and is decremented by FLTDEC until it reaches FLTLIM (defaults 0.0,0.05,0.02)
- FINCR
- Intensity increment for analysis against intensity (default = 1000). Used only when PRINT is set to ANALYSIS or FULL. Max. no. of bins fixed at 12.
- REJFAC(1)
- reject reflections with Iobs < REJFAC(1) * sd(Iobs) (default = 0) The refinement seems to converge best with all data included.
- REJFAC(2)
- reject reflections with Iref < REJFAC(2) * sd(Iref) (default = 0)
- CUTOFF
- reject reflections with sd(fraction obs) > CUTOFF (default=0.5)
- REJANG
- reject reflection closer than REJANG degrees to the rotation axis on the film (default = 3 degrees)
- FRLOW,FRDEC
- define which non-fractional reflections are used. In each cycle, reflections are used with calculated fraction Pcal such that
-FRL < Pcal < 1 + FRLFRL starts at FRLOW on the first cycle, and is decremented by FRDEC on each cycle until FRL = 0.0. This allows reflections which are just outside the fractional range to be used in the early cycles, in case they are really fractional. These reflections are weighted by(1 - exp( - (delta I)**2/2(sd(I))**2 ) )to weight down those reflections which are really non-fractional. (Defaults 0.0, 0.0)- REJSD
- reject reflections for which Pobs - Pcal > REJSD * sd(Pobs) (default = 10.0)
- FRCLIM
- omit reflections altogether from calculation if the calculated fraction in the input file FRACTIONCALC is greater than FRCLIM. If this fraction is reliable, leaving out the safe fully recorded reflections speeds up the calculation considerably.
Variance(Iobs):= SDFAC**2 ( Var(Iobs) + (SDADD * Iobs)**2 )
(Default 1.0, 0.0 ie no change)
- BRIEF
- (default) minimal output, prints only the analysis against fraction
- SHIFTS
- (or PRINT with no keyword) prints also the shifts on EACH cycle and the orientation data from the header records for each batch.
- ANALYSIS
- additional extensive analysis after the last cycle (this is worth doing for at least a few films).
- FULL
- is equivalent to both SHIFTS and ANALYSIS
- REFLECTIONS
- in addition to the FULL analysis, all reflections are printed on the last cycle.
- VECTORS
- prints eigenvectors of normal matrix on last cycle, as well as eigenvalues.
Specification of batches
- (a)
- ALL all batches (default if no keyword on BATCH card)
- (b)
- list of batches n1 n2 n3 etc
- (c)
- range of batches n1 TO n2
- (d)
- EXCLUDE with list n1 n2 n3 etc This may follow ALL or a range.
The control data fileOutput FilesHKLIN The input reflection data file. This is a multi-record MTZ file (See section PROGRAM FUNCTION for details)
HKLOUT The output reflection data file. This is a multi-record MTZ file (See section PROGRAM FUNCTION for details)
Definitions of statistics:
Avdel = 1/n Sum delta I Avsd = 1/n Sum sqrt(1/weight) rmsdel= sqrt( 1/n Sum(delta I **2) ) rmsesd= sqrt( 1/n Sum(1/weight) ) = sqrt( 1/n Sum( Var(Iobs)) ) RDEL = Rfactor = Sum Icorr - Iref / Sum Iref RSIG = fractional mean sd(Icorr-Iref) = Sum{sqrt[Var(Iobs)/(Pcal**2) + Var(Iref)]} / Sum Iref RDEL and RSIG exclude reflections with Pcal < 0.1 DPER = weighted mean delta(fraction) = Sum[(Pobs - Pcal)/Var(Pobs)] / Sum[1/Var(Pobs)] ADPER = weighted mean delta(fraction) = Sum[ Pobs - Pcal /Var(Pobs)] / Sum[1/Var(Pobs)] ESD = rms sd(fraction) = sqrt[Sum Var(Pobs)/n] RMS = rms delta(fraction) = sqrt[Sum(Pobs-Pcal)**2/n] Q = S/NR = mean delta(fraction)**2/variance = 1/n Sum[(Pobs-Pcal)**2 / Var(Pobs)] For all statistics, Pcal = 1 for a fully recorded reflection, = 0 for a non-recorded one.
!!!! Keyword KEY not recognised !!!! !!!! Syntax error on card !!!! !!!!!! Unrecognised parameter label: LABEL (FIX/FREE/DELAY) !!!! Scale card is only valid with one batch specified on card !!!! Errors in opening units STOP **UNABLE TO OPEN UNIT 5 OR 6** STOP **UNABLE TO OPEN UNIT 9** Too many parameters !!!!! Too many free parameters, maximum is N Problems with the Batch Handling !!!! Too many batches in list: N !!!!! No orientation data found for batch N !!!!! Too many films for this crystal, maximum = N NB batch N has no reflections contributing to refinement !!!! **** Batch number not found in file **** !!! Error in batch titles in NEWFIL !!! Point Group dictionary Point group PG not found in library !!!! !!!!!!! Warning: point group name was previously set to PG !!!!!!!! Matrix handling !!!!!! Symmetry matrix is singular !!!!!! MTZ file errors !!!!! First five columns of input file are out of order Nq1 N2 N3 N4 N5 Error on reading MTZ file: Error no. NError messages may also be produced by the MTZ file handling routines. These start with the message **MTZ ERROR** and are documented elsewhere.
The residual minimized is
Sum w ( Iobs - Pcal Iref )**2where the calculated fraction Pcal is a function of the following parameters:
Cell dimensionsThe program may refine each film pack (batch) seperately, or a group of films (up to 50) may be refined together with the same cell dimensions, with the same or different mis-setting angles and rocking curve parameters (see CRYSTAL card).Wavelength (as an alternative to cell edges)
Misorientation angles phi-z, phi-y, phi-x (optionally different at the two ends of the rotation range). Within each cycle the program refines the mis-setting angles in the camera frame epsilon-z and epsilon-y (ZM and YM), and optionally their difference ZD and YD, then rotates the epsilon shifts into the reference frame (phi-z, phi-y, phi-x ) after each cycle.
Rocking curve parameters (divergence and dispersion)
The program allows three alternative forms of rocking curve to relate the angular fraction to the intensity fraction: both have a finite angular width 2g, such that the intensity fraction
Pcal = 1/2 ( 1 +- f(b) )where b is the angular fraction (ie fraction of g) = delta beta / g
(a) square profile f(b) = b (b) cosine profile f(b) = sin ( b * pi/2 ) (c) hyperbolic tangent profile f(b) = tanh ( q * b ) where q = QTANH is a scale for the tanh function (see ROCK card).Note that function (b) is defined only for -1 < b < 1 and (c) for b < (w/q): otherwise function (a) is used. The tanh function (c) is equivalent to a peak with tails compared to the cosine function. For the tanh profile, b = (w/q)*(delta beta / g ), and b is truncated at b = w/q : w = WTANH is the truncation limit (see ROCK card). This scaling ( parameters w and q ) makes the divergence for the tanh function more comparable with that for the cosine curve.
The reflection width g includes a dispersion term, and may be anisotropic.
g = 1/2 * ( sqrt( (2 TANtheta * CD + DH COSalpha)**2 + (DV * SINalpha)**2) + ET + DL * TANtheta )see Greenhough & Helliwell (ref. 2) and Greenhough (ref. 3) (see BEAM card) where alpha = (tan)**-1 y/z , the azimuthal angle on the film. Note that g is the half-width of the reflection, but the rocking-curve parameters ET, DH & DV refer to the full-width of the reflection.
H K L M/ISYM BATCH I SIGI FRACTIONCALC IMEAN SIGIMEAN ISUM SIGISUMwhere IMEAN and ISUM are alternative reference intensities, respectively the mean of the safe fully recorded reflections, and the sum of the two adjacent partials.
The file should also a batch header and orientation block for each batch. The orientation block contains starting values of the orientation parameters, constraint flags for cell parameters, and the relative scale and temperature factor (from ROTAVATA) to put this batch on the same scale as the reference intensity. The orientation blocks are put into the file by ABSCALE. The orientation parameters in the file may be overridden by control data (see above).
Orientation data (see also libmtz.doc)
1. 6 cell dimensions (Angstrom and degrees, real numbers). These cell dimensions define an orthogonalization matrix B to convert indices hkl to Cartesian crystal axes xyz x = B h B = (a* b* cos gamma* c* cos beta* ) (0 b* sin gamma* -c* sin beta* cos alpha ) (0 0 lambda / c ) (Busing & Levy 1967) This gives x parallel to a*, and y in the a* b* plane. 2. 6 cell dimension flags (integer) defining which parameters may be varied. Flag = -1 parameter is freely variable = 0 parameter is fixed (ie cell angle = 90 or 120) = I(.gt.0) parameter is constrained to have the same value as parameter number I . 3. Orthonormal matrix U (9 real numbers in order U11, U12, U13, U21 etc) to rotate the crystal Cartesian coordinates to the camera Cartesian coordinates. The IDXREF matrix is A = U B . The matrix U defines a standard orientation, and is a function of the mounting axis and the axis defined as phi = 0 , but it is not dependent on the misorientation angles. Typically, U will be a permutation matrix. 4. JUMPAX, the 'mounting' axis, as defined for OSCGEN (1,2,3 for h,k,l) (not used) 5. 6 misorientation angles, rotation axis mis-setting (6 real numbers): PHIX1 , PHIY1 , PHIZ1 , PHIX2 , PHIY2 , PHIZ2 The first three refer to the orientation at the beginning of the rotation range (at phistart), the second three phi angles (if present) refer to to the end of the rotation range (at phiend). The second set should be set equal to the first set if no crystal slippage is assumed. 6. Start and stop rotation angles. ( 2 real numbers) phistart, phiend 7. crystal mosaicity in degrees 8. lambda, delta lambda/lambda, correlated dispersion 9. Scale , Temperature factors for this batch ( from Rotavata etc). The correction to be applied is SC * exp ( -2 * B * (sin theta/lambda)**2 )
M = 0 fully recorded = 1 partial ( 0 =< P < 1.0 ) = 2 not recorded ( P < 0 ) = 3 partial at both ends of the range = 4 too near axis (see REJANG above on REJECT) cardReflections with M > 1 will be rejected in AGROVATA.
! ! Sort output file from Rotavata for postrefinement ! $SORTMTZ HKLIN RPFKPRF2 HKLOUT RPFKPRF2S BATCH H K L M/ISYM ! ! Now postrefine ! $POSTREF HKLIN RPFKPRF2S HKLOUT RPFKPRFT6 TITLE PFK R-native, 2nd postrefine rescaled, averaged cell, tanh 2.3 POINTGROUP PG222 FREE WL FIX A* B* C* AA BA GA REFINE 20 0.01 0.0 0.05 0.02 ROCK TANH LIMIT 2.3 REJECT 1000 0 0 0.5 10 CELL 122.17 84.30 61.26 BATCH 200 TO 299 CELL 122.84 84.39 61.60 BATCH 300 TO 399 CELL 122.67 84.39 61.53 BATCH 400 TO 499 CELL 122.67 84.20 61.59 BATCH 500 TO 599 CELL 122.77 84.10 61.86 BATCH 600 TO 699 CELL 122.70 84.64 61.52 BATCH 700 TO 799 ! ! Resort data ready for Agrovata or Rotavata ! $SORT: SORTMTZ HKLIN RPFKPRFT6 HKLOUT RPFKPFTS6 H K L M/ISYM BATCHExample 2.
$SORTMTZ HKLIN ROTSTR3 HKLOUT ROTSORT BATCH H K L M/ISYM $POSTREF HKLIN ROTSORT HKLOUT PREFSTR2 TITLE STR-ATP C* POSTREF POINTGROUP PG222 ROCK TANH LIMIT 2.5 CRYSTAL ONEROCK 1391 TO 1394 CRYSTAL ONEROCK 1501 TO 1504 CRYSTAL ONEROCK 1521 TO 1524 CRYSTAL ONEROCK 1531 TO 1535 CRYSTAL ONEROCK 1541 TO 1543 CRYSTAL ONEROCK 1545 TO 1548 CRYSTAL ONEROCK 1551 TO 1555 CRYSTAL ONEROCK 1561 TO 1564 CRYSTAL ONEROCK 1567 TO 1569 END .Example 3.
#!/bin/csh -f # # Recycle Rotavata & Postref # # Number of cycles controlled by parameters in next few lines # To do final merge, set cycle = maxcycle # cd $scr0 set dataset = bst set cycle = 3 set nextcycle = $cycle # For final merging only: else reset below set maxcycle = 3 set saved = /ss1/pre/pfk/bst # Following line to do final merge if ($cycle == $maxcycle && $cycle != 1) then goto agro endif # Skip initial Rotavata if restarting after cycle 1 if ($cycle == 1) then rotavata hklin ${saved}/${dataset}_sort hklout ${dataset}_save_${cycle} scales ${dataset}_${cycle}.scales << end_rota title BST PFK T9 + T10 batches 100 bins 10 brefine on cycles 5 scale unity output postref resolution 20 2.6 rejlim 4 width 1500 intensities profile process full partial sdinflate sdfac = 1 sdadd = 0.04 anomalous off records truncate end_rota endif ########### Return here for next cycle cycle: echo ============================================================= echo echo Postrefinement cycle $cycle echo echo ============================================================= @ nextcycle = $cycle + 1 # Sort for Postref on BATCH # sortmtz hklin ${dataset}_save_${cycle} hklout ${dataset}_prfrs_${cycle} << eof-sort BATCH H K L M/ISYM eof-sort postref: postref hklin ${dataset}_prfrs_${cycle} hklout ${dataset}_savep_${cycle} summary ${saved}/${dataset}_${cycle}.prfsum << eof-prf Title PFK B.st T-state crystals T9 & T10 cycle ${cycle} rock tanh limit 2.3 isotropic crystal 900 to 944 crystal 1000 to 1042 eof-prf # Resort for Rotavata # sortmtz hklin ${dataset}_savep_${cycle} hklout ${dataset}_prfs_${cycle} << eof-s1 H K L M/ISYM BATCH eof-s1 rota: rotavata hklin ${dataset}_prfs_${cycle} hklout ${dataset}_save_${nextcycle} scales ${saved}/${dataset}_${cycle}.scales << end_rota title BST PFK T9 + T10 batches 100 bins 10 brefine on cycles 5 scale postref output postref resolution 20 2.6 rejlim 4 width 1500 intensities profile process full partial sdinflate sdfac = 1 sdadd = 0.04 anomalous off records truncate end_rota end_cycle: # Clean up unwanted files /bin/rm ${dataset}_prf* # Recycle if required if ($cycle < $maxcycle) then @ cycle = $cycle + 1 goto cycle endif time ##exit ############################################################## # # Final merging # agro: agrovata hklin ${dataset}_save_${nextcycle} hklout ${saved}/${dataset}_merge <<end-agro @${saved}/${dataset}_${cycle}.scales intensities profile process full partial all frmin 0.7 end-agro # exit time trunc: truncate hklin ${saved}/${dataset}_merge hklout ${saved}/${dataset}_F <<EOF-trunc title BST PFK T9 + T10 wilson #resolution nresidue 1280 labout F=FT SIGF=SIGFT EOF-trunc timeExample 4:
#!/bin/csh -f # # Postrefinement # # # First resort data on batch sortmtz hklin $scr0/cx88_scl1 hklout $scr0/bc93_s << eof-1 BATCH H K L M/ISYM eof-1 # now for Postref postref hklin $scr0/bc93_s hklout $scr0/bc93_p << eof-2 Title Postrefinement B.st. PFK C2 rock tanh isotropic !beam 0.03 0.01 refine 6 refall sdfac 0.8 0.08 crystal 61 to 699 crystal 701 to 799 crystal 811 to 899 crystal 911 to 999 crystal 1111 to 1199 crystal onemisset 1311 to 1319 crystal 1321 to 1399 crystat 2011 to 2099 crystal 2111 to 2199 eof-2 # # # exit # # sort back for Rotavata sortmtz hklin $scr0/bc93_p hklout $scr0/bc93_post << eof-3 H K L M/ISYM BATCH eof-3