Slight revision:

1) It's a ZIP file. You can name it anything you want using the WRITE
command. Perhaps someone else can adjust the save dialog to allow for this.

2) Two options:

   write ZIP "xxx.yyy"

or

   write ZIPALL "xxx.yyy"

The difference is that ZIP will include local files only, not remote files,
but ZIPALL will copy remotely accessed files as well so that ALL the files
you could possibly need will be there. Of course, if you plan to have
signed-applet or application capability, ZIPALL is not necessary.

3) The default extension is ".jmol", implying ZIPALL:

   write "myfile.jmol"


4) The model is loaded using

  load "xxx.yyy"

or just by dropping it into Jmol. (Jmol recognizes "JmolManifest" in the ZIP
file directory listing.)

5) The collection includes also a JPG, an SPT, and a file "JmolManifest.txt"
which instructs Jmol what to do when the file is loaded (run the script).
The JPG and SPT files have the same file root as the ZIP file. The JPG
contains a copy of the script in it, so it can be used instead of the SPT
file if desired. I've left the SPT file in there, because it's readable and
modifiable; the JPG would take special software to modify the script it
holds.

6) Both the SPT and JPG files work with the SCRIPT command either from
within the ZIP file or after unzipping.

7) To make that work, we have a new file prefix, $SCRIPT_PATH$, which
instructs Jmol to find the file relative to the path that the current script
is being read from. Conveniently, this path can include paths INTO zip
files, so that is what is happening here when the files are part of a ZIP
file collection.

8) Interestingly, $SCRIPT_PATH$ could be anywhere in any script file now,
and it will be changed to the directory name of the script file just before
the script is compiled. So, for example, if in a script you use:

  set defaultDirectory "$SCRIPT_PATH$"

or

  cd "$SCRIPT_PATH$"

then files (from then on!) will be read relative to the directory containing
the script file. That could be useful elsewhere, I think.

9) Definitely needs testing and comment.

Bob

-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to