NAME

Ifeffit::Demeter::ScatteringPath - OO interface to scattering paths


VERSION

This documentation refers to Ifeffit::Demeter version 0.0.1


SYNOPSIS

   $sp_object -> new({feff=>$feff, string=>$string});
   $sp_object -> evaluate;

Those are the only two attributes provided to the object. Everything else is computed from those two.


DESCRIPTION

This object handles the abstract representation of the scattering path. This is part of Demeter's theory subsystem, unlike Ifeffit::Demeter::Path, which is part of Demeter's fitting subsytem. This object is used by Ifeffit::Demeter::Feff's path finder and just-in-time path calculator.

This object requires that a Feff object has already been created and fully populated. That is either done by the Feff object's rdinp method or in some other manner. These objects are created during the Feff object's pathfinder method. Once a tree of scattering paths is created from the Feff object's atoms list, the tree is traversed and a ScatteringPath object is made from each visitation of the tree. The tree is completely depopulated, transfering each ScatteringPath object to a heap. ScatteringPaths are removed from the heap and placed onto a well-ordered list of paths. As the list is created, the paths are collapsed by degeneracy.


ATTRIBUTES

Supplied attributes

feff

A reference to the Feff object from which this ScatteringPath was created.

string

A string denoting the route this path takes through the cluster. This string has a very specific form. The first and last tokens in the string represent the absorber and can be almost anything. A plus sign (+) is typical. Each intermediate token is the index in the Feff objects atoms list for that atom in the scattering path. The tokens are joined by dots. For example, a ScatteringPath that represents the path from the absorber to the 7th atom in the list to the 23rd atom in the list and back (a double scattering path) would have this string:

   +.7.23.+

These numbers are interpreted by referring to the Feff object contained in the feff attribute.

Computed attributes

nkey

This is a integer constructed from the atoms indeces that is used to sort the scattering paths in the heap a predictable manner.

beta

This is a reference to a list of beta angle in the path.

eta

This is a reference to a list of eta angle in the path.

nleg

This is the number of legs in the path, stored for easy reference.

halflength

This is the half path length of this path. This is the primary sorting criterion.

heapvalue

This is a value required by and used by the Heap algorithm. It is computed using the halflength class method from the Ifeffit::Demeter::Tools manpage.

n

This is the degeneracy of this path after the paths have been collapsed.

degeneracies

This is a reference to a list containing the string attribute of each ScatteringPath object that was collapsed into this one.

fuzzy

This is the fuzzy path length. It is set to the average of the lengths of the nearly degenerate paths. For truly degenerate paths, the half length and the fuzzy length will be the same.


METHODS

Accessor methods

get
set
Push

Evaluation methods

Once a ScatteringPath object if defined by the new method and given feff and string attributes, the object must be evaluated. For reasons of efficiency, the evaluation is not done automatically, so the example given for the evaluate method should become your common idiom for using this object.

evaluate

This method sets most attributes for the object based on the values of the feff and string attributes. It calls the remaining methods in sequence.

   $sp_object -> new({feff=>$feff, string=>$string});
   $sp_object -> evaluate;
compute_nleg

Determine the number of legs of this path and set the nleg attribute.

compute_halflength

Determine the half path length of this path and set the halfpath attribute. Note that the Ifeffit::Demeter::Tools::halflength class method is used to compute this.

compute_nkey

Compute the nkey from the atoms in this path and set the nkey attribute.

compute_beta

Compute the beta and eta angles for this path and set the beta and eta attributes.

Heap methods

These are two methods required by the Heap module.

heap

This is used to set and access the heapvalue attribute.

cmp

This is the comparison method used to order the items on the heap. It sorts first by half path length, then by nleg, then by the output of the betakey method, and finally by the nkey.

In practice this means that paths are ordered by increasing path length, then by increasing nleg. In the case of collinear paths, it is guaranteed that the single scattering paths will come before the doubles which will come before the triples. The sort by beta assures that forward scattering paths come before paths which scatter at other angles.

Finally, the nkey portion of the sort makes it clear which path from a degenerate set will be selected as the representative path. This sort is done in the order the atoms appear in the Feff object's atoms list. For example, for the single scattering from the first shell, the representative path will always be the one that scatters from the first atom from the first coordination shell to appear in the atoms list.

Convenience methods

feff

Returns the Feff object for this ScatteringPath.

nleg

Returns the nleg attribute.

nkey

Returns the nkey attribute.

halflength

Returns the halflength attribute.

intrplist

Compute the interpretation line from the string attribute. This looks something like this:

   [+] O_1    Ti_1   O_1    [+]


COERCIONS

When the reference to the ScatteringPath object is used in string context, it returns the interpretation string from the intrplist method.

When the reference to the ScatteringPath object is used in numerical context, it returns the half length of the path from the halfpath method.


DIAGNOSTICS


CONFIGURATION AND ENVIRONMENT

See the Ifeffit::Demeter manpage for a description of the configuration system.


DEPENDENCIES

The dependencies of the Ifeffit::Demeter system are in the DemeterBundle.pm file.


BUGS AND LIMITATIONS

Many features are not yet implemented:

  1. Degeneracy fuzziness in length and angle     (done)
  2. Correct computation of beta and eta angles   (in progress)
  3. Filter by non-zero eta angle                 ()
  4. Amplitude approximation                      ()
  5. paths.dat generation                         (done)
  6. polarization                                 ()
  7. changing species of an atom in a path        ()

And testing has been extremely limited.

Please report problems to Bruce Ravel (bravel AT anl DOT gov)

Patches are welcome.


AUTHOR

Bruce Ravel (bravel AT anl DOT gov)

http://cars9.uchicago.edu/~ravel/software/


LICENCE AND COPYRIGHT

Copyright (c) 2006-2007 Bruce Ravel (bravel AT anl DOT gov). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.