| 1 |
Bruce Ravel |
| 2 |
<[email protected]> |
| 3 |
Time-stamp: <2001/01/18 21:43:55 bruce> |
| 4 |
|
| 5 |
|
| 6 |
This is the README file for atoms.cgi -- the version of Atoms intended |
| 7 |
to run on the web. There is no automatic installation procedure |
| 8 |
because there are several things that the web administrator must take |
| 9 |
care of which depend on the specific configuration of the server. It |
| 10 |
seems easier to me to just have you directly edit atoms.cgi rather |
| 11 |
than use some silly little interactive configuration tool. |
| 12 |
|
| 13 |
1. Make sure that Atoms is installed on the server and that it works. |
| 14 |
In fact, it is not important that atoms.pl or tkatoms.pl actually |
| 15 |
be installed. atoms.cgi does not call either of those programs. |
| 16 |
What is important is that all of Atoms's library files be installed |
| 17 |
correctly. If you can run atoms.pl or tkatoms.pl, then all of the |
| 18 |
library files are well installed. If you have not installed Atoms, |
| 19 |
you should go ahead and do so. Don't forget to install the |
| 20 |
AtomsBundle (on NT the files in the AtomsBundle are included with |
| 21 |
the Atoms distribution itself). |
| 22 |
|
| 23 |
2. Take a look at the file atoms.cgi. Near the beginning are some |
| 24 |
variables that need to be set appropriately for your web server. |
| 25 |
They are: |
| 26 |
|
| 27 |
$extra_INC if Atoms is installed somewhere outside of the |
| 28 |
default search path for perl modules, then set |
| 29 |
this variable to that location. The variable |
| 30 |
is unshifted to @INC when atoms.cgi starts |
| 31 |
|
| 32 |
$atoms_help this takes the URL to the place where you will |
| 33 |
install the file WebAtoms_help.html. |
| 34 |
|
| 35 |
$ADB_search the URL of the Atoms Database search form |
| 36 |
|
| 37 |
$ADB_directory this takes the actual location (not the |
| 38 |
location relative to the server's root) on the |
| 39 |
server disk where input files may be found. |
| 40 |
The purpose of this is so that atoms.cgi can |
| 41 |
be on the back end of a search CGI script. |
| 42 |
|
| 43 |
3. Put atoms.cgi in a place where your web server knows to look for |
| 44 |
CGI programs. Make sure it is executable. |
| 45 |
|
| 46 |
4. Put WebAtoms_help.html in the place indicated by the $atoms_help |
| 47 |
variable. You can use the copy on my web page |
| 48 |
http://feff.phys.washington.edu/~ravel/software/atoms/doc/WebAtoms_help.html |
| 49 |
but I would rather that you install a copy on your own server. |
| 50 |
|
| 51 |
5. Run atoms.cgi once by hand from the command line like this: |
| 52 |
atoms.cgi -install |
| 53 |
This sets up the set of hard links to the script which are used |
| 54 |
to serve up the correct file names when the client clicks the |
| 55 |
"save-as" button. |
| 56 |
|
| 57 |
6. If you encounter problems, there are two things that you could |
| 58 |
include in a bug report that would greatly improve my chances of |
| 59 |
solving the problem. (1) Any relevant lines from the server log |
| 60 |
and/or error files. (2) Save the page where you entered input data |
| 61 |
as a flat text file and mail me the text file. |
| 62 |
|
| 63 |
|
| 64 |
Calling this CGI script directly will serve up a page with a blank |
| 65 |
fill-in form. You can import data from a file in $ADB_directory with |
| 66 |
a URL like this: |
| 67 |
http:/what.ever/path/to/atoms.cgi?file=foo.inp |
| 68 |
In that case, the form will be filled in with data from the specified |
| 69 |
input file. |
| 70 |
|
| 71 |
This CGI script has only been tested with Apache. Please let me know |
| 72 |
how things work with other servers. |
| 73 |
|
| 74 |
---------------------------------------------------------------------------- |
| 75 |
|
| 76 |
Here is how atoms.cgi is intended to work: |
| 77 |
|
| 78 |
1. First time called it should display a fill-out form for entering |
| 79 |
all the data. The page has this structure: |
| 80 |
|
| 81 |
+-----------------------+ |
| 82 |
| header information | |
| 83 |
+-----------------------+ |
| 84 |
| warning area | |
| 85 |
+-----------------------+ |
| 86 |
| data form | |
| 87 |
+-----------------------+ |
| 88 |
| trailer information | |
| 89 |
+-----------------------+ |
| 90 |
|
| 91 |
The warning area should be blank initially. The data form should |
| 92 |
be empty, unless data import has happened, in which case many of |
| 93 |
the entry widgets will be filled. The header contains the html |
| 94 |
headers, and a brief explanation of the page. The trailer |
| 95 |
contains copyright information, some links, and closing tags. The |
| 96 |
form has lots of links to a help file on it. |
| 97 |
|
| 98 |
2. If any trapable errors are encountered, the form will be |
| 99 |
redisplayed with state completely saved. The warning area will be |
| 100 |
filled with red text explaining the problems. |
| 101 |
|
| 102 |
3. If the calculation can proceed, then the browser will be |
| 103 |
redirected to the appropriate symbolic link with the complete |
| 104 |
query list in the URL. This will display the chosen output as |
| 105 |
text/plain and the default "save-as" name will be appropriate. If |
| 106 |
there were any warnings that did not preclude continuing the |
| 107 |
calculation, they are written to the top of the output file. |