FEFF
Remote
Operation
By
Network
Interaction:
Calculate,
Archive,
Then
Email
This script, in its current form, is a bit of hackery intended to aid in making sequences of calculations using FEFF8, particularly when making them on a machine elsewhere on the internet. FROBNICATE is an automator and organizer of FEFF8 calculations.
By way of explaining what FROBNICATE does, I will give an example. Recently I became interested in hexagonal gallium nitride. I have access to good XANES and EXAFS data on this material, both at the Ga K edge. The XANES data is polarized data, thus measuring the anisotropy in the z direction. I wanted to make XANES calculations to compare to the data and EXAFS calculations to use as fitting standards for the EXAFS data. I also wanted to use FEFF8's self-consistent potentials for both the XANES and the EXAFS. I am interested in using machines other than the one on my desk for reasons of speed, memory, and convenience.
The XANES calculations can be particularly time consuming and repetitious because it is important to study the convergence of the calculation with respect to radial size of the cluster used. This means repeating the calculations in both polarizations with successively larger cluster sizes and comparing the results. Since the task of calculating self-consistent potentials is quite time consuming, I don't really want to repeat it for each radius. Instead, I want to compute potentials and phases once and XANES spectra repeatedly.
FROBNICATE is a mechanism for performing a sequence of calculations and organizing the output. It makes the computations with a eye towards conserving both time and disk space where ever possible. The basic idea is that you copy a specially marked-up FEFF input file to some remote machine. The special markup is code specially recognized by this script which contains instructions about the sequence of calculations. The script automatically generates input files suitable for each calculation requested and runs FEFF for each of them. Once all of the calculations are done, the script packs up all of the results into a tarred and gzipped archive and mails them back to the owner as a MIME encoded attachment.
This is not a very user-friendly application. Tough. It is functional and lightweight. And it allows one to run FEFF8 from a long way away without having to pay attention while it is running.
I imagine it would be possible to automate the front-end of FROBNICATE by writing a little shell script the uses rcp or scp to upload the template file, then uses rsh or ssh to run the script.
Although this script could be made to work on something other than Unix, it probably won't at this point. It makes heavy use of system calls and symbolic links.
FROBNICATE would have been a lot easier to write if FEFF did some things differently.
- The business of writing and rewriting input files is rather confusing. The logical structure of this program and its concept would be more transparent if FEFF were several small programs rather than one large program.
- This is not a GUI, but it is an UI. Specifically it is a wrapper program. It works by writing input files to disk and then making system calls to run FEFF on those input files. This is a situation where dealing with shared libraries seems more transparent. That would obviate the need to do IO and would eliminate the need to do system calls. Of course shared library interfaces have their own complexities, but this certainly seems like a good candidate for using them.
- If the remote machine and the home machine are of the same architecture, the same endian-ness, and use the same operating system, then the archive file that gets mailed back can be unpacked and any calculation, even an intermediate one, can be rerun. If, however, the machines are not the same, then it would be necessary to go back to the beginning and redo all the calculations. This is because the binary files are not transferable across platforms. For this reason, it is very important to set the final PRINT flag (the one for ff2chi) to 3 so that the ASCII `feffNNNN.dat' files get written to disk. If you do not do so, the EXAFS calculation will not be usable (because `feff.bin' is binary) and it will not be repeatable on the local machine (because `phase.bin' is binary).
You will need to have the following CPAN modules installed on your system. These are all available from CPAN (or via ActiveState's package manager) if they are not already installed on your system..
You can install these automagically using perl's CPAN module. At the command line, type
~> perl -MCPAN -e shell
then at the CPAN prompt, type these commands
cpan> install Compress::Zlib
cpan> install Archive::Tar
cpan> install libnet
cpan> install IO::Stringy
cpan> install MIME::Base64
cpan> install MIME::Tools
cpan> install Mail::Mailer

![[Created by XEmacs!]](http://cars9.uchicago.edu/~ravel/images/z_logo_xemacs.jpg)
![[Created with the Template Toolkit!]](http://cars9.uchicago.edu/~ravel/images/TT.gif)




