Input and output¶
odatse-XAFS module is a Solver
package that uses FEFF to calculate X-ray absorption spectra from the atomic position \(x\) and returns the deviation from the experimental XAFS spectra as \(f(x)\).
In this section, the input parameters, the input data, and the output data are explained.
The input parameters are taken from the solver
entry of the Info
class.
The parameters are specified in [solver]
section when they are given from a TOML file.
If the parameters are given in the dictionary format, they should be prepared as a nested dict under the solver
key.
In the following, the parameter items are described in the TOML format.
The input data consist of target reference data, and templates of the input file for FEFF.
The output data are the output files and log files generated by feff85L
of FEFF.
Their contents will be shown in this section.
Input parameters¶
Input parameters can be specified in the subsections config
, param
, reference
in solver
section.
[solver
] section¶
dimension
Format: integer
Description: Number of parameters. It must be specified either in the solver section of in the base section. When both specified, the value in the solver section is used. The value should be equal to the length of
string_list
.
[solver.config
] subsection¶
feff_exec_file
Format: string (default: “feff85L”)
Description: Path to FEFF solver.
feff_input_file
Format: string (default: “feff.inp”)
Description: Input file for FEFF solver. For
feff85L
, it is fixed tofeff.inp
.feff_output_file
Format: string (default: “chi.dat”)
Description: Output file for X-ray absorption spectrum among FEFF output files. For
feff85L
, it is fixed tochi.dat
.feff_template_file
Format: string (default: “template.txt”)
Description: Template for the input file of FEFF.
remove_work_dir
Format: boolean (default: false)
Description: If it is set to true, the work directories
Log%%%%_####
will be removed after the calculation.use_tmpdir
Format: boolean (default: false)
Description: If it is set to true, the output files of FEFF will be written in a temporary directory in /tmp (or in the directory specified by the environment variable
TMPDIR
). It is automatically removed after the calculation.
[solver.param
] subsection¶
string_list
Format: list of strings. The length should match the value of dimension (default: [“value_01”, “value_02”]).
Description: List of placeholders to be used in the reference template file to create the input file for the solver. These strings will be replaced with the values of the parameters being searched for.
polarization_list
Format: list that consists of three strings.
Description: List of placeholders for the polarization vector to be used in the reference template file.
polarization
Format: list of lists that consist of three floats.
Description: List of polarization vectors.
calculated_first_k
Format: float
Description: Lower end of the range of wave length in which the calculated values and the experimental data are compared.
calculated_last_k
Format: float
Description: Upper end of the range of wave length in which the calculated values and the experimental data are compared.
k_range
Format: list of floats
Description: The range of wave length specified by a list in the form [lower value, upper value] in which the calculated values and the experimental data are compared. This parameter and the pair of parameters
calculated_first_k
andcalculated_last_k
are exclusive, and either one should be specified.
[solver.reference
] subsection¶
path_epsilon
Format: string
Description: Path to the reference data file.
Reference files¶
Input template file¶
The input template file template.txt
is a template for creating an input file for feff85L
.
The parameters to be varied in odatse-XAFS (such as the atomic coordinates you want to find) should be replaced with the appropriate string, such as value_*
.
The strings to be used are specified by string_list
in the [solver.param]
section of the input file for the solver.
Similarly, the elements of the polarization vector are replaced by the strings such as polarization_*
specified by the polarization_list
parameter.
An example template is shown below.
* This feff.inp file generated by ATOMS, version 2.50
* ATOMS written by and copyright (c) Bruce Ravel, 1992-1999
* -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- *
* total mu = 725.4 cm^-1, delta mu = 610.0 cm^-1
* specific gravity = 12.006, cluster contains 55 atoms.
* -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- *
* mcmaster corrections: 0.00020 ang^2 and 0.770E-07 ang^4
* -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- * -- *
TITLE Sample_data
EDGE K
S02 1.0
* pot xsph fms paths genfmt ff2chi
CONTROL 1 1 1 1 1 1
PRINT 0 0 0 0 0 0
* r_scf [ l_scf n_scf ca ]
*SCF 6.05142 0 15 0.1
EXAFS 20
RPATH 6
* kmax [ delta_k delta_e ]
*XANES 4.0 0.07 0.5
* r_fms [ l_fms ]
*FMS 6.05142 0
*
*RPATH 0.10000
* emin emax resolution
*LDOS -20 20 0.1
POTENTIALS
* ipot z [ label l_scmt l_fms stoichiometry ]
0 28 Ni
1 16 S
2 8 O
NLEG 2
*CRITERIA 4.00 2.50
*DEBYE 300.00 340.00
* CORRECTION 4.50 0.5
* RMULTIPLIER 1.00
* ION 0 0.2
* ION 1 0.2
* ixc [ Vr Vi ]
EXCHANGE 0 -5 0
SIG2 0.0016
POLARIZATION polarization_01 polarization_02 polarization_03
ATOMS
0.0000 0.0000 0.0000 0 Ni
value_01 value_02 value_03 1 S
1.1400 1.2800 0.9700 2 O
In this case, value_01
, value_02
, and value_03
are the parameters to be varied, and polarization_01
, polarization_02
, and polarization_03
are the elements of the polarization vector.
See the FEFF reference manual for the format of the input file.
Target file¶
The target file that contains experimental data is specified by the path_epsilon
parameter in the [solver.reference]
section.
The format of the data is as follows:
The first column contains the wave number, and the second and latter columns contain the spectrum intensity and its uncertainty for each polarization direction.
The first two lines correspond to the header.
An example of the file is shown below.
k c(k)_E[001]
(Ni09sum000-004k e(k)_E[001] Ni11sum000-004k_sum140521_E1 e(k)_E[1-10] Ni13dd_sum000-004k_d140617_t e(k)_E[110]
3.5 -0.02335000 0.006999908 -0.04765000 0.007511923 -0.04365000 0.007200607
3.55 -0.01203000 0.009141367 -0.03033000 0.010077591 -0.03322000 0.009255752
3.6 -0.00198000 0.008535745 -0.02501000 0.008242841 -0.02414000 0.007907668
...
Output files¶
For odatse-XAFS, the files generated by feff85L
will be written in call_01
, call_02
, and call_03
in Log%%%%%_#####
created under the folder with the rank number.
(When use_tmpdir
is True
, they are stored in /tmp
or in a temporary directory specified by the environment variable TMPDIR
.)
%%%%%
stands for the index of iteration in Algorithm
(e.g., steps in Monte Carlo),
#####
stands for the index of group (e.g., replica index in Monte Carlo), and
call_01
, …, are the labels for the polarization directions.
In large calculations, the number of files generated during the execution may
In large-scale calculations, the number of files generated during the execution may become huge and reach to the limitation of storage systems.
For such cases, let the solver.config.remove_work_dir
parameter be true
in order to remove these folders.