DFTools (Version 5.1 May 1990) The DFTools disk contains several files: DFT.EXE, DFTNO87.EXE, DFTSG.DAT, DFTHELP, DFTHELP.WP5 and a few files having an extension of 'BGI'. DFTHELP is the ASCII file containing the text of this user's guide. DFTHELP.WP5 is a WordPerfect 5.1 document which you can use to print out a nice copy of the manual if you have WordPerfect 5.1 or another word processor that can read it. The data file, DFTSG.DAT, contains space group data and is only necessary if you want DFTools to determine forbidden reflections using space group data. The BGI files are video device drivers used by the program to plot data to a graphics monitor. The graphics driver for CGA/MCGA/EGA/VGA/HERC systems is built into DFTools. Use DFTNO87.EXE if your computer is not equipped with a 80X87 math coprocessor, otherwise use DFT.EXE. If your computer system does not include a graphics card and monitor then you will not be able to see simulations on your CRT, but you will still be able to run the program. After running DFTools the first time you should S)ave the initialization information at the O)ptions Menu as described later. This will generate a file called DFT.INI. DFT.INI is read every time you run DFTools. By changing the values in this file you can change the values used as defaults when the program starts up. If you have a file viewing or file editing program you would like to use with DFTools, you can specify the name of the program in the DFT.INI file, or in the O)ptions Menu and access the program from the U)tilities Menu, as described later in the manual. DFTools is a shareware type program. You may give it to anyone, and make as many copies as you wish. If you have a real interest in the program you can write or call the programmer and bargain for a copy of the source code. By not releasing the source code for this program I am exercising control over its development. If the program can't do something that you think it really ought to contact me. Being only human, I will accept any gifts sent in appreciation of the program. The source code for DFTools may be available in the near future on the EMMPDL. Please contact John Sutliff with comments and/or suggestions: John Sutliff Dept. of Materials Science and Engineering Whitaker Lab #5, Lehigh University Bethlehem, PA 18015 Tel. (215) 758-4220 I apologize in advance for any imperfections in either this user's guide or the program. It is difficult to anticipate the needs of unknown users of a program. However, the program is reasonably "durable" and will not crash unless really pushed, so you are encouraged to experiment with the program so as to realize its full usefulness. I am happy to offer this program at the present cost as I know that there are a number of similar programs available for what might be considered an unreasonable cost. IMPORTANT! All requests for this program should be accompanied by a formatted disk (any IBM PC format) WITH an addressed and postage-paid return package. This is the only "cost" to obtain the program (and I REALLY appreciate your effort in doing this for me). Introduction DFTools is a program to assist in the analysis of diffraction patterns (DPs). It provides a facility for recording measurements taken from DPs, for conveniently accessing crystal structure data, for performing basic crystallographic calculations, for matching experimental patterns to calculated patterns, for simulating diffraction patterns, and for producing stereographic projections. DFTools is not a program for determining crystal structures, although it may be helpful in doing so. The user must always provide at least one crystal structure with which the program can make calculations. The atom positions in the crystal structure are not used in DFTools; a calculation of structure factors is not made. The program cannot directly account for diffraction effects from twinning, double diffraction, and/or from multi-phase materials. The user must sort out, or guess out, which spots are associated with each other and why. Given one "net" of spots, the matching routines in DFTools will attempt to make sense of them. The users can use the flexibility of DFTools to generate complicated simulated diffraction patterns. DFTools was written with the intent of creating an analytic tool and an organizational tool. The program creates many files containing data relevant to the diffraction calculations. You may never need to use these files directly, but then again, they may prove useful. The following list summarizes file types used/created by DFTools: filename.xtl a user created crystal data file filename.pat a user created diffraction pattern data file filename.wpd a DFTools created EDP simulation file filename.pro a DFTools created stereographic proj file filename.lau a DFTools created Laue X-ray DP simulation file filename.plt a DFTools created HP-GL plot file All of these files are ASCII files which may be modified and used by editors and word processors. In some cases the line length may be greater than 80 columns which might confuse some programs. The present version of DFTools has been tested on IBM XT, AT, and 386 compatibles running under MS-DOS. The nature of the programming code does not suggest a likely incompatibility with most IBM PC clones. NOTES ON GETTING STARTED: When entering a command at a menu, only the first letter of the desired selection need be typed. When presented with a screen of data, press any key to continue. In general, if a response only requires one keystroke, you will not need to follow that keystroke by a return , otherwise press to acknowledge you are finished entering data. Also, do not include file extensions, such as '.CRS' or '.SIM', when entering a filename. DFTools keeps track of the standard file extensions as indicated above. If you are prompted for input and a value or string is shown inside parentheses, you may use that value or string simply by pressing return . If you are prompted for a series of values, type in the values using blanks in between the individual values. Commands In DFTools, there are menus dealing with specific tasks: Main Menu: Options for task specific menus and basic commands Utilities Menu: Utilities to execute other programs and DOS commands Files Menu: Commands to load or create crystal and pattern files Match Menu: Commands to match EDPs to ZAPs of known phases Simulate Menu: Commands to simulate diffraction patterns Calculate Menu: Commands to calculate and tabulate crystal data Options Menu: Commands to set options used in DFTools. Main Menu Commands J)mp This routine allows you to make any crystal in the active crystal file the current crystal. If the current crystal is the 3rd in the crystal file and you would like to use the 11th , use the J)mp command to jump to the eleventh crystal. A list of crystals in the active file will be displayed and you must enter the number of the crystal you want to use. You may access the next crystal in the file by entering a . The name of the current crystal will be displayed after your input. Additionally, U)tils, F)iles, M)atch, S)imulate, C)alcs, and O)ptions cause these specific menus to appear. To exit DFTools, type a Q at the main menu ( Q)uit ). Utilities Menu Commands V)iew/edit This command executes the user defined program that was specified in the DFT.INI file or was entered at the O)ptions Menu. I would suggest a good file viewer such as Vernon D. Buerg's LIST program. If a simulation doesn't look right, or you want a better look at a crystal file (without leaving DFTools) you could use V)iew/edit to look at/edit the file. D)irectory This command is basically like the DOS dir command, just quicker. You only need to specify the path (e.g. c:\mydata) not the file type. *.* is used. C)ommand to DOS This command executes a command processor (COMMAND.COM) with a single command line. Control is returned to DFTools immediately following execution of the single command line. This is not like "pushing" to DOS. This command is convenient for copying, renaming, deleting, etc... just like you would do at the DOS prompt. X)ecute This command runs any executable file. Use it at your own risk. I run an editor using it when I want to edit a file quickly from within DFTools. If you really want to 'push' to DOS, X)ecute COMMAND.COM, but remember you must type the DOS 'EXIT' command to return to DFTools. Files Menu Commands D)ir Use this command to display a list of files in the data directory. The data directory may be specified in the options menu using the P)ath command. The file extension defaults to 'XTL' to list crystal files, but you may specify any extension. G)et xtl file This routine gets an already existing crystal file from the data directory and makes it active and ready for use by the rest of the program. You will be prompted for the name of the crystal file. A file extension of .XTL is assumed. After you've entered the file name, a list of crystals in the file will be given and you will be asked which crystal in the file you want to use first. The name of the current crystal will be displayed to confirm your choice. C)reate xtl file This routine will create a file containing crystal structure data for any number of crystalline phases (here after called crystals) that you want grouped together. For example, if you were investigating titanium you might like easy reference to crystal structure data on alpha-Ti, beta-Ti, omega-Ti, and the oxides, carbides, and nitrides of titanium. The routine will first prompt you for a file name. After you've entered the file name, you will receive queries for a crystal name, the crystal's space group, and its lattice parameters (a, b, c, alpha, beta, gamma). The space group must be given as the space group NUMBER as designated in the International Tables for X- ray Crystallography. If you do not know the space group number, for whatever reason, you may enter a zero, after which you will be asked for a lattice TYPE. Similar to space group designations, P stands for primitive, A, B, or C for face centered on the A, B, or C face, F for face centered on all the faces, I for body centered, R for obverse rhombohedral, and S for reverse rhombohedral. If you do not know the lattice type, enter a P for primitive. After entering one crystal, you will be asked for another. If you are finished entering crystals, just enter a in response to the query for the crystal name. After you have finished, the file is saved and then made active starting with the first crystal in the file. A listing of the crystals in the file is displayed along with the name of the current (or usable) crystal. You can also make any crystal in the file the current crystal by using the J)mp command. The next time you wish to use the same crystal data you can retrieve the file with the G)et command. M)ake pattern file This command evokes a routine for organizing and storing measurements taken from DPs. You are prompted to name the new data file to be created. The file will automatically be given a file extender of '.PAT'. After entering the file name, a repeating sequence of questions begins. You are requested to enter the approximate camera constant, the distance between the central beam and three diffracted spots (g1 g2 g3), and the angles between the three diffracted spots (a12 a13). See Figure 1 below. .g2 .g3 +000 .g1 Figure 1. There is a convention that MUST be followed: g1<=g2. The data, along with calculated interplanar spacings, will be stored for future use (see K)rch below). Realize that there is no forced convention for units of distance in DFTools. You may enter the lattice parameters in Angstroms or nanometers, the g's in millimeters or inches. Just be certain that you use an appropriately scaled camera constant or the calculations are not going to make any sense. The simulation procedures in DFTools MUST use a camera constant scaled to millimeters, so you should use either mm/A or mm/nm for consistency. Match Menu Commands S)olve one pattern Use this command to perform an analysis of a single EDP, when you don't want to take the time to enter the pattern information into a pattern file (see M)ake pattern file above). The presently active crystal file provides the phases to search for a match. You will be prompted to enter the diffraction pattern measurements and the same conventions used in entering pattern data into a pattern file must be used. You will be given the option of attempting a match against all the crystals in the active file or only the current crystal. Because of this last feature, you may prefer to use S)olve to make quick analyses when you think you know the identity of the phase and you don't want to check solutions against other crystals in a potentially large crystal file. K)runch This command starts the fully automatic EDP matching routine. It is useful for analyzing many DPs in a single computer session, or under situations where it is suspected that the analysis might take a long time (e.g. if there are fifty crystals in the crystal file). Before using this command you should have created both a crystal file containing the crystals you want to check against and a pattern file containing all the measurements from your EDPs. With a .XTL file and a .PAT file you can do some "krunching". The options menu will appear immediately after using the K)runch command. Make any necessary changes before starting the analysis. After exiting from the options menu, you will be prompted for the name of the pattern file and then the name of the crystal file. After that, you must decide where you want the output directed. Here, the most likely choices are the printer or a storage file, due to the likely length of the results. Simulate Menu Commands D)ir Use this command to display a list of simulation files in the current directory. The directory for the listing may be specified in the options menu using the P)ath command. The file extension defaults to 'WPD' to list EDP simulation files, but you may specify any extension. C)reate This command creates simulation files describing a Zone Axis Patterns (ZAPs), ring patterns, back-reflection or transmission x- ray Laue patterns, and stereographic projections. The procedure calculates the pattern for the current crystal. A file with the proper extension (WPD,LAU,PRO) will contain the Laue zone layer number, HKL, and (X,Y,Z) coordinates of each excited reflection (i.e reciprocal lattice point; remember this is a kinematic calculation); If the pattern is a convergent beam electron diffraction pattern then the end-point coordinates for each Higher Order Laue Zone (HOLZ) defect line in the bright field disk will follow the coordinates of the reflection. All coordinates have been transformed from their natural reciprocal space representation to a real space representation by multiplication by the camera constant. Depending on the kind of simulation desired, the user may need to supply the following information: UVW of beam direction, camera constant, accelerating voltage (in kV), the HOLZ layers being considered, the maximum order reflection to consider, the radius of the zero order Laue zone (ZOLZ), the radius of the bright field disk (000), and the radius of the HOLZ defect lines (the HOLZ line radius determines the interaction area between the Ewald sphere and a reciprocal lattice point; it should be greater than or equal to the spot radius). If the user really knows these parameters for the image being simulated, then the simulation should be exact, i.e. the simulation should overlay on top of the real image. NOTE: The camera constant in the simulation routine must have millimeters in its units!! For a stereographic projection or Laue pattern, you will need to specify the maximum order reflection to include in the pattern/projection and the desired scale of the pattern/projection. As the spots in these simulations correspond to planes in the crystal of interest, and not directions, you may want to have the pattern rotated such that a particular plane is perpendicular to the beam/viewing direction. If the "beam" direction [uvw] is not normal to the plane (uvw) then you are asked if you want the plane normal (pole) rotated to the center position. A)djust This command allows new .WPD files to be created based on previously created files. The user may change the lattice parameters and diffraction conditions and recalculate the simulation. Considerable time is saved because identity of the reflections hkl have already been determined. If you think new reflections might come into the pattern at the different conditions then go back and C)reate a new simulation. Using this procedure it is also possible to ask that additional reflections and HOLZ lines be calculated if you know their layer number and HKL's. You can also use adjust to rotate an EDP about the beam direction. E)dit This command allows you to view a simulation file piece by piece. You can select whether to keep or save various parts of the pattern. This is consistent with the idea that the simulation should have all the lines observed in the experimental pattern, but it may have additional lines that are not visible in the experimental pattern. You can remove the extra lines for simplicity and clarity. V)iew This command allows any existing simulation files to be plotted to the graphics screen. You will be prompted for the type of simulation stereographic projection, Laue x-ray diffraction pattern, or electron diffraction pattern, and the name of the appropriate files. Of course, the V)iew command requires that you have a graphics monitor and control card. M)ake plotfile This command creates a file based on a simulation file that may be sent to an HP plotter for output. The file will be given a file extension of .PLT. The procedure creates an HP-GL command compatible file. Using DOS, this file may then be sent to a communications port linked to an HP plotter. If you have a model 7475A plotter, or compatible, you can get output using different pens for data from each Laue zone. If you do not have an HP-GL compatible plotter (or other HP-GL smart device) you can still use the .WPD files to construct the images using your own customized software. Calculations Menu Commands I)nterplanar spacings This command produces a table of interplanar spacings for the current crystal. You will be asked to designate where the output should be sent. You may direct the output to the screen (default), to the printer, or to a storage file. If the latter option is made, you are further prompted for the file name. Make sure you use a complete and legal DOS file name e.g. BetaSn.tbl or B:\data\LEAD.DSP. R)adius ratios This command produces a listing of interplanar angles and g-radius-ratios for the current crystal. You are prompted for the number of lines (with regards to the table of interplanar spacings) the listing should include. Remember, planes which are multiples of allowed planes are not considered in the calculations, by default. The larger is the number of planes to be considered, the longer is the time necessary to produce the listing. It may be desirable to direct the output to a storage file to reduce I/O time. This listing can be very helpful for manual matching of diffraction patterns to non-cubic crystals. If you are working with the same phase most of the time, the listing may be very convenient. H)KL-UVW This command gives general information about particular planes and directions in the current crystal. You are prompted to enter two sets of indices H1 K1 L1 and H2 K2 L2. These indices are used as indicating both planes and directions. The following data is output: angle between those two directions, identity distances in those directions, planes normal to those directions, interplanar spacing of those planes, possible angles between planes of the same families, angle between those particular planes, the directions normal to those planes, and the zone axis containing those two planes. Options Menu When the options menu is evoked, a list of current program settings and a menu will be presented. These settings influence how DFTools operates. Some options are important in establishing criteria for the matching procedures to use in determining solutions to your DP data. In particular, the values of errors in A, and R, as well as the error in camera constant, strongly affect the speed of the analysis. The E)rrs and H)KLs commands let you specify the allowable errors and the extent of reciprocal space that will be searched for solutions. The programming code in DFTools represents a combined camera constant and radius-ratio method of analysis. If you have absolutely no knowledge of the camera constant, for a general analysis using 500 possible reflections, you will have to be willing both to wait a while for DFTools to analyze the data and to wade through a long listing of possible solutions. The default settings assume a "reasonable" knowledge of the camera constant and should yield rapid results. Experiment. P)ath Use this command to specify where all your data files should be stored and retrieved from. If no data path is specified the current directory (as defined by DOS) is used. You can also effectively change the data path by changing directory with the DOS cd command (at the U)tilities Menu if you want). U)ser Use this command to specify a file viewing or file editing program that you would like to use when working in DFTools. You do not need to include a path to the directory where the program resides if the path is included in the DOS's PATH. L)ab Use this command to toggle on/off the printing of labels on spots/reflections when displayed on the monitor. This does not affect labels in hardcopy output. K)in This command toggles on/off the reporting of kinematically incorrect solutions to EDPs. For instance, if the crystal is FCC, the 100 reflection is forbidden, and thus a solution having the correct radius/ratio and camera constant will NOT be reported if it includes the 100 reflection. If you are not sure that the crystal really is FCC you might want to relax the restrictions by allowing these kinds of solutions to be reported. This is an alternative to making two crystals one with an FCC Bravais lattice and one with a primative cubic Bravais lattice. F)or This command toggles on/off the inclusion of kinematically forbidden HOLZ reflections in the simulation files. Normally, this will cut down on a lot of useless information. But turn it on if you want to know about any forbidden HOLZ reflections. V)id Use this command to install or change graphics drivers and to adjust the graphics system so that you get properly scaled simulations on your monitor. Some Experimentation will probably be necessary. NOTES If DFTools is executed without DFT.INI in the path then execution will proceed using simple default values. If DFTools is executed without the DFTSG.DAT file it will not be possible to add space group information to your crystal files. If DFTools is executed without the .BGI files then it will not be possible to view simulations on ATT/PC3270/IMB8531 graphics systems. During execution, a request to open a file that is not in the path will not cause the program to crash, but execution will simply continue at the last MENU accessed. Most improper data input will result in another request for the input or a return to the last menu accessed. Please appreciate the subtleties involved in achieving a properly scaled and undistorted simulation on a graphics monitor. The controls available on various monitors vary, and how to obtain an undistorted image will depend somewhat on your particular configuration. The graphics modules used by DFTools are sophisticated, but calibration of the output will most likely be necessary. Use the V)id command in the O)ptions menu to help adjust your monitor. After making those adjustments generate a cubic [001] spot pattern with known separation between spots ( cc=100 mm-A, a=5 A; spacing will be 20mm ). To assure that the simulations show the proper symmetry and scale the screen parameters (screen x and y dimensions in mm) in the DFT.INI file must have the proper ratio, i.e. screenx/screeny = pixelsx/pixelsy, and to assure that the actual dimensions are correct their magnitudes must be correct. You may experiment with scaling without leaving the program by making changes to x and y dimensions in the O)ptions MENU. Remember the values and update the 'DFT.INI' file later to make the changes permanent. The more complex a crystal structure is the more time it will take DFTools to make some of the calculations. The time depends on the complexity of the unit cell, the complexity of conditions for forbidden reflections, and the number of interplanar spacings (reflections) being used. The latter parameter can be changed with the O)ptions commands. A star next to an index (hkl) in a table of interplanar spacings means that at least ONE of the family members of that index is forbidden. It does not necessarily mean that all members are forbidden. The monoclinic space groups (3-15) have two possible "settings", one with the z-axis unique and the other with the y-axis unique. The space group number has, by default, been assigned to the first setting z-axis unique. The second setting may be specified by indicating the space group number added to 230. Thus, the second setting of space group P112, number 3, which would be P121, can be specified by entering a space group number of 233. If you know the space group symbol, but not the number, you may refer to the DFTSG.DAT file for a list of space group names and numbers. In that ASCII file are the full space group symbols in a somewhat distorted form. Use of the letters b and s to indicate a bar symbol and to specify a subscript, respectively, was necessary in the ASCII format. Therefore, read F4s1/db32/m as: F, (4 sub 1) over d, bar 3, 2 over m, i.e. S.G. #227. The matching routines are only a small part of a hopefully more generally useful program. If you are not getting matches remember all of the following: 1) you may want to enter less restrictive values for the matching routine options; be prepared to wait; 2) you may want to re-enter a complex lattice type crystal as having a primitive lattice to obtain maximum generality of diffraction conditions; kinematically forbidden reflections can occur due to dynamical effects such as double diffraction; 3) you may want to allow non-kinematic solutions if you have specified a primitive lattice, but do not know for sure if the lattice is primitive or not; 4) your DP may be from a phase you don't suspect, e.g. an oxide or carbide; go back to the JCPDS files of whatever crystal phase database you are using; 5) you may have incorrectly entered DP or crystal data; check the values in your .PAT and .XTL files against your EDP and crystal references, respectively; 6) The DP may be from a newfangled compound or worse yet a quasicrystal; time for a manual analysis; 7) your copy of the program may be malfunctioning; curse the day you first heard of DFTools, then contact the programmer. If, on the other hand, you are getting too many solutions, try limiting the number of reflections used and/or making the allowable errors smaller. The simulation procedures are meant to be used with real data. If the sample is known precisely, and the diffraction conditions are known precisely, then the simulation should be precise. It should always be kept in mind that the calculations in DFTools are based on kinematic diffraction theory. In the programmer's opinion, precise, quantitative simulation of real convergent beam electron diffraction (CBED) patterns is difficult and for some materials may be outside the scope of a kinematic analysis. Realize that you may simulate HOLZ line patterns containing particular lines from more than one Laue layer by appropriate editing of the WP data files. For example you may create separate files for the first and second Laue zone layers. Then you can add to the first Layer reflections only those lines from the second layer that are detected in the experimental pattern using either A)djust or a text editor. Keep in mind that if a simulation produces all experimental lines plus additional unseen lines, things are acceptable. If lines are seen in the experimental pattern that are not seen in the simulation, then something is amiss and there is more work to be done. Acknowledgements I am the sole author of the DFTools code. No code was borrowed or copied from another program. The basic crystallographic formulas were selected from among several notable books (some of which contain typographical errors) and the remaining code is my own invention. The first (skeleton) version of this program was written during an internship at General Electric Corporate Research and Development in 1983. Ed Koch and I thought about what we wanted in a DP analysis program and we got things going. The program surely would not exist if not for Ed. The rest of the AEM Group at GE were very supportive of all my crazy efforts. Thank you Ernie Hall, Nathan Lewis, and Ann Ritter. Version 2 was hacked out in Bethlehem on my own ATARI 520ST microcomputer after I arrived at Lehigh University to work toward my doctorate. The program was then ported to the IBM PC's and compatibles. The simulation procedures followed after a short time, but with much time spent. Helpful and sometimes heated discussions with C. M. Sung, V. P. Dravid, and K. S. Vecchio helped me along the way to Version 3. Version 4 incorporated the stereographic projection generation routine as well as a number of beautifications. I can thank Saikumar Vivekanand for the constant prodding to "...get it to plot on the screen." The inclusion of the Laue x-ray diffraction pattern simulation routine in version 4.3 resulted from my wanting to generate Laue patterns for use in an undergraduate lab class I was teaching. Version 5.X got rid of some annoying things and made life a little easier for novices.