next up previous contents
Next: Other Command Line Tools Up: ATOMS 3.0 Documentation Previous: Customization and Localization

Subsections

   
Using the Command Line Version

The stand-alone version of ATOMS, 'atoms.pl', is intended to be run from a command line and behaves very similarly to the Fortran version of ATOMS. Specifically, any input files that you used with the Fortran version can be used with this version.

To use this version of ATOMS, just type atoms.pl at the command line. If there is a file called 'atoms.inp' in the current directory, it will be read and used to generate output. Alternately you specify any file name in any directory by explicitly mentioning it as an argument on the command line:

atoms.pl other_file.inp
You can read from standard input by giving '-' as the filename. This reads input until the end of the redirected file or until you type ^D.
cat some_file | atoms.pl -
You can also use command line switches as described in Section [*]. This example:
atoms.pl -pF other_file.inp
tells ATOMS to write a P1 file using the data in a specific file, but not to write a 'feff.inp' file.

   
The ATOMS Input File

The input files for ATOMS is a loosely formated flat text file. Most of the file consists of keyword/value pairs, such as

        rmax = 5.0
Keywords are separated from values by whitespace, commas, and equals signs. The exact definition of what separated keywords and values is ``zero or more tabs or spaces; followed by a single comma, equals sign, tab or space; followed by zero or more tabs or spaces.'' As a regular expression this is [ \t]*[ \t=,][ \t]* .

The last keyword in the file must be atoms, which tells ATOMS that the list of unique coordinates begins on the next line. Everything after the keyword atoms is assumed to be part of the unique coordinates list and any keywords appearing after atoms will not be interpreted correctly.

Here is an example of an input file for superconducting yttrium barium copper oxide:

     title YBCO: Y Ba2 Cu3 O7
     space P M M M
     rmax=5.2              a 3.823   b 3.886 c 11.681
     core=cu2
     atoms
       Y       0.5      0.5     0.5
       Ba      0.5      0.5     0.184
       Cu      0        0       0        cu1
       Cu      0        0       0.356    cu2
       O       0        0.5     0        o1
       O       0        0       0.158    o2
       O       0        0.5     0.379    o3
       O       0.5      0       0.377    o4

   
Complete List of Keywords

# % ! *
Comment characters. Anything on a line after one of these characters will be ignored by ATOMS.

atoms
This keyword marks the end of the keyword/value pairs and tells ATOMS that the list of unique atomic coordinates begins on the following line. This list must be formatted in columns. The first column contains the two letter element symbol of the atom occupying the site. The next three columns are the x, y, and z coordinates expressed as fractions of the a, b, and c axis lengths. The optional fifth column contains a tag which is used to uniquely identify the site. The tag in the fifth column is used as the value of the core keyword. The coordinates can be numbers or simple math expressions like 1/2 or 0.5+0.02.

a
The length of the a lattice constant in Ångstroms.

b
The length of the b lattice constant in Ångstroms. If not specified, this is set to be equal to a.

c
The length of the c lattice constant in Ångstroms. If not specified, this is set to be equal to a.

alpha
The angle between the b and c axes in degrees. If not specified, this is set to be equal to 90 degrees.

beta
The angle between the a and c axes in degrees. If not specified, this is set to be equal to 90 degrees, unless the space group is rhombohedral, in which case it is set equal to alpha.

gamma
The angle between the a and b axes in degrees. If not specified, this is set to be equal to 90 degrees, unless the space group is rhombohedral, in which case it is set equal to alpha, or hexagonal or trigonal, in which case it is set to 120 degrees.

title
User supplied title lines which may be copied to the output files. Everything on the line following this keyword is is considered to be part of the title line. Keywords which appear after title will not be interpreted as keywords. These two words are synonyms and may be used interchangeably. comment is a synonym for title.

rmax
The radial size of the atomic cluster written to the output files. If not specified, the default value is 7 Ångstroms or 1.1 times the length of the shortest axis, whichever is longer.

core
The tag of the central atoms. This must be specified unless the atom list only contains one atom. These two words are synonyms and may be used interchangeably. central is a synonym for core.

edge
The symbol of the absorption edge. If not specified, this is set to K for elements lighter than lanthanum and L3 for heavier elements.

output
Used to specify the file type and file name of an output file. This keyword may be used any number of times in an input file. The syntax is
        output    type    filename
where type is the name of a valid atp file without the file extension. filename will be the name to which the output file is written. An example:
        output    feff8    my_feff8_file.inp
See Chapter [*] for more details about available output file types.

