Input file data types

Cuby checks and modifies the values of the keywords accordingly to their data type. The following page explains the syntax of the keywords of various types and how Cuby handles them.

Integer

An integer number, such as

charge: 1

Float

A floating-point number, optionally in scientific notation

number: 1.5
small_number: 1.2e-3

Boolean

A logical value. YAML recognizes following values: true, on, yes / false, off, no.

run_faster: yes

String

A string or text. Cuby checks the type but not the contents. YAML uses several possible notations for difefernt types of strings. The most simple is to enter the string directly:

string1: This is my string.

When there are problematic characters, the string should be quoted:

string2: "!@#"

Multi-line string can be enetered as well, using the '|' label and indenting the lines (the indent is removed upon parsing):

string3: |
  line 1
  line 2
  ...

Symbol

Symbol is a short (one word) string. In the cuby input, it is used in keywords that expect a value from a predefined list. Parsing symbols in the cuby input is case insensitive. The symbol is writen simply as is, no quotes are needed. For example, the method is specified by a symbol:

method: HF

List of symbols

A comma-separated list of symbols. This is not a YAML type, the parsing is done in Cuby.

list: item, second_item, another_item

Array

An array of entries of some other type. There are two ways how to write array in YAML: inline

array: [ 1, 2, 3 ]

using one item per line, starting with '-' (optionally indented):

array:
  - 1
  - 2
  - 3

Hash

Hash is a set of key-value pairs. The Cuby input is structured as a hash but a single keyword can have the same structure, e.g:

element_parameters:
  H: 1.0
  C: 2.0

Also, it can be written on a single line:

element_parameters: { H: 1.0,  C: 2.0 }