LOGIC a program for searching enties in ICDD-JCPDS PDF-2 powder diffraction database that match specified constrants such as: elements present, number of unique elements, peaks in particular locations and text strings in specified fields. Searches may be applied with full Boolean logic, i.e. one may find entries that contain certain elements, but not others and one peaks in certain locations, but no peaks in other regions, etc. The concept of full implementing full Boolean logic in ICDD-JCPDS searching was pioneered in an earlier version this program. This concept is now the basis for the ICDD-JCPDS PDF-4 database. Unlike the PDF-4 program, which allows for searches using all database fields, the Logic program only allows a small number of fields to be searched.
Documentation for Program LOGIC
The following sections describe how the program works and the various modes within the program. The most recent additions are noted with the "new" image, while other changes that have been added in the previous few versions are flagged with this image: .
For installation information, see the CMPR/LOGIC overview.
The LOGIC program consists of one main window, shown to the right, and two optional windows, shown below. The main window allows access to the various functions of the program, via the menu bar, it shows the number of entries located in the current search, and it shows the commands used to generate the current search.
The "index" window is shown above. This window shows one line for each entry located in the last search. The user can select what information is displayed for each entry in the index using the index contents menu item. Items that can be displayed include, the chemical formula, the chemical, common & mineral names, the literature reference and the peak positions. Clicking on an index line causes that entry to be displayed in the window shown below.
The "browse" window, shown below, allows entries to be displayed in greater detail in one of two modes. In the first (PDF-1), the the chemical formula, the chemical, common & mineral names, the literature reference and the peak positions are shown (see the display contents menu item to select if peak positions are displayed as d-spaces, in Q, or as 2Theta values at a selected wavelength.) In the second mode (PDF-2), all information on the selected material is shown from the full database.
Note that one can advance forward and backward through the database using the "Next" and "Previous" buttons. The "Save as..." button places the contents of the window in a text file, while the "Print" button sends the same text to the printer (in Windows, the text is by default sent to notepad.) The "export" button creates a data file with peaks listed.
LOGIC menu commands
Most of the functions of the program are accessed via commands in the menu, as are detailed below.
- This initializes the current search to have all entries in the database or no entries, depending on the type of search to be performed.
- This saves the current search in a file that can be reloaded or combined with other searches.
- This reloads a search saved with a previous "Save" operation. After the file has been selected, the user is offered five choices for how the entries in the file will be used (as shown to the right):
- OR file with previous
- The entries in the file will be combined with entries in the previous search, so that entries in either list will appear in the result.
- AND file with previous
- The entries in the file will be contrasted with entries in the previous search, so that only those entries that appear in both lists will appear in the result.
- REMOVE file from previous
- The entries in the previous search will be retained, except that any entries in the file will be removed.
- REMOVE previous from file
- The entries in the file will be retained, except that any entries in the previous search will be removed.
- REPLACE previous with file
- The previous search will be discarded, and the contents of the file will replace it.
- Ends the program
- Subfiles are collections of entries established by the ICDD editors. In this menu, one can select a subfile and use the same logical operations as are available when same fashion as one would loading a saved file.
- This option locates entries based on the presence of absence of specified elements. Once entries are located based on composition, the same logical operations as are available when loading a saved file, except that the REPLACE option is not available.
Required elements: Elements may be required to be present, using either "One of" or "All of" logic. If "Ca, Si, O" is input with "All of" logic, only materials that contain all three elements will be found. In the "One of" case, entries with any one (or more) of the three elements will be found.
Optional elements: If the "All elements optional" option is selected, then all materials containing the required elements will be located, regardless of any other elements that are present. On the other hand, if "Allowed elements" is checked, then the presence of any element that is not in the list of required or optional elements will be located. For example, if "Ca, Si, O" is input with "All of" logic and "Allowed elements" are specified as "H, F" then the only materials that will be located are those with composition (Ca, Si, O) plus (H, Ca, Si, O), plus (Ca, Si, O, F) and (H, Ca, Si, O, F). Likewise, if "Ca, Si, O" is input with "All of" logic and "Allowed elements" is selected, but no allowed elements are specified, the only the materials with composition (Ca, Si, O) will be selected.
Use Table: Elements may be entered manually by typing in element symbols, or group symbols. Alternately, pressing the "Use Table" button causes a periodic table to be generated, as shown below. Pressing buttons on the table selects elements that are entered into the specified entry box.
- Element Count
- This option selects elements based on the number of unique elements in the material. Once entries are located based on composition, the same logical operations as are available when loading a saved file.
- This option is used to locate entries based on the presence of peaks in specified ranges using the window shown below. Ranges are specified by the middle of the range and then the uncertainty, where a peak position of 1.2 with an error of 0.05 indicates the range of 1.15 to 1.25. If more than one peak is specified, the entries that contain all of the specified peaks ("Require all of list") or any of the specified peaks ("Require one of list") can be located. The "Peak Threshold" requires that peaks must be above a certain level in intensity to match, or must be one of the three strongest peaks in the pattern. Note that entries are first located for via a prebuilt index file (search table). This may require increasing the search criteria, by widening the error tolerance or lowering the "Peak Threshold". This is allows for very rapid searches, but if desired selection of "Use exact errors" causes each located entry to be checked against the original search criteria, so that the error ranges are not changed. This slows the search, particularly if a large number of entries must be examined. If the "Expand errors as needed" option is selected, the error range is allowed to grow to match the ranges built into the index file.
Once entries are located based on peaks, the same logical operations as are available when loading a saved file, except that the REPLACE option is not available.
- PDF number
- Entries may be located based on PDF number, which is usually thought of as a one or two diget set number (year) and a four digit entry number for that year. Entries may be specified as single 5 or 5 digit number, or as set-number or as set,number. Either a list of entries may be provided or a range. Once entries are located by PDF number, the same logical operations as are available when loading a saved file, except that the REPLACE option is not available.
- String search
- This option is used to locate entries where selected fields contain specified text strings. If more than one string is specified then either all strings must be matched or any one of the strings must be be matched. String searching is relatively slow, so you should try to reduce the number of entries that must be examined through use of other searches before using a string search. For the same reason, only the "AND with previous" and "REMOVE from previous" options described in the loading a saved file section are allowed.
- This option restores the previous search, if a result is unsatisfactory. Note that only one undo level is currently implemented.
- Display settings
- This option controls the units and order used to display peaks. Also, if the "Include AIDS*83 records" option is checked, the unformatted entry from the PDF-2 database is included in the browse window after the formatted version.
- Index contents
- This option allows the user to select what information is included in the index window, including the order and the size of the fields, as seen below.
- Printer settings
- This option sets the system command used to print output. Notepad is used for this purpose in Windows.
- Index/Browse font
- This option adjusts the size of characters used in the browse and index windows.
- This causes the settings used for the options to be used as defaults for future runs of LOGIC. The values are saved in file C:\Documents and settings\<
>\logic.init in Windows (in older versions of Windows this may be c:\logic.init). In Unix this information is saved in file ~/.logic_init.
Neither the author nor the U.S. Government makes any warranty, expressed or implied, or assumes any liability or responsibility for the use of this information or the software described here. Brand names cited here are used for identification purposes and do not constitute an endorsement by NIST.
Brian Toby (firstname.lastname@example.org)
$Revision: 1.3 $ $Date: 2006/01/08 23:33:35 $
Last modified 08-January-2006 by website owner: NCNR (attn: Craig Brown)