Structure search
The structure search (referred to as search
in the code) is
the third part of a tensor-LEED calculation as
implemented in ViPErLEED (RUN = 3).
It must follow a reference calculation and a
delta-amplitudes calculation. It requires stored
delta files to run. In almost all cases, it is the
most computationally expensive part of a LEED-I(V) calculation. The
complexity depends on the size of the parameter space defined in the
DISPLACEMENTS file.
During the structure search, the optimization algorithm samples surface structures in the configuration space defined in DISPLACEMENTS. Diffraction intensities and the corresponding \(R\) factor are calculated for these structures based on combinations of the precomputed delta amplitudes. The optimization tries to find the combination of parameters yielding the smallest possible \(R\) factor.
The behavior of the structure-optimization algorithm is affected by multiple parameters (see search behaviour). See the section describing the DISPLACEMENTS file for details on the available options for geometric, vibrational, and occupation displacements. There are some caveats to the structure optimization in tensor LEED in general, and to the implementation in TensErLEED in particular. See the section on structure search in tensor LEED for details.
Optimization algorithm
The rough \(R\)-factor surface [10] greatly limits the pool of applicable optimization algorithms. TensErLEED employs a modified random-sampling strategy with a down-step criterion, as described by Kottcke and Heinz [9]. The optimization is performed in parallel for a set of individuals (i.e., independent parameter combinations), defined in ViPErLEED by the SEARCH_POPULATION parameter. The initial configurations for the optimization are defined by SEARCH_START.
For each search step (called “generation”, based on the terminology of genetic
algorithms), a new grid point in the parameter space is selected randomly,
but based on a probability distribution centered on the current position.
The \(R\) factor is calculated for the selected parameter combination and the new
parameter set is accepted only if the \(R\) factor for the new configuration
is smaller than for the previous configuration.
The width of the probability distribution is determined by the current
\(R\) factor, the number of displacements, and the gaussian
flag of
the SEARCH_CONVERGENCE parameter.
ViPErLEED enables more sophisticated control over the search process than is possible with TensErLEED alone. Different types of convergence criteria and an automatic scaling of the probability distribution can be set via SEARCH_CONVERGENCE. Furthermore, whenever partial convergence is reached, a portion of the search population can be dropped and reinitialized to escape from local minima. By default, the search population is partially reinitialized using a custom genetic algorithm (see SEARCH_CULL for details).
Structure search in ViPErLEED
The structure search in ViPErLEED is based on the corresponding section of TensErLEED. As with the other sections, ViPErLEED takes care of handling the input and output for the legacy code. The search is also the only part of ViPErLEED and TensErLEED that makes use of processes communicating via MPI, if available (highly recommended).
When a structure search is executed in ViPErLEED, the following main steps are performed before the actual calculation starts:
The DISPLACEMENTS file is read and interpreted.
The current delta files are loaded and checked for compatibility.
The TensErLEED input files
rf.info
,PARAM
, andsearch.steu
are prepared based on the slab and on the EXPBEAMS file. (They are available for inspection among the supplementary files in theSUPP
directory.)Based on the slab symmetry and the symmetry settings, symmetry-linked parameters are identified. The
control.chem
input file for TensErLEED is written.Based on the N_CORES parameter and on the presence of mpirun on the machine, the correct TensErLEED source files are collected. They are then compiled at run time (compilation information saved to
SUPP/compile_logs/compile-search.log
). When using early TensErLEED versions (< v1.7.4) the precompiled object filesrandom_.o
orMPIrandom_.o
must be available at this stage. More information on compiling these files can be found in this part of the Installation section.The search log file
search-<timestamp>.log
is created. It will be filled with progress information as the search continues.
With the preparation finished, the TensErLEED search program is started (using mpirun, if available).
ViPErLEED periodically monitors the progress of the search, reporting the best \(R\) factor achieved up to that point and the number of sampled configurations. Based on the information read from the SD.TL file produced by TensErLEED, the Search-progress.pdf and Search-report.pdf files are generated and periodically updated. They provide a graphical overview of the progress of the structure search and of its convergence. Search-progress.pdf contains information related exclusively to the current TensErLEED structure optimization, i.e., one block in the DISPLACEMENTS file. ViPErLEED enables the user to chain or loop multiple TensErLEED structure optimizations (see the DISPLACEMENTS syntax for details). In that case, Search-report.pdf summarizes the overall progress, including all optimization runs.
Once all the convergence criteria (see SEARCH_CONVERGENCE) are met, the search is cleanly aborted, the results are processed, and the Search-progress.pdf and Search-report.pdf files are updated one last time with the final values. This concludes the structure-search section. ViPErLEED proceeds by first executing a Superposition calculation, then continuing to the next segment as defined in the RUN parameter (or it stops if there is none).
Warning
Remember to call the bookkeeper utility with
the -c
flag after a ViPErLEED run containing a structure search,
if you want to continue from the found best-fit structure.
Otherwise the progress will be discarded and following runs will
start again from the reference structure, unless POSCAR and
VIBROCC are manually copied from the OUT
directory.