YAML basics¶
The YAML format is the only input format supported by exaStamp. This page recalls the basics of plain YAML. exaStamp and the underlying onika/exaNBody platform add a few extensions on top of it (reserved keys, file inclusion, component overriding, etc.), which are described in YAML extensions.
Basic types¶
YAML is a human-readable data serialization often used for writing configuration files and in applications where data is being stored or transmitted by/between operators. Recursive definition of YAML document is pretty simple and a YAML document usually contains three types of elements:
- scalars: text, number, boolean
- lists: an ensemble of ordered elements
- dictionaries: an ensemble, ordered or not, of tuples each with a key and an associated value
For more information about the YAML framework, please visit the following links:
Below are some examples of scalar, list or dictionary definitions in YAML format.
Note: a list of single-key dictionaries, e.g. [ { A: "value" }, { B: 3 }, { C: false } ] or its block form with dashes, is a list, not a dictionary — exaStamp uses that pattern for ordered, possibly repeated entries (e.g. the species block).
Combining types¶
In addition, you can combine multiple types (scalar, list, dictionary):
Here, key1 is bound to a value of type dictionary, key2 is bound to a value of type list, key3 is bound to a value of type scalar, key4 is bound to a value of type dictionary.