CIFs are now being published on line in the
IUCr journals
(see for example
Acta Cryst. Volume C53. part 6 (June 1997).
Currently these CIF files are
transmitted with a MIME type of "text/plain", but moves are afoot to
change this and add a new MIME type: "chemical/x-cif"
The following two files provide a means of adding CIF viewing to your Netscape browser. Provided you have Cif-browsing software available - such as Xtal_GX for example. For this solution to work, you also need the Tcl/Tk toolkits installed
cif_filter.tcl
... a Tcl/Tk script initiated by Netscape
filesel.tcl
... an auxilliary Tcl/Tk file required by cif_filter.tcl
# (1) copy the cif_filter.tcl to $HOME/.netscape/cif_filter.tcl # (2) make scipt executable: chmod +x $HOME/.netscape/cif_filter.tcl # (3) copy filesel.tcl to $HOME/.netscape/filesel.tcl
# (4) start netscape # click to "Options/General_Preferences/Helpers/New" # so as to add another MIME Configuration type by entering.... # # "Description" as Crystallographic Information file # "Type" as text/plainWarning : text/plain is the buggy bit. Having done this you may find that Netscape fires up cif_filter.tcl when you least expect it! (hopefully you will find this bearable until the new MIME type is officially instigated)
# "Suffix" as cif # # and in "Handle By" click "Application" and then "Browse" # in the Directories list click"/.netscape" # in the Files list click "cif_filter.tcl" # in the Selection window append " %s" <<<<< Important # # and then hit "OK" "OK" on successive windows.
This is the tricky part.
cif_filter.tcl works by filtering the input CIF to obtain a list of data_blocks. It highlights those data blocks in the text and when they are selected (by clicking with a mouse button) it copies the current version of the loaded cif to a temporary file, the name of which is passed, along with a block number to an external CIF viewer. It spawns an external command of the form:
command -b number filenameYour job is to make sure that the "command" is correct.
set defaultCommand "$env(HOME)/.netscape/cif_xtal"(supposedly there is on line editing of this command but that is untested)
If you are viewing CIFs with Xtal or Xtal_GX on a UNIX workstation, you will also need to obtain the following Bourne shell CIF preprocessor: cif_xtal
# (1) copy the cif_xtal to $HOME/.netscape/cif_xtal # (2) make scipt executable: chmod +x $HOME/.netscape/cif_xtal
You will need to modify several vaiables in this script file for local Xtal installations. They are contained near the beginning of cif_xtal
######################################################################### # variables which will need to be set for local conditions # PATH=/util/Xtal:$PATH # make sure the PATH to the XTAL directory is known EXECUTABLE=xtal_3.5 # the name of the executable # # Define environment variable pointing to directory of Xtal auxilliary files XTALHOME=/util/Xtal/aux/ # trailing slash required!! # # define a directory to run xtal and where all scratch (etc) files appear LOCALDIR=$HOME/.netscape/xtal #########################################################################
(Hopefully a future version of this script, written in tcl/tk will permit online editing of the XTAL commands to be executed, but this version doesn't)
Good Luck!
Mail any feedback to
xtal@crystal.uwa.edu.au