Input file¶
As the input file format, TOML format is used. The input file consists of the following six sections.
baseSpecify the basic parameters about
py2dmat.
solverSpecify the parameters about
Solver.
algorithmSpecify the parameters about
Algorithm.
runnerSpecify the parameters about
Runner.
mappingDefine the mapping from a parameter searched by
Algorithm.
limitationDefine the limitation (constration) of parameter searched by
Algorithm.
logSpecify parameters related to logging of solver calls.
[base] section¶
dimensionFormat: Integer
Description: Dimension of the search space (number of parameters to search)
root_dirFormat: string (default: The directory where the program was executed)
Description: Name of the root directory. The origin of the relative paths to input files.
output_dirFormat: string (default: The directory where the program was executed)
Description: Name of the directory to output the results.
[solver] section¶
The name determines the type of solver. Each parameter is defined for each solver.
nameFormat: String
Description: Name of the solver. The following solvers are available.
sim-trhepd-rheed: Solver to calculate Total-reflection high energy positron diffraction (TRHEPD) or Reflection High Energy Electron Diffraction (RHEED) intensities.analytical: Solver to provide analytical solutions (mainly used for testing).
See Direct Problem Solver for details of the various solvers and their input/output files.
[algorithm] section¶
The name determines the type of algorithm. Each parameter is defined for each algorithm.
nameFormat: String
Description: Algorithm name. The following algorithms are available.
minsearch: Minimum value search using Nelder-Mead methodmapper: Grid searchexchange: Replica Exchange Monte Carlobayes: Bayesian optimization
seedFormat: Integer
- Description: A parameter to specify seeds of the pseudo-random number generator used for random generation of initial values, Monte Carlo updates, etc.
For each MPI process, the value of
seed + mpi_rank * seed_deltais given as seeds. If omitted, the initialization is done by the Numpy’s prescribed method.
seed_deltaFormat: Integer (default: 314159)
- Description: A parameter to calculate the seed of the pseudo-random number generator for each MPI process.
For details, see the description of
seed.
See Search algorithms for details of the various algorithms and their input/output files.
[runner] section¶
This section sets the configuration of Runner, which bridges Algorithm and Solver.
It has two subsections, mapping and log .
[mapping] section¶
This section defines the mapping from an \(N\) dimensional parameter searched by Algorithm, \(x\), to an \(M\) dimensional parameter used in Solver, \(y\) .
In the case of \(N \ne M\), the parameter dimension in [solver] section should be specified.
In the current version, the affine mapping (linear mapping + translation) \(y = Ax+b\) is available.
AFormat: List of list of float, or a string (default:
[])- Description: \(N \times M\) matrix \(A\). An empty list
[]is a shorthand of an identity matrix. If you want to set it by a string, arrange the elements of the matrix separated with spaces and newlines (see the example).
- Description: \(N \times M\) matrix \(A\). An empty list
bFormat: List of float, or a string (default:
[])- Description: \(M\) dimensional vector \(b\). An empty list
[]is a shorthand of a zero vector. If you want to set it by a string, arrange the elements of the vector separated with spaces.
- Description: \(M\) dimensional vector \(b\). An empty list
For example, both
A = [[1,1], [0,1]]
and
A = """
1 1
0 1
"""
mean
[limitation] section¶
This section defines the limitation (constraint) in an \(N\) dimensional parameter searched by Algorithm, \(x\), in addition of min_list and max_list.
In the current version, a linear inequation with the form \(Ax+b>0\) is available.
co_aFormat: List of list of float, or a string (default:
[])- Description: \(N \times M\) matrix \(A\). An empty list
[]is a shorthand of an identity matrix. If you want to set it by a string, arrange the elements of the matrix separated with spaces and newlines (see the example).
- Description: \(N \times M\) matrix \(A\). An empty list
co_bFormat: List of float, or a string (default:
[])- Description: \(M\) dimensional vector \(b\). An empty list
[]is a shorthand of a zero vector. If you want to set it by a string, arrange the elements of the vector separated with spaces.
- Description: \(M\) dimensional vector \(b\). An empty list
For example, both
A = [[1,1], [0,1]]
and
A = """
1 1
0 1
"""
mean
[log] section¶
Setting parametrs related to logging of solver calls.
filenameFormat: String (default: “runner.log”)
Description: Name of log file.
intervalFormat: Integer (default: 0)
- Description: The log will be written out every time solver is called
intervaltimes. If the value is less than or equal to 0, no log will be written.
- Description: The log will be written out every time solver is called
write_resultFormat: Boolean (default: false)
Description: Whether to record the output from solver.
write_inputFormat: Boolean (default: false)
Description: Whether to record the input to solver.