next up previous contents
Next: APT.PL Up: ATOMS 3.0 Documentation Previous: Using the Tk Version

Subsections

   
Serving and Using the Web Version

WebATOMS is the version of ATOMS written to be a CGI application, i.e. it is served over the web and the interaction between the user and the program is via a web browser such as Netscape or Internet Explorer. In this Chapter, I explain how to install WebATOMS on your own web server and give a brief description of its use by a client.

   
Installing and Configuring WebATOMS

This section explains how to set up WebATOMS to run on your web server. That means that you administer a computer which is used to serve content to the World Wide Web. If you are only interested in using WebATOMS by connecting your web browser to a site that that offers WebATOMS, then you can skip ahead to Section [*].

I am assuming that you have a web server correctly configured to run CGI scripts. I am also assuming that you have perl installed on that computer and that perl is available for use by your CGI scripts. If you are using APACHE, you should look into installing mod_perl. There is a lot of overhead at start-up as WebATOMS loads various modules and databases into memory. If you anticipate any significant level of traffic on your site, mod_perl will help apache and WebATOMS run more efficiently. Similarly, if you are running Microsoft's IIS, you should look into installing PerlScript from ActiveState. Other web servers may offer similar abilities for embedding a perl interpreter in the running web server. I recommend you look into it.

Here are the steps to installing WebATOMS on your server. Please note that I have only installed WebATOMS on a Linux machine running APACHE. Some parts of the instructions might be different for other systems and/or servers.

1.
Install the ATOMS package on the server. WebATOMS is its own program and does not require either 'atoms.pl' or 'tkatoms.pl' to run correctly. It does, however, make use of all the same modules and databases as the other versions of ATOMS. If ATOMS and TkATOMS are working correctly on the server, then WebATOMS is very likely to work also. Don't forget also to install the Atoms Bundle as described in Chapter [*].

2.
You need to edit the values of four variables in the file 'atoms.cgi', which is found in the 'cgi' subdirectory of the ATOMS distribution. These four variables have to be set to correctly reflect the configuration of your server. They are
$extra_INC
If Atoms is installed somewhere outside of the default search path for perl modules, then set this variable to that location. The variable is unshifted to @INC when 'atoms.cgi' starts.
$atoms_help
This takes the URL to the place where you will install the file 'WebAtoms_help. html'.
$ADB_search
The URL of the ATOMS Database search form, assuming you have a copy of the ATOMS Database on your server. If not, set this variable to 0.
$ADB_directory
This takes the actual location (not the location relative to the server's root) on the server disk where input files may be found. The purpose of this is so that 'atoms.cgi' can be on the back end of a search CGI script.

3.
Put 'atoms.cgi' in a place where your web server knows to look for CGI programs. Make sure it is executable.

4.
Put 'WebAtoms_help.html' in the place indicated by the $atoms_help variable. You can use the copy on my web page
http://feff.phys.washington.edu/~ravel/software/atoms/doc/WebAtoms_help.html
but I would rather that you install a copy on your own server.

5.
Run 'atoms.cgi' once by hand from the command line like this:
atoms.cgi -install
This sets up the set of hard links to the script which are used to serve up the correct file names when the client clicks the ``save-as'' button. Note that these symbolic links have names that might conflict with files that you want to place in the same disk space as 'atoms.cgi', for example 'atoms.inp' and 'feff.inp'. Sorry.

If you encounter problems, there are two things that you could include in a bug report that would greatly improve my chances of solving the problem. (1) Any relevant lines from the server log and/or error log. (2) Save the page where you entered input data as a flat text file and mail me the text file. The second thing will allow me to attempt to reproduce the problem on my own computer.

WebATOMS is designed to interact nicely with other web applications. If you have ATOMS input files on your web server that you would like WebATOMS to read, you can call WebATOMS from another CGI script or from a static page using a URL like this:

        http:/what.ever/path/to/atoms.cgi?file=foo.inp
In that case, the form will be filled in with data from the specific input file.

   
Using WebATOMS

This section documents the use of WebATOMS by a client connected to a site serving WebATOMS. All you need is a URL. One such location is
http://millenia.cars.aps.anl.gov/cgi-bin/atoms/atoms.cgi.

The use of WebATOMS is very similar to the use of ATOMS and TkATOMS. If you have read and understood Chapters [*] and [*] then WebATOMS will be obvious. If not, I recommend that you read those chapters because here I will only outline the aspects of WebATOMS which differ from the other versions.

Figure [*] shows what WebATOMS looks like with Netscape. The first thing to notice is that all of the data needed by ATOMS has either a text field, a button, or a menubutton associated with it. The next thing to notice is that the label of every widget is a link. Clicking on that link will take you to the appropriate part of a web page explaining the purpose of each kind of input data. If you are confused, click on a label!



Figure [*]: The top half of the WebATOMS page as seen with Netscape, with data for AlB2 filled in as an example.
 

[WebATOMS in Netscape, top half]




Figure [*] shows the rest of the page from Figure [*]. In particular, you see that there is a list for specifying the element symbols, tags, and coordinates of each of the atoms. If you need more rows for specifying more atoms positions, enter the number you require in th box labeled with ``Redisplay with this many sites'' and then click the ``Do it!'' button. The page will be redisplayed without loosing data, but with more rows for site.

The menubutton labeled ``Output type'' lets you select from various different output formats. Most of the types discussed in Chapter [*] are in this menu. The menubutton labeled ``Edge'' allows you to explicitly select an absorption edge. If left blank the algorithm for selecting edges described in Section [*] will be used.

Once all the data has been entered correctly, click on the ``Run Atoms'' button. If all of the data is sensible and WebATOMS is able to run to completion, you output file will be presented as a plain text page suitable for downloading. If there is a problem in the data, the entry form will de redisplayed with some hints about what the problem was.



Figure [*]: The rest of the page shown in Figure [*].
 

[WebATOMS in
      Netscape, bottom half]




Finally there are buttons labeled ``Clear'' and ``Reset''. Pressing the ``Clear'' button will cause a blank page to be displayed. Pressing the ``reset'' button will return the page to the state of its most recent display or redisplay.


next up previous contents
Next: APT.PL Up: ATOMS 3.0 Documentation Previous: Using the Tk Version

2001-01-14