7.1. Input data for Feff

7.1.1. Starting from a conventional feff.inp file

FEFF is, let's face it, a bit long in the tooth. It requires that its instructions be contained is a rather rigidly structured textual input file. The keywords of the file are called “cards” in the FEFF documentation – a word whose etymology probably escapes FEFF's younger users.

DEMETER goes through some serious gymnastics in an attempt to hide FEFF's clunky interface. The need for an input file is unavoidable and DEMETER does, in fact, read in and write out feff.inp files repeatedly. It does so, however, in a stealthy way that should require the attention of the programmer using DEMETER only at the very beginning of the process.

Creating a Feff object and populating it with the contents of a feff.inp file is done in a way that should be quite familiar at this point:

1
2
3
4
5
 #!/usr/bin/perl
 use Demeter;

 my $feff = Demeter::Feff -> new(file => "feff/feff.inp");
 $feff->set(workspace=>"feff/", screen=>0);

Because FEFF is heavily dependent on disk-based IO to do its work, you must specify a workspace. This is a directory on disk where the various files that FEFF needs to do its business can be written. In the example that will be running through this section, that workspace is a subdirectory called feff/.

The screen attribute is a boolean which will suppress the messages that FEFF would normally write to standard output when set to 0.

When the file attribute is set, that input file will be parsed and its contents stored as attributes of the Feff object. At this point, the new Feff object is fully instrumented and ready to start being used for interesting work.

7.1.2. Starting from an Atoms object

If you are running FEFF on a crystalline material for which you have an atoms.inp or CIF file, then DEMETER also allows you to skip the step fo explicitly writing the feff.inp file. Insetad of setting the file attribute of the Feff object, you can set the atoms attribute to an Atoms object. The feff.inp still gets generated, but it is done behind the scenes using a temporary file that is quickly discarded.

1
2
3
4
5
6
 #!/usr/bin/perl
 use Demeter;

 my $atoms = Demeter::Atoms -> new(file => 'atoms.inp');
 my $feff = Demeter::Feff -> new(atoms => $atoms);
 $feff->set(workspace=>"feff/", screen=>0);

When the atoms attribute is set, the feff.inp file is created, parsed, then deleted. Its contents are stored as attributes of the Feff object. At this point, the new Feff object is fully instrumented and ready to be used for interesting work.

This approach is convenient in any situation for which you do not need to modify FEFF input data in any way from the form that the ATOMS calculation generates. In that situation, this approach to FEFF is identical in every way to starting from a feff.inp file.

7.1.3. Starting from a molecular structure file

Todo

Integration with OpenBabel so that other cluster file formats can be used directly as input to FEFF.




DEMETER is copyright © 2009-2016 Bruce Ravel – This document is copyright © 2016 Bruce Ravel

This document is licensed under The Creative Commons Attribution-ShareAlike License.

If DEMETER and this document are useful to you, please consider supporting The Creative Commons.