Installing EXPGUI on Linux
Please note: A new mechanism for installing GSAS & EXPGUI is now recommended. See this link. If this method is used, EXPGUI or a python script can be used to update GSAS & EXPGUI quickly and easily. The information below is all obsolete. Also, GSAS updates for the Silicon Graphics have not been produced for many years.
Note that root access is not required to load this GSAS/EXPGUI package. You may choose to do this work as root, so that the files may be installed a central location (such as /usr/local).
1. PrerequisitesInstallation of GSAS & EXPGUI requires X windows, which is loaded with the operating system on virtually all Linux and SGI systems. It also requires only the shared libraries typically found on standard install configurations (tell me if I am wrong). The Linux version is compiled with g77 v2.96 on a Redhat 7.1 machine. It should be compatible with most modern versions of Linux. The SGI version has been compiled with f77 on a SGI running IRIX 6.5. It should be compatible with most recent versions of IRIX. This GSAS & EXPGUI is now distributed with a version of Tcl/Tk, so installation of Tcl/Tk is no longer a prerequisite.
2. Download the GSAS/EXPGUI DistributionMake a note of where you download the file. In the following section it will be assumed the file was placed in /tmp/.
- download file ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/SGI_gsas+expgui.tar.gz (~11 Mb) by shift-clicking on the previous link. (Alternately this file can also be downloaded from the CCP14 mirrors in UK, Canada, or Australia).
- download file ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/LINUX_gsas+expgui.tar.gz (~10 Mb) by shift-clicking on the previous link. (Alternately this file can also be downloaded from the CCP14 mirrors in UK, (Canada, or Australia).
3. Unpack the distributionIn this step, it is assumed that you downloaded the distribution file in directory /tmp/.
- Determine a directory where the software should be installed. If you do not have root access, this will likely be in your own working area, typically /usr/people/account or /home/account. Note that the files will be placed in a subdirectory named gsas in this location.cd mkdir Programs cd Programsorcd /usr/local
- Expand the files:
- SGI, use command
- gunzip < /tmp/SGI_gsas+expgui.tar.gz | tar xvf -
- LINUX, use command
- tar xvzf /tmp/LINUX_gsas+expgui.tar.gz
4. Installing a shortcut to EXPGUIWhile it is possible to invoke EXPGUI by typing/usr/local/gsas/tcltk84+ /usr/local/gsas/expgui/expguior/home/toby/myprogs/gsas/tcltk84+ /home/toby/myprogs/gsas/expgui/expgui(etc.) this would get old fast. Rather, you will likely want to create an easier command to type. Below are three ways to do this. Note that only one is needed. Do not use all three. You could also create a startbar or desktop icon that can be clicked to start EXPGUI. The way this is done depends on how your system is set up and cannot be described here. Note that in the commands below, it is assumed that GSAS has been installed in /myprogs/gsas. Also, note that in the commands below, ^D means control-D.
4.1 Installing an alias for EXPGUI
One way to create a easy way to invoke EXPGUI is to add an alias to your default shell. First, determine what shell you are using. Typeecho $SHELLThe response will likely be something like /usr/bin/bash (the bash shell) or /usr/bin/tcsh (the tcsh shell).
- If you use tcsh or csh:
- to add an alias to your ~/.cshrc file, type these commands (change /myprogs as needed):cat >> ~/.cshrc alias expgui "/myprogs/gsas/tcltk84+ /myprogs/gsas/expgui/expgui" ^D
- If you use bash:
- to add an alias to your ~/.bash_profile, type these commands (change /myprogs as needed):cat >> ~/.bash_profile alias expgui="/myprogs/gsas/tcltk84+ /myprogs/gsas/expgui/expgui" ^D
4.2 Installing EXPGUI in the path
Another way to simplify access to EXPGUI is to create a file that will invoke the GUI script. The file must be placed in a directory in your path and flagged as executable. You can examine the directories in your path by typing:echo $PATHAlso, check to see that you do not alreay have expgui command in your path by typing:which expguiYou should get a response "expgui not found in...". A response of /usr/bin/expgui tells you there is already a shortcut to expgui in that location. Either replace it or choose a name other than expgui.
The commands to create this executable file will be:cat > /usr/bin/expgui /myprogs/gsas/tcltk84+ /myprogs/gsas/expgui/expgui ^D chmod +x /usr/bin/expgui(change /myprogs and /usr/bin as needed). Note that this step (4.2) is incompatible with the one below (4.3).
4.3 Linking EXPGUI into the path
Another way to simplify access to EXPGUI is to create a link in your system's path to the GUI script. First, you will need to edit the 3rd line in the EXPGUI script fromexec wish "$0" "$@"toexec /myprogs/gsas/tcltk84+ "$0" "$@"(change /myprogs as needed). Then you will create a link using: ln -s /myprogs/gsas/expgui/expgui /usr/bin/expgui Note that this step (4.3) is incompatible with the one above (4.2).
Updating to a new GSAS release
It is quite common that Bob Von Dreele will release an update to the GSAS programs more frequently than the combination gsas+expgui is updated. It is possible to update only the GSAS software. To determine the date of the GSAS package release, run a GSAS program, such as EXPEDT or SPACEGRP and note the date where it says "Distributed on ..." To update, first determine where you have installed the GSAS/EXPGUI software (/myprogs in the previous example). You will want to install the GSAS distribution to the gsas subdirectory in that location. Then download the latest GSAS release from CCP14:
Select and download the appropriate gsaskit.tar.gz (making sure that the listing date is significantly later than the distribution date you currently have). Then use commands like this:
- SGI, use command
- cd /myprogs/gsas gunzip < /tmp/gsaskit.tar.gz | tar xvf -
- LINUX, use command
- cd /myprogs/gsas tar xvzf /tmp/gsaskit.tar.gz
Finally, check that GSAS has indeed been updated by again running a GSAS program, such as EXPEDT or SPACEGRP and noting the date where it says "Distributed on ..."
Updating to a new EXPGUI release
It is also common that new features will be added to EXPGUI or bug fixes will be made without an update to the combination gsas+expgui package. The absolute latest release (which may not have gotten a lot of testing) is distributed as ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/expgui_ALPHA.tar.gz. You can find the number of the latest alpha release by looking at file http://www.ncnr.nist.gov/xtal/software/expgui/alpha/wishlist.html
To update, first determine where you have installed the GSAS/EXPGUI software (/myprogs in the previous example). You will want to install the GSAS distribution to the gsas/expgui subdirectory in that location. Second, note the EXPGUI package date, by using the Help/About menu command in EXPGUI. You then want to download this file:
(for mirrors, select file expgui_ALPHA.tar.gz from CCP14 sites in the UK, Canada, or Australia.)
and unpack it to subdirectory .../gsas/expgui/ using commands like this:
- cd /myprogs/gsas/expgui gunzip < /tmp/expgui_ALPHA.tar.gz | tar xvf -
- cd /myprogs/gsas/expgui tar xvzf /tmp/expgui_ALPHA.tar.gz
RPMs for GSAS/EXPGUI are not being updatedI am no longer preparing an RPM distribution for GSAS & EXPGUI. This is because it was getting increasingly hard to find RPM distributions for Tcl/Tk and BLT. If one has to install & build these packages from source code, then one must also override the RPM package tracking system to install the GSAS & EXPGUI RPM. The current method, which includes the entire Tcl/Tk package is easier to deal with.
The Tcl/Tk Starkit
The GSAS-EXPGUI distribution now includes a single file version of the entire Tcl/Tk package, as well as a graphics package for Tcl/Tk, called BLT, that is used extensively within EXPGUI. The inclusion of this file within the package simplifies installation considerably. This file, tcltk84+, contains many other Tcl/Tk packages (that are not used within EXPGUI), but may be of value for use with other applications.
Using other versions of Tcl/TkIf you have another version of Tcl/Tk installed on your computer, it must also have the BLT package installed and configured properly. To confirm this software is installed and working correctly on your system try the following commands. (Commands you type are in this typewriter font, computer responses are this italic font. My comments are provided in this text font and are underlined).
There is a common problem with the pkg_Index.tcl file in older versions BLT that makes the Blt_ZoomStack command inaccessible, see my updated copy ftp://ftp.ncnr.nist.gov/pub/cryst/tcltk/BLT2.4_pkgIndex.tcl for an example that works. Also see the Compiling Tcl/Tk 8.2.3 & packages for Linux example of how to install.
[tammy@beryl]$ wish (note a window is created) % set tcl_version 8.0 (8.0 is the Tcl/Tk version number. EXPGUI requires 8.0 or higher) % package require BLT 2.4 (2.4 is the BLT package version number. EXPGUI requires 2.3 or higher. If you get "can't find package BLT" then BLT is not installed [properly] on your system) % blt::graph .g .g (nothing happens. You should not get an error message here.) % pack .g (now a graph is displayed) % Blt_ZoomStack .g (if error message: invalid command name "Blt_ZoomStack" appears there is a problem with your BLT installation, see below.)
Thanks to Paul Kienzle of the NCNR DAVE project for providing the "all in one file" (starkit) version of Tcl/Tk for SGI and Linux.
GSAS is written by Allen C. Larson and Robert B. Von Dreele while at Los Alamos National Laboratory. Problems, questions or kudos concerning GSAS should be sent to Robert B. Von Dreele at firstname.lastname@example.org
EXPGUI was written by Brian H. Toby while at the NIST Center for Neutron Research, Brian.Toby@ANL.GOV with help from Jonathan Wasserman.
GSAS is Copyright, 1984-1997, The Regents of the University of California. The GSAS software was produced under a U.S. Government contract (W-7405-ENG-36) by the Los Alamos National Laboratory, which is operated by the University of California for the U.S. Department of Energy. The U.S. Government is licensed to use, reproduce, and distribute this software. Permission is granted to the public to copy and use this software without charge, provided that this notice and any statement of authorship are reproduced on all copies. Neither the Government nor the University makes any warranty, express or implied, or assumes any liability or responsibility for the use of this software.
EXPGUI is not subject to copyright. Have fun with it.
Neither the U.S. Government nor any author 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 consitute an endorsement by NIST.
$Revision: 973 $ $Date: 2010-03-28 17:19:55 +0000 (Sun, 28 Mar 2010) $