|
Home | Instruments | Science | Experiments | SiteMap |
The pdCIFplot and CIFEDIT programs have been combined into a single distribution, CIFTOOLS. The executable (Tcl/Tk) code is the same on all platforms. However, a platform-specific version of the Tcl/Tk shell is included in distributions targetted for most common platforms. This web page outlines how this software is installed for each type of platform:
Windows
Download: ftp://ftp.ncnr.nist.gov/pub/cryst/cif/ciftools.exeThe software is contained in a self-installing executable file that installs all files needed, including the necessary Tcl/Tk and BLT software. The self-installer also sets up short-cuts in the Start menu or on the desktop, or both, as selected during installation to start the program. Optionally, the self-installed defines the data type ".CIF" so that the program can open a CIF by double-clicking (if selected) or by right-clicking on a file with a .CIF extension.Prerequisites: none
To remove the CIFTOOLS files from a computer, go to the Windows "Control Panel" and select the "Install/Remove Software" option (the name varies slightly between versions of windows) and select CIFTOOLS from the list of software. This will delete from your computer the files installed by this self-installer. It will not delete the directory files that were created, nor any files that you have placed in these directories.
Linux
Download: ftp://ftp.ncnr.nist.gov/pub/cryst/cif/ciftools_Linux.tar.gzFor Linux, the CIFEDIT & pdCIFplot programs are distributed as a compressed tar file that can be installed in any convenient directory. The commands to install will work something like this:Prerequisites: none
The Linux distribution includes a version of Tcl/Tk that will run on most recent versions Linux and includes libraries for the BWidgets enhancements and the BLT graphics package. Substitution of versions of Tcl/Tk and BLT that have been compiled specifically for your version of Linux may be preferable (or occasionally, required). Some old notes on compiling Tcl/Tk can be found here. The BWidget package can be readily located and does not need compilation.mkdir /myprogs/ciftools cd /myprogs/ciftools tar xvzf /tmp/ciftools_Linux.tar.gzYou will probably want to create shortcut to access the program(s). See Command-line shortcuts, below.
SGI (IRIX)
Download: ftp://ftp.ncnr.nist.gov/pub/cryst/cif/ciftools_SGI.tar.gzFor SGI, the CIFEDIT & pdCIFplot programs are distributed as a compressed tar file that can be installed in any convenient directory. The commands to install will work something like this:Prerequisites: none
The SGI distribution includes a version of Tcl/Tk that will run on all releases of IRIX 6.5 (I hope) and includes libraries for the BWidgets enhancements and the BLT graphics package. Substitution of versions of Tcl/Tk and BLT that have been compiled specifically for your version of Linux may be preferable (or required for earlier versions of IRIX). Some old notes on compiling Tcl/Tk can be found here. The BWidget package can be readily located and does not need compilation.mkdir /myprogs/ciftools cd /myprogs/ciftools gunzip < /tmp/ciftools_SGI.tar.gz | tar xvf -You will probably want to create shortcut to access the program(s). See Command-line shortcuts, below.
Mac OS X
Download: ftp://ftp.ncnr.nist.gov/pub/cryst/cif/ciftools.dmgThe Mac OS X distribution is a compressed disk image ( ciftools.dmg ) file. Mount this file by double-clicking on it. This should create a new volume in your top-level ("Computer") called "CIFvol"; clicking on this device will open a finder window with a single folder ("ciftools") present. (Note that some browsers will automatically perform this mount step for you.)Prerequisite: X11 (or the Aqua Tcl/Tk release)
The CIFEDIT and pdCIFplot programs require a Tcl/Tk interpreter. The pdCIFplot program also requires that the BLT graphics package for Tcl/Tk be installed. Tcl/Tk is available in two versions for OS X, an Aqua version and a X11 version. The X11 version of Tcl/Tk with BLT is included with the ciftools.dmg release of this package. The CIFEDIT program should run under either the Aqua or X11 version of Tcl/Tk (but has only been tested with the X11 version). The pdCIFplot program can run only with the X11 version of Tcl/Tk, as BLT is not available for Aqua. Subsequent instructions, assume that you will use the X11 version of Tcl/Tk. Note that the AppleScript for CIFEDIT will require changes to work properly with the Aqua version of Tcl/TkInstalling X11 for 10.2
For 10.2 (Jaguar), this is a bit complex to explain, so you will need to do some searching on the web, find a guru or consult one of the many Mac OS X books that cover this subject.
Installing X11 for 10.3
For 10.3 (Panther), Apple bundles a version of X11 with the OS and installing can be very simple. It can be installed directly from CD-ROM #3 of the OS X distribution CD disks. To install X11, insert CDROM #3, then click on the Packages folder and within that folder, click on X11User.pkg. Read the installation screens, click on the "next" button a few times, and X11 is installed.X11 for 10.3 can also be downloaded from Apple (http://www.apple.com/macosx/features/x11/download/).
If you have a PowerBook that shipped with 10.3, you may have your OS X distribution on two DVDs, so you don't have CDROM #3. While Apple technical support does not appear to know this (or at least they did not, when I called), you can find the X11 package in a folder hidden on the DVD. Use the finder Go/"Go to folder" (shift-command-G) menu item to open hidden folder /Volumes/PowerBook Software/System on the first Powerbook software DVD; then double-click on the Installation folder to open it and then open the Packages folder. (Yes, you could have typed /Volumes/PowerBook Software/System/Installation/Packages, but why buy a Mac if you like to type long names?). Finally, double-click on the X11User.pkg file and X11 is installed. Just like that!
While you can run CIFEDIT & pdCIFplot directly from the compressed disk image, you are strongly suggested to instead copy the entire package to your computer by dragging the gsas folder icon to another finder window, or by clicking on it and using Copy and Paste.
Install a "shortcut" to launch CIFEDIT or pdCIFplot
The OS X version of CIFEDIT or pdCIFplot AppleScript applications to help run the applications. This AppleScript will start X11, if needed and then lauch the appropriate program. The AppleScript can be used in three ways:
- Double-clicking on the icon for the Applescript will launch the selected program, which will start with a "file open" window in your home directory. This window can then be used to navigate to access/create CIFs in other folders.
- Dropping one or more icons for CIF files onto the Applescript icon will cause the files to be opened. If more than one file is dropped, each file will open in a separate program session.
- Dropping one or more folders onto the AppleScript icon will cause the program to be started with the "file open" window in that folder.
If you will use either of these programs a fair amount, you will likely find it convenient to drag the AppleScript icon to the dock for easy access.
Note, that these apps will not work correctly the AppleScript alone is copied or moved to another folder. The AppleScript must be located in the same folder with the ncnrpack-osx file and various .tcl files. You can instead create an alias (by highlighting the AppleScript icon in the Finder and using the File/"Make alias" menu item or the Command-L shortcut). An alias created in this fashion can be moved wherever desired -- for example, to the desktop or to the Application folder.
For Unix power users: Make a command line shortcut (optional)
People who have not become completely enlighted to the Mac may wish to set up a way to type something (gasp!) in a terminal window that will allow them to start either program. See Command-line shortcuts, below. Also, on the Mac it is possible to add applications to the X11 Applications menu, by using the Applications/Customize menu option.
Other Operating Systems
Download: ftp://ftp.ncnr.nist.gov/pub/cryst/cif/ciftools.tar.gz
or ftp://ftp.ncnr.nist.gov/pub/cryst/cif/ciftools.zipThe software should work on all other operating systems where Tcl/Tk 8.2 or later are available. For pdCIFplot, BLT is required, where various 2.4 versions have been tested. Note that new releases of BLT tend to break older software. Help cannot be provided with the installation of Tcl/Tk or BLT.Prerequisites: Tcl/Tk & BLT
The CIFEDIT and pdCIFplot programs require that the Tcl/Tk environment be installed. This software is available for virtually all modern (and some not-so-modern) operating systems. The pdCIFplot program also requires that the BLT graphics package for Tcl/Tk also be installed. This package has not been ported to as many platforms as Tcl/Tk. Consult the Tcl/Tk web pages for more information on these packages. The BWidget package is needed as well, but this package is included with the distribution files for the CIFTOOLS.For Unix, the CIFEDIT & pdCIFplot programs are distributed as a compressed tar file that can be installed in any convenient directory. For other platforms, the ZIP compressed file may be easier to use. Alternately, the distribution could be expanded and then copied. If problems are encountered with the CIFTOOLS programs, after Tcl/Tk has been verified to function, please contact the author.
Command-line shortcuts
Note that in the commands below, it is assumed that CIFTOOLS has been installed in /myprogs/ciftools. Also, note that in the commands below, ^D means control-D.1.1 Installing an alias for CIFEDIT/pdCIFplot
One way to create a easy way to invoke CIFEDIT/pdCIFplot is to add an alias to your default shell. First, determine what shell you are using.
Type
echo $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 cifedit "/myprogs/ciftools/tcltk84+ /myprogs/ciftools/cifedit.tcl" alias pdCIFplot "/myprogs/ciftools/tcltk84+ /myprogs/ciftools/pdCIFplot.tcl" ^D- If you use bash:
- to add an alias to your ~/.bash_profile, type these commands (change /myprogs as needed):
cat >> ~/.bash_profile alias cifedit="/myprogs/ciftools/tcltk84+ /myprogs/ciftools/cifedit.tcl" alias pdCIFplot="/myprogs/ciftools/tcltk84+ /myprogs/ciftools/pdCIFplot.tcl" ^D1.2 Installing CIFEDIT/pdCIFplot in the path
Another way to simplify access to CIFEDIT/pdCIFplot 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 cifedit/pdCIFplot command in your path by typing:which cifedit which pdCIFplotYou should get a response "cifedit (or pdCIFplot) not found in...". A response of /usr/bin/cifedit tells you there is already a shortcut to cifedit in that location. Either replace it or choose a name other than cifedit/pdCIFplot.The commands to create this executable file will be:
cat > /usr/bin/cifedit /myprogs/ciftools/tcltk84+ /myprogs/ciftools/cifedit.tcl $* ^D chmod +x /usr/bin/cifedit(change /myprogs and /usr/bin as needed). Note that this step (1.2) is incompatible with the one below (1.3).1.3 Linking CIFEDIT/pdCIFplot into the path
Another way to simplify access to CIFEDIT/pdCIFplot 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 cifedit.tcl and/or pdCIFplot.tcl script from
exec wish "$0" "$@"toexec /myprogs/ciftools/tcltk84+ "$0" "$@"(change /myprogs as needed). Then you will create a link using: ln -s /myprogs/ciftools/cifedit.tcl /usr/bin/cifedit ln -s /myprogs/ciftools/pdCIFplot.tcl /usr/bin/pdCIFplot Note that this step (1.3) is incompatible with the one above (1.2).The author of the CIFTOOLS programs is a U.S. Government employee, which means that the codes are not subject to copyright. Have fun with them. Modify them. Please add new features and make them available to the rest of the world. Incorporate them into other software.
Neither the U.S. Government nor the 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 herein are used for identification purposes and do not constitute an endorsement by NIST.
Comments, corrections or questions: crystal@NIST.gov
Last modified 25-February-2005 $Revision: 1.2 $ $Date: 2003/12/29 23:32:24 $