shift
This takes three numbers specifying the vector needed to shift a set of unique coordinates to the correct origin as used in the International Tables of Crystallography. The syntax is
        shift    x     y     z
The shift coordinates can be numbers or simple fractions like 1/2 and 2/3. See Section [*].

nitrogen, argon, krypton
These keywords take the volume percentages in the I0 chamber of these gasses. Specifying one or more of these tells ATOMS to calculate the self-absorption and I0 corrections along with the McMaster correction. By default these are all 0 and the two additional corrections are not made.

feff, feff8, p1, geom, unit
These are boolean keywords and take either true or false. When true, they tell ATOMS to write that type of output file to the default filename. These are included for backwards compatibility to the old Fortran version of ATOMS and are considered to be obsolete. Use the output keyword or the command line switches (see Section [*]) instead.

The following keywords were recognized by the Fortran version of ATOMS and are now deprecated.

          fdat feout nepoints xanes modules message
          noanomalous self i0 mcmaster dafs qvec
          reflections refile egrid index corrections
The functionality of several of these keywords has been subsumed by the atp files (see Chapter [*] and Appendix [*]). The keywords having to do with DAFS are either handled by the programs written to do the DAFS simulations. A few of these options were simply discarded.

The old Fortran version of ATOMS allowed the user to specify a basis list rather than an atoms list. That is, the sodium chloride structure, for example, could be expressed as FCC with a two atom basis. I found basis lists rarely to be useful and dropped support for them in the new version of ATOMS.

A keyword completion algorithm is used to interpret the keywords. Thus sh will be recognized as shift. However g is ambiguous as it could complete to gamma or geom.

When the input file parser encounters an unknown keyword, it and its value are both silently ignored. Unknown keywords are presumed to take only a single value. Although this may lead to user-confusion, it allows the parser to be sufficiently flexible to allow new programs to use the same parser, the same input files, and new keywords.

The algorithm for interpreting small math expressions in the atoms list is handy, but rather weak. The math expressions cannot have white spaces and must be valid perl syntax since they are evaluated as such. The math expression is taint checked, so an input file probably cannot hide a Trojan horse.

   
Command Line Switches

There are several command line switches which can be used to control the behavior of ATOMS from the command line. Command line switches can be clustered, for example atoms.pl -psF is the same as atoms.pl -p -s -F.

-f
Write an output file for FEFF6. -6 and -7 are synonyms for -f. It will be called 'feff.inp'.

-8
Write an output file for FEFF8. It will be called 'feff.inp'.

-p
Write a P1 output file. It will be called 'p1.inp'.

-u
Write a unit cell output file. It will be called 'unit.dat'.

-g
Write a 'geom.dat' file. It will be called 'geom.dat'.

-s
Write a file listing the symmetry operations of the space group. It will be called 'symmetry.dat'.

-a
Write a coordinate file in the alchemy format It will be called 'alchemy.dat'.

-x
Write a coordinate file in the xyz format. It will be called 'xyz.dat'.

-O
Write all output to STDOUT. You may want to use the -q switch to suppress normal run-time messages.

-t ...
-o ...
These are used together to specify a file type and file name form the command line.
      atoms.pl -t feff -o foo.inp
will write a FEFF6 output file and call it 'foo.inp'. This can be used also with user-defined atp files.
      atoms.pl -t my_atp -o foobar.dat
will write an output file using the user-supplied 'my_atp.atp' file and call it 'foobar.dat'.

You may use the -o switch alone to redirect the output to a filename of your choice, however you should be aware that its use is ambiguous in some situations. If you are generating only one output file, then that file will be called by the value of the -o switch. If you are generating multiple output files from a single run of ATOMS, then the first file generated will be called the name given by the -o switch. The ambiguous part is that the order in which the output files are generated is unpredictable. This is due in part to the variety of ways of specifying output and in part to the data structure used in the code to store this infomration. If you are making many output files in a single run, it is probably a poor idea to use the -o switch.

-F
Suppress the writing of an input file for FEFF.

-T
Write a diagnostic file for testing ATOMS. This is also useful when reporting a bug.

-r #

Supply a value for rmax from the command line.

-c tag

Specify the central atom from the command line using a tag from the atoms list.

-q
Suppress run-time messages (i.e. run in quiet mode).

-v
Write version information to standard output and exit immediately.

-h
Write a brief help message to standard output.


next up previous contents
Next: Other Command Line Tools Up: ATOMS 3.0 Documentation Previous: Customization and Localization

2001-01-14