***************** * First release * ***************** Computer Physics Communications 67, (1992) 543-547 -------------------------------------------------- SEXIE - a Microcomputer Program for the Calculation of ------------------------------------------------------ Coordination Shells and Geometries ---------------------------------- Bernhard Rupp, Bryan Smith and Joe Wong, Lawrence Livermore National Laboratory, University of California, P.O.Box 808, Livermore, CA 94551 We present an easy to use FORTRAN microcomputer program designed to specifically satisfy the needs of the X-ray Absorption Spectroscopist by providing the shell-by-shell atomic arrangement around a central atom in a form suitable for EXAFS data interpretation. It is easily portable and we provide PC- and Digital Equipment VAX versions. PROGRAM SUMMARY (ORIGINAL VERSION - OUTDATED !!!) Title of program: SEXIE Computer: any IBM compatible based on Intel iAPx86 processors or Digital Equipment VAX Operating system: PC-DOS 3.2 - 4.1; DEC VAX/VMS Programming language: FORTRAN 77 (ANSI X3.9-1978) High speed storage required: 320 kBytes No. of bits in a word: 16 No. of lines in combined program and test deck: 6000 Keywords: X-ray Absorption Spectroscopy, EXAFS, coordination shells, coordination geometries, bond distance, bond angles Nature of physical problem: calculation of coordination shells and geometries around a central atom in a crystal structure and presentation in a form suitable for EXAFS data interpretation. Method of solution: based on the input of space group, unit cell parameters and fractional coordinates of nonequivalent atoms in the unit cell, we expand the cluster of atoms and calculate the distances from each symmetry- generated atom to the central atom, sort the distances into shells and attempt to identify shell geometries. Restrictions on the complexity of the problem: At present, the unit cell is limited to twenty nonequivalent atoms. This parameter is easily changed at the cost of about 10 kB memory per additional atom. Typical running time: 1 minute on IBM AT (8 MHz). 1. Introduction --------------- Phase shifts and amplitude functions, essential for the quantitative EXAFS (Extended X-ray Absorption Fine Structure) spectral analysis of new materials, are frequently extracted from model compounds of known crystallographic structure. Although many crystallographic programs can in principle provide the necessary data, the retrieval of relevant information may be cumbersome: grouping of atom distances into coordination shells is usually not provided; no attempts are made to determine the coordination geometry; bond angles are not sorted; and the input of point symmetry generators can be elaborate and error prone, especially for space groups of high symmetry. We have designed SEXIE (Shells for EXAFS - InteractivE) to specifically satisfy the needs of the X-ray Absorption Spectroscopist by providing the shell-by-shell atomic arrangement around a central atom in a form suitable for EXAFS data interpretation. Of course, SEXIE is a complete bond distance and angle calculation program and its various listings of output data can be useful for many other applications. SEXIE will be used mostly by non-crystallographers. Although structural information can be found easily in books like Wyckoff [1], Pearson/Villars [2] or in the original literature, the derivation of the complete set of equipoint positions for each atom in the asymmetric unit cell from the International Tables for Crystallography [3] can be quite elaborate. Specific features include : * SEXIE requires only a minimum of crystallographic input data : cell constants, the Hermann-Mauguin space group symbol, and the fractional coordinate triple of each nonequivalent atom in the asymmetric unit cell * A menu driven input preparation routine combined with a user-managable input data base of structure data for most elements and for several model compounds * Automatic space group decoding and equipoint generation * Tabulated output of structure information, densities, and K, L(I,II,III) edge energies * Compact listing of coordination shells, subshells and geometries * Full listing of atom distances and angles SEXIE is written in ANSI X3.9-1978 standard FORTRAN (DOD MIL-1135 Standard). It runs on any iAPx86 based IBM compatible microcomputer under DOS (Version 3.2 and up) with 300 kB of available free memory. A math coprocessor is strongly recommended. SEXIE can be implemented on virtually any computer. A VAX version is included with the PC disks. 2. Program structure -------------------- Our code consists of the two main programs (SEXIE itself and the interactive input generator INSHELL) plus a collection of utility programs, database- and batch files. Although some redundancy results, each program's source code consists of all the required modules. We will describe in some detail the flow of both INSHELL and SEXIE. 2.1. INSHELL structure and flow ------------------------------- INSHELL allows one to interactively create new input for SEXIE and to search the data base, SEXIE.DBF, for retrieval of old input. The data base can be searched by space group or partial data labels; INSHELL is menu driven and self explaining. Creating a new addition to the data base takes from one to five minutes, depending on the complexity of the unit cell. On errors of format and input consistency, INSHELL provides appropriate information and examples. Additionally, INSHELL offers automatic conversion from rhombohedral to hexagonal settings. After entering the un cell information (space group symbol, lattice parameters, and fractional coordinates of each nonequivalent atom) one is given a chance to verify or edit the input. Subsequent options include saving the input into an individual input file, appending it to the data base or, proceeding directly to the calculation of coordination shells. For an example of a complete input file see the listing of TEST.INP in the test run input section. 2.2 SEXIE structure and flow ---------------------------- SEXIE reads a single input file (SEXIE.INP). The program first prepares a table containing basic input information, cell con-stants an coordinate transformation matrix as used for the calculations. It is followed by a space group decoding part which prints out the equipoint transformation matrix and the corresponding general atom coordinates. The method used to decode the point group transformations in subroutine EQUIPT follows the one used in the program LAZY PULVERIX [4], which itself notes that its decoding routine was adapted from a program BURZ supplied by H.Burzlaff [5]. After the space group decoding comes a printout of unit cell information, consisting of fractional and cartesian coordinates of all atoms in the asymmetric unit cell, and some information on X-ray absorption energies [6], X-ray- and electron densities of the material. With all the atoms in the unit cell known, the cluster of atoms is expanded to a suitable size. Distances from the first chosen central atom are then calculated, the atoms are sorted into shells (the Heap-Sort routine HEAPST is based on a program listed in Numerical Recipes [7]) and a short table is printed of the coordination shells and geometries around the central atom. The program recognizes certain coordination geometries; not all geometries are considered, however. Finally, a complete table of vertex coordinates and angles is printed to the output file. As this table is usually very large, it is not displayed on the screen. If there are more central atoms chosen, the program repeats the calculation of coordination shells for each of them. For a summary of these processes see the program flow diagram, figure 1. 2.3. Batch files ---------------- We highly recommend that you start the program using the batch file SEXIE.BAT (SEXIE.COM on VAX) which makes all necessary file assignments and contols the program execution. If you enter COURIER.BOLDSEXIE without a following file name, the batch file loads INSHELL. If a file name is given on the command line, the batch file activates SEXIE with the assigned input file and renames the default output file, SEXIE.OUT, accordingly. 2.4. Installation dependent features ------------------------------------ We employed the Microsoft FORTRAN compiler version 4.1 and VAX FORTRAN V5.1-10 to compile the ANSI X3.9-1978 standard FORTRAN files. Differences between the VAX- and the PC-version of the source code appear only in a call to a screen clearing routine CLRSCR and in the choice of some characters used to draw the table frames. The standard DEC multinational character set is used on the VAX, and the extended IBM standard ASCII character set should be used on the PC (character code page 437), the IBM multilingual character sets are not suitable. All PC programs make use of the DOS extendend screen and keyboard driver ANSI.SYS which usually is loaded upon booting (include the command line DEVICE=ANSI.SYS in the DOS system file CONFIG.SYS). The configuration file SEXIE.CFG allows to set a parameter icomp as 'IBM' or 'VAX' and the programs automatically select the appropriate character codes. 3. Testing and documentation ---------------------------- SEXIE and its associated utilities have been tested in over fifty crystal structures, including most elements and several model compounds. With the program disks (two 1.2 MB 51/4" DOS format), the authors distribute a thirty page User's Guide, complete with practical hints and a full sample session. In addition to our data base we provide a sample session, the input and output of which are copied below in the test run section. For brevity, the output is terminated after the listing of the vertecies and bond angles of the first coordination shell. 4. Acknowledgments ------------------ This work was supported by the U.S. Department of Energy at the Lawrence Livermore National Laboratory under contract number W-7405-ENG-48. 5. References ------------- [1] Pearson's Handbook of Crystallographic Data for Intermetallic Phases, P.Villars and L.D.Calvert, eds., American Society for Metals, Metals Park, Ohio (1985) [2] Crystal Structures, R.W.G.Wyckoff, Wiley & Sons, N.Y. (1963) [3] International Tables for Crystallography, Vol. I, The Kynoch Press, Birmingham, England (1968); or International Tables for Crystallography, Theo Hahn, ed., D.Reidl Publishing Company (1988) [4] Program LAZY PULVERIX, K.Yvon, W.Jeitschko and E.Parthe, J.Appl.Cryst. 10, 73 (1977) [5] R.Boehme, H.Burzlaff and M.Gomm, Acta Cryst. A31, S277 (1975) [6] J.A.Bearden and A.F.Burr, Rev.Mod.Phys., 39 (1967) 125. [7] W.H.Press, B.P.Flannery, S.A.Teukolsky and W.T.Vetterling, Numerical Recipes, Cambridge University Press (1986).