The toml format
The toml format is a human-readable configuration file format that is easy to read and write. It is used to define the parameters for the QCE input file and the clusterset file in Peacemaker. More information about the toml format can be found in the TOML documentation.
A typical toml file is structured with sections, each defined by square brackets, and key-value pairs within those sections. The key-value pairs are separated by an equal sign, and values can be strings, numbers, arrays or boleans. An example of a toml file, which is actually a QCE input file, is shown bellow:
[system]
components = 1
[qce]
amf = [0.0, 0.5, 101]
bxv = [1.0, 2.0, 101]
[ensemble]
temperature = 298.15
pressure = 101325.0
monomer_amounts = 1.0
Since the values can have different types, they are presented in different ways:
Strings are enclosed in double quotes, e.g., “example”.
Numbers are written as is, e.g., 3.14.
Arrays are enclosed in square brackets, e.g., [1, 2, 3].
Booleans are written as true or false.
In our configuration files, sometimes the user can specify if a specific value is a single value or a range of values. In this case, also if the user decides to give a single value, it must be enclosed in square brackets, e.g., [1.0]. The mean field parameter \(a_{mf}\) is an example of such a value, which can be specified as a single value or as a range of values.
Input files from earlier versions of Peacemaker
If you want to use QCE-input files and clusterset files from earlier versions of Peacemaker,
you can convert them to the toml format using the the following python scripts, located in the
tools/convert2toml directory of the peacemaker4 repository:
QCEinput2toml.py
clusterset2toml.py
These scripts can be used from the command line as follows:
python QCEinput2toml.py <QCE-input file> <output toml file>
python clusterset2toml.py <clusterset file> <output toml file>
Note
After usage double check the QCE-toml file. Brackets around single values are required for those values that can also be specified as a range of values. These brackets have to be added manually. (This will be fixed soon!)
QCE input file
The QCE input file is a toml file that contains all necessary information about the system to be investigated and the parameters to be sampled. In the following, all sections and key-value pairs of the QCE input file are explained in detail. Sections are defined by square brackets, and key-value pairs are separated by an equal sign as shown in the example above.
[system]
[qce]
[ensemble]
[reference]
This section is optioanl. It enables comparison to experimental reference data. It is disabled by default. Further details on parameter sampling are given in the last section of the documentation.
[output]
This section is optional. It enables the output of additional files and is disabled by default.
Example QCE input files
Single Point Calculation The input file shown bellow will run a QCE “single point” calculation for a one-component system using the clusterset specified in the command line and explained in the following section. Default options are used in most cases.
[qce]
amf = 0.1
bxv = 1.3
[ensemble]
temperature = [200.0, 400.0, 201]
pressure = 1.01325
monomer_amounts = 1.0
Parameter Sampling This input will perform an \(a_{mf}\), \(b_{xv}\) parameter sampling for a pure substance. Reference data are provided by an isobar file.
[system]
components = 1
[qce]
amf = [0.0, 0.5, 101]
bxv = [1.0, 2.0, 101]
[ensemble]
temperature = [200.0, 400.0, 201]
pressure = 1.01325
monomer_amounts = 1.0
[reference]
isobar_file = "isobar.dat"
Parameter Optimization The following input will perform an \(a_{mf}\), \(b_{xv}\) parameter optimization for a ternary mixture, following a rough sampling on a small grid. Reference data are provided by a density at \(298.15 K\) and a temperature of phase transition.
[system]
components = 3
[qce]
amf = [0.0, 2.0, 11]
bxv = [0.5, 1.5, 11]
optimizer = ["amf", "bxv"]
grid_iterations = 2
[ensemble]
temperature = [273.15, 400.15, 128]
pressure = 1.01325
monomer_amounts = [0.6, 0.1, 0.3]
[reference]
density = [298.15, 0.9248]
phase_transition = 332.61
Clusterset file
The clusterset file is a toml file that contains the paths to the structure and frequency files of each cluster, as well as information about the clusters, such as their composition or energy.
Here, the sections are the clusters, which are defined by square brackets, and the key-value pairs within those sections are equivalent for each cluster. The clusterset file is structured as follows:
[cluster1]
isMonomer = true/false
composition = [N, M, ...]
sigma = N
coordinates = "path/to/structure/file1.xyz"
frequencies = "path/to/frequency/file1.flist"
energy = A
volume = A
frequency_scale = A
anharmonicity = A
[cluster2]
isMonomer = true/false
composition = [N, M, ...]
sigma = N
coordinates = "path/to/structure/file2.xyz"
frequencies = "path/to/frequency/file2.flist"
energy = A
volume = A
frequency_scale = A
anharmonicity = A
The Keywords are explained in detail below: