Title: LEAST SQUARES UNIT CELL REFINEMENT with INDEXING on the PERSONAL COMPUTER LSUCRIPC KeyWords: Powder Diffraction, Unit Cell Refinement Computer: PC, XY, AT Operating System: MS(PC)-DOS Programming Language: TURBO Pascal Hardware: 192K memory, 1 diskette drive, math coproc.(recommended) Author: Roy Garvey Correspondence Address: Department of Chemistry North Dakota State University Fargo, ND 58105-5516 Documentation: --------------------------------------------------------------------------- INSTRUCTIONS for using LSUCRIPC D A T A I N P U T Definitions and Specifications Parameters are input with spaces separating numeric fields as follows: FIRST LINE Title describing the data being processed. SECOND LINE Unit Cell Parameters as A B C Alpha Beta Gamma Control Parameters Itht = 0 for defraction data in 2-theta = 1 for defraction data in 1-theta thtmx Maximum diffraction angle (in Itht units) to be considered in indexing. Set at 20 if 0 is coded. Ncyc Number cycles during which non-indexed diffraction with angles exceeding ThtMx are not accepted in least squares. A zero value is reset to 2 by program. TolMn Minimum tolerance allowed (in units of Itht). If 0 entered, value reset to 0.02o by program. TolMx Maximum tolerance allowed (in units of Itht). If no greater than TolMn, reset to five times TolMn. If given as 0, a value of 0.1o set by program. THIRD LINE Code for Crystallographic System CUBIC for cubic crystal systems. TETRA for tetragonal systems. ORTHO for orthorhombic systems. MONOC for monoclinic systems. RHOMB for rhombohedral or trigonal systems. TRICL for triclinic systems. HEXAG for hexagonal systems. HEXAR for hexagonal-rhombohedral systems. TheMx Value comensurate with Itht to be used in determining the minimum interplanar spacing for generated diffraction. This value may be superceded by given diffraction having greater Bragg angles. If 0 and there are no observed diffraction given, TheMx is set to 90o theta. Pwl Primary wave length used in computing minimum distance for generater diffraction. If given as 0, value of 1.5405 A is assumed. The next 27 entries indicate conditions for non-extinction for certain diffraction classes. To be effective, the integer n entered must be 2,3 4 or 6 in the appropriate location; x, y, and z are any integers. If the crystal type is HEXAR, entry 6 will be considered to be 3 whether it is entered or not by the user. Each of the following 27 items must be repre sented by a numeric value as described above or by 0 as a place holder. Each entry must be separated form those preceding and following by at least one space. Class of Condition for Entry Diffraction non-extinction 1 hkl h + k = x.n 2 hkl h + l = x.n 3 hkl k + l = x.n 4 hkl h+k = x.n, h+l = x.n, k+l = x.n 5 hkl h + k + l = x.n 6 hkl -h + k + l = x.n 7 hhl h = x.n 8 hhl l = x.n 9 hhl h + l = x.n 10 hhl 2h + l = x.n 11 0kl k = x.n 12 0kl l = x.n 13 0kl k + l = x.n 14 h0l h = x.n 15 h0l l = x.n 16 h0l h + l = x.n 17 hk0 h = x.n 18 hk0 k = x.n 19 hk0 h + k = x.n 20 hh0 h = x.n 21 h00 h = x.n 22 0k0 k = x.n 23 00l l = x.n 24 hll h = x.n 25 hll l = x.n 26 hll h + l = x.n 27 hll h + 2l = x.n SEmult Multiple of the standard error of an observation of unit weight to be used in setting tolerances. FOURTH LINES Diffraction data. For diffraction that are to be indexed by the program by comparing corresponding distances and angles with those of theoretical diffraction, h, k, and l must be given as zero. If one or more of the diffraction indices is non-zero, the indices read from the diffraction entry will be maintained throughout the run. Diffraction entries must be arranged in order of increasing Bragg angle (or decreasing d-spacing). If no observed diffraction data are given, the output will consist of theoretical lines only. As before, numeric entries are separated by spaces. 0 is entered as a place holder where no data is input. Each diffraction is represented by the following entries: h k l D Wlc Obs Wt where h, k, l are the corresponding Miller indices. D is the interplanar spacing as computed from the Bragg relationship. D need not be given if OBS is given. Wlc is the wavelength (in A) associated with the current diffraction. If given as 0, it is assumed to be the same as the wavelength for the previous diffraction line. (If a wavelength for the first diffraction line of a data set is not given, the value given or implied by Pwl is used). Obs is the Bragg angle concomitant with Itht and given as degrees and fraction thereof. The angle need not be given if D is given. If both theta and D are given, D will be recomputed as the observed d- spacing from theta and the given or implied wavelength. WT is the weight to be associated with the value of theta for the current diffraction. If WT is given as 0, it is set to 1.0 by the program. All entries are set to 0 for the last data line. A sample data set is included illustrating the use of 0 as a place holder. Cell Refinement of A - ZrPO4 SNOWMASS WORKSHOP test data file. 9.06 5.295 15.414 90 101.75 90 0 0 0 0 0 MONOC 73 0.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 0 0 2 0.0 1.5405981 11.7087 0.0 -1 1 1 0 0 19.8162 0 2 0 0 0 0 20.0178 0 0 1 2 0 0 20.4939 0 2 0 1 0 0 22.072 0 -1 1 3 0 0 24.9746 0 2 0 2 0 0 25.2411 0 -2 1 2 0 0 27.0218 0 1 1 3 0 0 27.7465 0 0 1 4 0 0 29.0032 0 -3 0 1 0 0 29.5801 0 -1 1 5 0 0 33.8194 0 0 2 0 0 0 33.8903 0 -3 1 1 0 0 34.1718 0 -3 1 2 0 0 34.655 0 0 2 2 0 0 35.9646 0 -3 1 3 0 0 36.1483 0 3 1 1 0 0 36.301 0 -2 0 6 0 0 37.2433 0 1 1 5 0 0 37.3402 0 0 2 3 0 0 38.4033 0 -3 1 4 0 0 38.572 0 3 1 2 0 0 38.7756 0 -2 2 2 0 0 40.2341 0 4 0 0 0 0 40.6483 0 -2 1 6 0 0 41.0746 0 0 2 4 0 0 41.6506 0 3 1 3 0 0 42.0089 0 2 2 2 0 0 42.6968 0 -4 0 4 0 0 42.8435 0 -4 1 1 0 0 43.5333 0 -1 1 7 0 0 44.4877 0 4 0 2 0 0 44.8181 0 -2 0 8 0 0 48.2941 0 1 1 7 0 0 48.4369 0 -1 3 1 0 0 53.0391 0 -4 2 2 0 0 53.3706 0 -5 1 3 0 0 54.0075 0 -1 2 7 0 0 54.1143 0 -1 3 3 0 0 55.4481 0 -4 2 4 0 0 55.7147 0 1 2 7 0 0 57.5746 0 -3 2 7 0 0 58.9394 0 2 1 8 0 0 59.4316 0 -2 2 8 0 0 60.2872 0 3 1 7 0 0 60.4909 0 -5 1 7 0 0 63.1216 0 1 2 9 0 0 68.7137 0 -4 1 10 0 0 70.0417 0 0 4 0 0 0 71.2907 0 -6 2 2 0 0 71.9717 0 0 0 0 0 0 0.0 0 Specific parameters are identified in the following lines of input data. Note that spaces are used as "field Delimiters". TITLE LINE Cell Refinement of A - ZrPO4 SNOWMASS WORKSHOP test data file. UNIT CELL PARAMETERS Tolerance A B C aLpha beta gamma Itht thtmx ncyc mn mx 9.06 5.295 15.414 90 101.75 90 0 0 0 0 0 T h e Conditions for non-extinction for certain classes m 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 Sysext x Pwl 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 Semult MONOC 73 0.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 DIFFRACTION DATA h k l D Wlc Angle Weight 0 0 2 0.0 1.5405981 11.7087 0.0 -1 1 1 0 0 19.8162 0 * * * * * * * TERMINATOR of H K L DATA INPUT 0 0 0 0 0 0 0 ERROR MESSAGES Run Time Error Messages that are Fatal with Program Aborted: 01 Floating point overflow. 02 Division by zero attempted. 03 SQRT argument error. 04 LN argument error. 10 String length error. 11 Invalid string index. 90 Index out of range. 91 Scalar or subrange out of range. 92 Out of integer range. F0 Overlay file not found. FF Heap / stack collision. I / O Error Messages when I/O checking is active: 01 File does not exist. 02 File not opened for input. 03 File not opened for output. 04 File not opened. 10 Error in numeric format. 20 Operation not allowed on a logical devise. 21 Not allowed in direct mode. 22 Assign to STANDARD files not allowed. 90 Record length mismatch. 91 Seek beyond end-of-file. 99 Unexpected end-of-file. F0 Disk write error. F1 Directory is full. F2 File sixe overflow. F3 Too many open files. FF File disappeared. Special Version of LSUCRIPC includes the following new features: Ability to pass < InFile.dat > and/or < OutFile.lst > file names on the command line. < InFile.dat > is the file of data and control codes used in earlier versions of the program (and described in the LSUCRIPC.doc file). < OutFile.lst > is an optional text file to which all printed information can be directed. No longer is it necessary to wait for your printer to catch up to the compution. If the < OutFile.lst > is to be used, you must also include the < InFile.dat > name on the command line as the first entry. If no < OutFile.lst > name is given, the program defaults to the system LST: (PRN: or LPT:) device. To read the data file TEST.dat from drive B: and write the printed listing to a file TEST.out on a RAM disk C: you would type LSUCRIPC B:TEST.dat C:TEST.out Printer initialization. In the past we have been limiting users to those printers using control codes compatible with either those of OKIDATA Microline or those of the IBM- EPSON series of printers. For this "Conference" version we have included a third option. By providing a PRINTER.$pr "Printer Profile" with the decimal integer equivalent for the character codes of your printer needed to initialize COMPRESSED EXPANDED NORMAL printing modes, the program will accomodate any of a variety of additional printers. These codes are written to the corresponding < OutFile.lst > so these files may be printed as desired at a later time and retain the text formating of the original. The PRINTER.$pr must have three lines of FIVE integer numbers (separated by spaces) in a format as illustrated below. 27 48 15 0 0 Compressed Print Epson Codes 14 0 0 0 0 Expanded Print 18 0 0 0 0 Compressed off ------------------------------------------------------------------------- End of File